Rating 2.0 Insert Rating Rev

This function allows you to collect rating rev votes for the ratings / reviews on your site. A rating rev is basically a review of a rating. In most cases, this would be like a thumbs up or thumbs down vote for a rating in your system. It's a way for your users to indicate what ratings / reviews they find useful and helpful versus unfair or inappropriate.

This function is AJAX friendly. In order to use it, you create a template that will contain the exp:rating:insert_rating_rev tag. You will provide the equivialent of 'yes' link as well as a 'no' link to your users. Clicking one of the links will take the user to the template you have created. In the URL you will include the rating id as well as a 'yes' or 'no' designator. The default behavior is to record a 'yes' vote if no designator is present in the URL.

Here is a sample url. Hitting this page will record a no vote for the rating of id '67'. http://www.some_site.com/index.php/some_template_group/some_template/67/no/

Parameters

rating_id=

rating_id="{rating_id}"

The 'rating_id' parameter is required. It tells the insert rating rev function which rating to count a vote for.

Variables

message

{message}

The 'message' variable will display the message generated by the rating module depending on the success or failure of the action.

Conditionals

failure

{if failure}{/if}

This conditional will show its contents if the insert rating rev function fails to execute properly.

success

{if success}{/if}

This conditional will show its contents if the insert rating rev function executes properly.

Examples

{exp:rating:insert_rating_rev rating_id="{segment_3}"}
{if failure}We were unable to count your vote.{/if}
{if success}Your vote was counted successfully.{/if}
{message}
{/exp:rating:insert_rating_rev}