Rating Downloads

An integral part of jDownloads is being able to "rate" a Download.  This ia actually a user driven vote system where users may cast a vote of betrween one and five stars for a Download.  This appears as a set of 'stars'  and a count of the number of users who have 'voted' or 'ranked' that particular Download.  The result is something like the following ratings01.

To vote you just click on the number of stars you wish to rank this download ratings02 Note that if you leave the mouse hovering it will show you how many stars you are about to award.  When you click the you will get a message "Thank you for voting", and of course the number of votes will increase.  The system keeps a record of who has voted, so if you attempt to vote again for the same Download then a message "You have already Voted for this item" is shown for a short time.  The purpose of this is of course to prevent users rigging the system to either artifically inflate or deflate the ranking.


In order to show the ranking stars it is essential to have the place holder {ratings}in the active Files and Download Detailks layouts as appropriate.

You can also use place holder {rating_title} which will preface the rating stars with the word 'rating'.

Changing Default Stars
When you install jDownloads the default  star graphic is  like ratings01
An alternative graphic is:  star_sample2

To change to this alternative carry out the following simple steps

  • sing a file manager  or sy ftp go to folder: <your-site>/components/com_jdownloads/rating/css
  •  find file: ajaxvote.css and rename it to: ajaxvote1.css
  • in the same folder there is a file called: ajaxvote2.css.
  • rename ajaxvote2.css to: ajaxvote.css to now show the alternative star rating graphic.

 Ratings do not Work

Obviously Ratings will not show if you do not have the placeholder {ratings} in your Active  Files or Download Detatails layouts.

However there is also another situation that is related to the contents of your .htaccess file. Specifically the code below, which if present, will stop users being able to vote

## Disallow access to rogue PHP files throughout the site, unless they are explicitly allowed
RewriteCond %{REQUEST_FILENAME} (\.php)$
RewriteCond %{REQUEST_FILENAME} !(/index[23]?\.php)$
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule (.*\.php)$ - [F]

This was first posted in Forum topic by Sakis in https://www.jdownloads.com/forum/index.php?topic=8522

Another helpful reference is https://docs.joomla.org/Htaccess_examples_(security)

Colin Mercer, Oct 2015

Print Email