Allows your users to rate pages. Features:
Easy installation and uninstallation (single rake task to do both).
$ cd <radiant_app>/vendor/extensions/ $ git clone git://github.com/mikehale/radiant-ratings-extension.git ratings $ cd ../.. $ rake radiant:extensions:ratings:install
Copy the code into the proper location.
Migrate your database.
Create the necessary snippets and config records in the database.
$ rake radiant:extensions:ratings:uninstall $ rm -rf vendor/extensions/ratings
Add the rating snippet to any pages you want rated, or to a common layout:
<r:snippet name="rating" />
If you use an image with a different size or more or less padding, you'll want to update the config settings appropriately:
Radiant::Config['ratings.image_width'] = 15 Radiant::Config['ratings.image_padding'] = 3
These are needed so the background image width can be calculated properly based on the rating average.
In your snippet, you can also display different options depending on the point value and the page rating:
<r:points:each> <r:if_average_greater> <input type="image" src="/images/red_star.png" name="rating" value="<r:point_value />" /> </r:if_average_greater> <r:if_average_less> <input type="image" src="/images/grey_star.png" name="rating" value="<r:point_value />" /> </r:if_average_less> </r:points:each>
Originally sponsored by Ignite Social Media LLC - ignitesocialmedia.com/
Further development by:
The star rating assets are a modified version of the star rating system found on komodo media.
See LICENSE for copyright and licensing details.