You are here

README.txt in Rate 7

Same filename and directory in other branches
  1. 8.2 README.txt
  2. 8 README.txt
  3. 6.2 README.txt
PREFACE
-------
This module provides flexible voting widgets for nodes and comments.
Administrators can add multiple widgets and define an unlimited number of
buttons.

CONTENTS
--------
1. Installation
2. Configuration
2.1. Widget configuration
2.2. Options
2.3. Bot detection
3. Widget types
4. Theming
5. Voting results
6. Views integration
7. Expiration (close voting on a specified date)
8. Using rate in blocks or panels
9. Hooks

1. Installation
--------------------------------------------------------------------------------
Before installing Rate, you need VotingAPI. If not already installed, download
the latest stable version at http://drupal.org/project/votingapi
Please follow the readme file provided by VotingAPI on how to install.

Copy Rate into your modules directory (i.e. sites/all/modules) and enable Rate
(on admin/modules).

Optional modules:

* Chart
  To view the charts in the vote results tab, you also need to install the "chart"
  module, which you can get at http://drupal.org/project/chart.
* Date
  The date module is a requirement for the Rate Expiration module.

2. Configuration
--------------------------------------------------------------------------------
After installation, the configuration page will be available at
admin/structure/rate. This page shows a list with available widgets. Each widget
have an edit and delete link. You can add a tab on the form below 'Add widget'.
In this form you have to choose a widget type. See section 3 for more
information on this topic. Both editing and adding a widget leads to the widget
configuration (see §2.1).

If you want users other than admin to access the voting results page, you need
to give them the "view rate results page" permission on admin/user/permissions.

2.1. Widget configuration
-------------------------
The elements on the widget configuration form are explained in this paragraph.
Note that some elements may not be available depending on the widget type you
use, these are "Value type", "Options" and "Translate options".

* Title
  The title is only used in the admin section. Use a recognizable name.
* Machine readable name
  Name used for technical purposes. You may only contain alphanumeric characters
  and underscores.
* Tag
  This is the tag used by VotingAPI to store the voting results. Voting results
  from different tags are never merged. You can use this to allow multiple
  ratings on the same node (i.e. for "comfort", "location", "services" etc.).
  The default tag for ratings is "vote". Use this value if you do not allow
  ratings on specific aspects.
* Value type
  This determines how vote results are totaled. VotingAPI supports three value
  types by default: 'Percentage' votes are averaged, 'Points' votes are summed
  up, and 'Options' votes get a count of votes cast for each specific option.
  Typical usages are:
  * Thumbs up / down: use points
  * Bad / mediocre / good: use percentage
  * Makes me funny / boring / mad / angry: use options
* Options
  These are the options displayed to the user. Each option has a value and a
  label. See §2.2 for more information on how to configure options.
* Translate options
  This checkbox determines if the labels used for the options should be
  translated.
* Node types
  Check the node types on which a rate widget should be available. There are
  separate columns for nodes and comments in this table.
* Node display
  Determines where the widget will be placed. There are three options:
  * Do not add automatically: The widget is added in the node object, but not
    within the content array. This only makes sense if you place the widget
    somewere by hand in the node theming.
  * Above the content: The content will be prepended by the widget.
  * Below the content: Selected by default. The widget is appended to the
    content.
  * Within the links: Add the widget inside the links section.
* Display in teaser
  Check this box if you want the widget to be visible in the node teaser.
* Appearance in full node
  Display mode when full node is displayed. Options are:
  * Full widget: Display the full, clickable widget.
  * Display only: Display the full widget in disabled state (links are not
    clickable).
  * Display only, compact: Compact widget in disabled state.
  * Compact: Clickable widget, but without information line.
* Appearance in teaser
  Display mode when node teaser is displayed.
* Comment display
  Same as node display, but for comments.
* Display mode when displayed for comments.
* Description
  This is an optional description which is displayed under the rate widget.
* Display description in compact mode
* Which rating should be displayed?
  Determines which rating to display. Options are:
  * Average rating: Always display the average rating.
  * Users vote if available, empty otherwise: Display the users vote. If the
    user has not voted already, there is no voting result displayed.
  * Users vote if available, average otherwise: Display the users vote. If the
    user has not voted already, the average vote is displayed.
* Which rating should be displayed when the user just voted?
  Same as previous question. Applies directly after the user has voted. It is
  recommended to set this to "Users vote" to provide a visible feedback after
  a user has voted.
* Roles
  Check the roles which are allowed to vote using this widget. All roles are
  allowed to vote if no roles are checked.
* Behaviour when user has no permissions to vote
  If the user may not vote on the widget, what needs to be done? Options are:
  * Redirect to login and show message.
    The widget is visible just as if you may vote on in. If the user clicks on
    a button, the user is redirected to the user page which shows the message
    'You must login before you can vote.'. The user is redirected back to the
    page with the rate widget after login.
  * Redirect to login but do not show a message.
    This behaviour is the same as the first option, except for the fact that it
    does not display a message.
  * Show a disabled widget (with non clickable buttons).
    The user is able to see the widget, but cannot click on it.
  * Hide widget
    The widget is not visible to the user if he does not have the permission to
    vote.

2.2. Options
------------
Options are the "buttons" dispayed in the widget. These can be visually
different, depending on the theming. Options are generated as HTML links by
default.

Each option has a value and a label. Only the label is visible for the user, but
the value is what he actually votes for when clicking the button.

Values have to be configured according to the following rules:
* Values must be integers (may be negative). thus '1', '2', '0', '-3' are all
  right, but '2.3' is wrong.
* Values must be unique across all options within the same widget.

Which value you should use depends on the value type setting. When using points,
these are the points which will be added when clicking that button. So "thumbs
up" must have the value '1', "thumbs down" the value '-1' and "neutral" '0'. For
'Percentage' you have to use whole numbers between 0 and 100. When using
'Options', you may use any number as long as they are unique. It doesn't have to
make sense as they are only used for storage.

2.3. Bot detection
--------------------------------------------------------------------------------
The Rate module is able to detect bots in three ways:

* Based on user agent string
* Using an threshold. The IP-address is blocked when there are more votes from
  the same IP within a given time than the threshold. There are thresholds for
  1 minute and 1 hour.
* Lookup the IP-address in the BotScout.com database. This requires you to
  obtain an API-key.

The thresholds and API-key can be configured at the settings form found on
admin/structure/rate/settings. The default thresholds are 25 and 250. They are
too high for many sites, but you should make sure that no real users get
blocked. On the other hand, lower thresholds will identify more bots and will
identify them faster. A value of 10 / 50 is a better setting for most sites.

Bad user agents cannot be configured via the admin at this moment. You can add
bad strings in the 'rate_bot_agent' table. Percent signs ("%") can be used as
wildcards. A string can be for example "%GoogleBot%" or just "%bot%". Patterns
are case insensitive. The id field is for identification and has no meaning.

3. Widget types
--------------------------------------------------------------------------------
Technically, widget types are sets of "value types" and "options" (see §2.1).
They are called 'templates' in code.

Some widget types have the option to let the user customize the options, others
don't allow the user to do that. But all widget types have a predefined set of
options.

You may create widgets without choosing a "template" by selecting the 'Custom'
type. By using 'Custom', you have to add the theming for this widget (see
section 4).

Widget types can be extended by 3rd party modules. The following widget types
are provided by the rate module:

* Thumbs up
* Thumbs up / down
* Number up / down
* Fivestar
* Emotion
* Yes / no

4. Theming
--------------------------------------------------------------------------------
Default templates for theming are:

* rate-widget.tpl.php
  This is the default template for all custom widgets.
* rate-widget--NAME.tpl.php
  This is a widget specific template. Use the machine name for NAME. Replace
  underscores by dashes in this name. This template is only available for custom
  widgets.

Theming for non-custom widget types are defined in the module which provides
the widget type.

You may use the following snippets in the template:

* Print a button for a single option:

    <?php
    print theme('rate_button', array(
      'text' => $links[0]['text'],
      'href' => $links[0]['href'],
      'class' => "extra-class")
    );
    ?>

  '0' is the first option (see §2.1). For a thumbs up / down
  configuration you will have:

    <?php
    print theme('rate_button', array(
      'text' => $links[0]['text'],
      'href' => $links[0]['href'],
      'class' => "extra-class")
    );
    print theme('rate_button', array(
      'text' => $links[1]['text'],
      'href' => $links[1]['href'],
      'class' => "extra-class")
    );
    ?>

* Print the rating when using value type 'percentage' or 'points':

    <?php print $results['rating']; ?>

* Print the number of votes for a specific option (only available when using
  value type 'options'):

    <?php print $links[0]['votes']; ?>

  '0' is the first option (see §2.1).

* Print the total number of votes:

  <?php print $results['count']; ?>

* For thumbs up / down widgets, there are 2 special variables available which
  provides the percentage of votes for up and down.

  <?php print $results['up_percentage']; ?>
  <?php print $results['down_percentage']; ?>

You can choose to not automatically add the widget to the node template. In that
case, the widget can be used as:

<?php print $node->rate_NAME['#markup']; ?>

Replace NAME by the widget's machine readable name.

5. Voting results
--------------------------------------------------------------------------------
Voting results are available on the voting results page. You can get there by
clicking the "Voting results" tab on the node page. Note that this tab is hidden
if the node does not have any rate widgets or if you do not have the
"view rate results" permission.

When the chart module is enabled, you will find charts of the results in the
last 30 days on this page. The chart may show less than 30 days if there was no
activity on all days.

The voting results page is only available for nodes.

6. Views integration
--------------------------------------------------------------------------------
This module provides views integration via the VotingAPI module. To add a rate
widget in your view, first add a relation to "Node: Vote results" for nodes or
"Comment: Vote results" for comments. You have to configure a few options here.
The "Value type" and "Vote tag" needs to be the same as used for the widget
(see §2.1). The "aggregate" function must be "Number of votes".

After adding the relationship, you can add the field "Vote results: Value" to
your view. In the "Appearance" box you may choose one of the following:

* Rate widget (display only)
  This shows a disabled widget. Uses are allowed to see the results, but cannot
  click the buttons.
* Rate widget (compact)
  This shows a compact widget. This is the basic widget without the textual
  information.
* Rate widget
  This shows the full widget (as on the node page).

When using a view on nodes, you are advised to add the "Node: Type" field to
your view fields. If you do not, an additional query will be executed per row.
You may exclude this field from display.

7. Expiration (close voting on a specified date)
--------------------------------------------------------------------------------
The optional Rate Expiration module allows you to close voting on a specified
date. When adding or editing a rate widget, you will find the following options:

* Disable voting after this period
  When set, voting is closed when the configured period has ellapsed since node
  creation. Users are not able to click the buttons when voting is closed.
* Allow override
  When checked, the start- en enddates for voting can be set in the node edit
  form.

8. Using rate in blocks or panels
--------------------------------------------------------------------------------
You can place the rate widget on a node page in a block or (mini) panel. Add
a custom block with the PHP code input filter or a panel with PHP code and use
the following code:

<?php
if (arg(0) == 'node' && is_numeric(arg(1)) && ($node = node_load(arg(1)))) {
  print rate_embed($node, 'NAME');
}
?>

Replace NAME by the widget's machine readable name. If you already have a loaded
node object, you just need the "print rate_embed" line.

You may also use different build modes:

print rate_embed($node, 'NAME', RATE_FULL);
print rate_embed($node, 'NAME', RATE_COMPACT);
print rate_embed($node, 'NAME', RATE_DISABLED);
print rate_embed($node, 'NAME', RATE_CLOSED);

9. Hooks
--------------------------------------------------------------------------------
Hooks for modules are documented in rate.hooks.inc.

There are two Javascript hooks available; eventBeforeRate and eventAfterRate.
This hook has an argument 'data'. This is an object which contains the variables
'content_type', 'content_id', 'widget_id' and 'widget_mode'. Example of use:

$(document).bind('eventAfterRate', function(event, data)
{
  alert('eventAfterRate called');
});

File

README.txt
View source
  1. PREFACE
  2. -------
  3. This module provides flexible voting widgets for nodes and comments.
  4. Administrators can add multiple widgets and define an unlimited number of
  5. buttons.
  6. CONTENTS
  7. --------
  8. 1. Installation
  9. 2. Configuration
  10. 2.1. Widget configuration
  11. 2.2. Options
  12. 2.3. Bot detection
  13. 3. Widget types
  14. 4. Theming
  15. 5. Voting results
  16. 6. Views integration
  17. 7. Expiration (close voting on a specified date)
  18. 8. Using rate in blocks or panels
  19. 9. Hooks
  20. 1. Installation
  21. --------------------------------------------------------------------------------
  22. Before installing Rate, you need VotingAPI. If not already installed, download
  23. the latest stable version at http://drupal.org/project/votingapi
  24. Please follow the readme file provided by VotingAPI on how to install.
  25. Copy Rate into your modules directory (i.e. sites/all/modules) and enable Rate
  26. (on admin/modules).
  27. Optional modules:
  28. * Chart
  29. To view the charts in the vote results tab, you also need to install the "chart"
  30. module, which you can get at http://drupal.org/project/chart.
  31. * Date
  32. The date module is a requirement for the Rate Expiration module.
  33. 2. Configuration
  34. --------------------------------------------------------------------------------
  35. After installation, the configuration page will be available at
  36. admin/structure/rate. This page shows a list with available widgets. Each widget
  37. have an edit and delete link. You can add a tab on the form below 'Add widget'.
  38. In this form you have to choose a widget type. See section 3 for more
  39. information on this topic. Both editing and adding a widget leads to the widget
  40. configuration (see §2.1).
  41. If you want users other than admin to access the voting results page, you need
  42. to give them the "view rate results page" permission on admin/user/permissions.
  43. 2.1. Widget configuration
  44. -------------------------
  45. The elements on the widget configuration form are explained in this paragraph.
  46. Note that some elements may not be available depending on the widget type you
  47. use, these are "Value type", "Options" and "Translate options".
  48. * Title
  49. The title is only used in the admin section. Use a recognizable name.
  50. * Machine readable name
  51. Name used for technical purposes. You may only contain alphanumeric characters
  52. and underscores.
  53. * Tag
  54. This is the tag used by VotingAPI to store the voting results. Voting results
  55. from different tags are never merged. You can use this to allow multiple
  56. ratings on the same node (i.e. for "comfort", "location", "services" etc.).
  57. The default tag for ratings is "vote". Use this value if you do not allow
  58. ratings on specific aspects.
  59. * Value type
  60. This determines how vote results are totaled. VotingAPI supports three value
  61. types by default: 'Percentage' votes are averaged, 'Points' votes are summed
  62. up, and 'Options' votes get a count of votes cast for each specific option.
  63. Typical usages are:
  64. * Thumbs up / down: use points
  65. * Bad / mediocre / good: use percentage
  66. * Makes me funny / boring / mad / angry: use options
  67. * Options
  68. These are the options displayed to the user. Each option has a value and a
  69. label. See §2.2 for more information on how to configure options.
  70. * Translate options
  71. This checkbox determines if the labels used for the options should be
  72. translated.
  73. * Node types
  74. Check the node types on which a rate widget should be available. There are
  75. separate columns for nodes and comments in this table.
  76. * Node display
  77. Determines where the widget will be placed. There are three options:
  78. * Do not add automatically: The widget is added in the node object, but not
  79. within the content array. This only makes sense if you place the widget
  80. somewere by hand in the node theming.
  81. * Above the content: The content will be prepended by the widget.
  82. * Below the content: Selected by default. The widget is appended to the
  83. content.
  84. * Within the links: Add the widget inside the links section.
  85. * Display in teaser
  86. Check this box if you want the widget to be visible in the node teaser.
  87. * Appearance in full node
  88. Display mode when full node is displayed. Options are:
  89. * Full widget: Display the full, clickable widget.
  90. * Display only: Display the full widget in disabled state (links are not
  91. clickable).
  92. * Display only, compact: Compact widget in disabled state.
  93. * Compact: Clickable widget, but without information line.
  94. * Appearance in teaser
  95. Display mode when node teaser is displayed.
  96. * Comment display
  97. Same as node display, but for comments.
  98. * Display mode when displayed for comments.
  99. * Description
  100. This is an optional description which is displayed under the rate widget.
  101. * Display description in compact mode
  102. * Which rating should be displayed?
  103. Determines which rating to display. Options are:
  104. * Average rating: Always display the average rating.
  105. * Users vote if available, empty otherwise: Display the users vote. If the
  106. user has not voted already, there is no voting result displayed.
  107. * Users vote if available, average otherwise: Display the users vote. If the
  108. user has not voted already, the average vote is displayed.
  109. * Which rating should be displayed when the user just voted?
  110. Same as previous question. Applies directly after the user has voted. It is
  111. recommended to set this to "Users vote" to provide a visible feedback after
  112. a user has voted.
  113. * Roles
  114. Check the roles which are allowed to vote using this widget. All roles are
  115. allowed to vote if no roles are checked.
  116. * Behaviour when user has no permissions to vote
  117. If the user may not vote on the widget, what needs to be done? Options are:
  118. * Redirect to login and show message.
  119. The widget is visible just as if you may vote on in. If the user clicks on
  120. a button, the user is redirected to the user page which shows the message
  121. 'You must login before you can vote.'. The user is redirected back to the
  122. page with the rate widget after login.
  123. * Redirect to login but do not show a message.
  124. This behaviour is the same as the first option, except for the fact that it
  125. does not display a message.
  126. * Show a disabled widget (with non clickable buttons).
  127. The user is able to see the widget, but cannot click on it.
  128. * Hide widget
  129. The widget is not visible to the user if he does not have the permission to
  130. vote.
  131. 2.2. Options
  132. ------------
  133. Options are the "buttons" dispayed in the widget. These can be visually
  134. different, depending on the theming. Options are generated as HTML links by
  135. default.
  136. Each option has a value and a label. Only the label is visible for the user, but
  137. the value is what he actually votes for when clicking the button.
  138. Values have to be configured according to the following rules:
  139. * Values must be integers (may be negative). thus '1', '2', '0', '-3' are all
  140. right, but '2.3' is wrong.
  141. * Values must be unique across all options within the same widget.
  142. Which value you should use depends on the value type setting. When using points,
  143. these are the points which will be added when clicking that button. So "thumbs
  144. up" must have the value '1', "thumbs down" the value '-1' and "neutral" '0'. For
  145. 'Percentage' you have to use whole numbers between 0 and 100. When using
  146. 'Options', you may use any number as long as they are unique. It doesn't have to
  147. make sense as they are only used for storage.
  148. 2.3. Bot detection
  149. --------------------------------------------------------------------------------
  150. The Rate module is able to detect bots in three ways:
  151. * Based on user agent string
  152. * Using an threshold. The IP-address is blocked when there are more votes from
  153. the same IP within a given time than the threshold. There are thresholds for
  154. 1 minute and 1 hour.
  155. * Lookup the IP-address in the BotScout.com database. This requires you to
  156. obtain an API-key.
  157. The thresholds and API-key can be configured at the settings form found on
  158. admin/structure/rate/settings. The default thresholds are 25 and 250. They are
  159. too high for many sites, but you should make sure that no real users get
  160. blocked. On the other hand, lower thresholds will identify more bots and will
  161. identify them faster. A value of 10 / 50 is a better setting for most sites.
  162. Bad user agents cannot be configured via the admin at this moment. You can add
  163. bad strings in the 'rate_bot_agent' table. Percent signs ("%") can be used as
  164. wildcards. A string can be for example "%GoogleBot%" or just "%bot%". Patterns
  165. are case insensitive. The id field is for identification and has no meaning.
  166. 3. Widget types
  167. --------------------------------------------------------------------------------
  168. Technically, widget types are sets of "value types" and "options" (see §2.1).
  169. They are called 'templates' in code.
  170. Some widget types have the option to let the user customize the options, others
  171. don't allow the user to do that. But all widget types have a predefined set of
  172. options.
  173. You may create widgets without choosing a "template" by selecting the 'Custom'
  174. type. By using 'Custom', you have to add the theming for this widget (see
  175. section 4).
  176. Widget types can be extended by 3rd party modules. The following widget types
  177. are provided by the rate module:
  178. * Thumbs up
  179. * Thumbs up / down
  180. * Number up / down
  181. * Fivestar
  182. * Emotion
  183. * Yes / no
  184. 4. Theming
  185. --------------------------------------------------------------------------------
  186. Default templates for theming are:
  187. * rate-widget.tpl.php
  188. This is the default template for all custom widgets.
  189. * rate-widget--NAME.tpl.php
  190. This is a widget specific template. Use the machine name for NAME. Replace
  191. underscores by dashes in this name. This template is only available for custom
  192. widgets.
  193. Theming for non-custom widget types are defined in the module which provides
  194. the widget type.
  195. You may use the following snippets in the template:
  196. * Print a button for a single option:
  197. print theme('rate_button', array(
  198. 'text' => $links[0]['text'],
  199. 'href' => $links[0]['href'],
  200. 'class' => "extra-class")
  201. );
  202. ?>
  203. '0' is the first option (see §2.1). For a thumbs up / down
  204. configuration you will have:
  205. print theme('rate_button', array(
  206. 'text' => $links[0]['text'],
  207. 'href' => $links[0]['href'],
  208. 'class' => "extra-class")
  209. );
  210. print theme('rate_button', array(
  211. 'text' => $links[1]['text'],
  212. 'href' => $links[1]['href'],
  213. 'class' => "extra-class")
  214. );
  215. ?>
  216. * Print the rating when using value type 'percentage' or 'points':
  217. * Print the number of votes for a specific option (only available when using
  218. value type 'options'):
  219. '0' is the first option (see §2.1).
  220. * Print the total number of votes:
  221. * For thumbs up / down widgets, there are 2 special variables available which
  222. provides the percentage of votes for up and down.
  223. You can choose to not automatically add the widget to the node template. In that
  224. case, the widget can be used as:
  225. rate_NAME['#markup']; ?>
  226. Replace NAME by the widget's machine readable name.
  227. 5. Voting results
  228. --------------------------------------------------------------------------------
  229. Voting results are available on the voting results page. You can get there by
  230. clicking the "Voting results" tab on the node page. Note that this tab is hidden
  231. if the node does not have any rate widgets or if you do not have the
  232. "view rate results" permission.
  233. When the chart module is enabled, you will find charts of the results in the
  234. last 30 days on this page. The chart may show less than 30 days if there was no
  235. activity on all days.
  236. The voting results page is only available for nodes.
  237. 6. Views integration
  238. --------------------------------------------------------------------------------
  239. This module provides views integration via the VotingAPI module. To add a rate
  240. widget in your view, first add a relation to "Node: Vote results" for nodes or
  241. "Comment: Vote results" for comments. You have to configure a few options here.
  242. The "Value type" and "Vote tag" needs to be the same as used for the widget
  243. (see §2.1). The "aggregate" function must be "Number of votes".
  244. After adding the relationship, you can add the field "Vote results: Value" to
  245. your view. In the "Appearance" box you may choose one of the following:
  246. * Rate widget (display only)
  247. This shows a disabled widget. Uses are allowed to see the results, but cannot
  248. click the buttons.
  249. * Rate widget (compact)
  250. This shows a compact widget. This is the basic widget without the textual
  251. information.
  252. * Rate widget
  253. This shows the full widget (as on the node page).
  254. When using a view on nodes, you are advised to add the "Node: Type" field to
  255. your view fields. If you do not, an additional query will be executed per row.
  256. You may exclude this field from display.
  257. 7. Expiration (close voting on a specified date)
  258. --------------------------------------------------------------------------------
  259. The optional Rate Expiration module allows you to close voting on a specified
  260. date. When adding or editing a rate widget, you will find the following options:
  261. * Disable voting after this period
  262. When set, voting is closed when the configured period has ellapsed since node
  263. creation. Users are not able to click the buttons when voting is closed.
  264. * Allow override
  265. When checked, the start- en enddates for voting can be set in the node edit
  266. form.
  267. 8. Using rate in blocks or panels
  268. --------------------------------------------------------------------------------
  269. You can place the rate widget on a node page in a block or (mini) panel. Add
  270. a custom block with the PHP code input filter or a panel with PHP code and use
  271. the following code:
  272. if (arg(0) == 'node' && is_numeric(arg(1)) && ($node = node_load(arg(1)))) {
  273. print rate_embed($node, 'NAME');
  274. }
  275. ?>
  276. Replace NAME by the widget's machine readable name. If you already have a loaded
  277. node object, you just need the "print rate_embed" line.
  278. You may also use different build modes:
  279. print rate_embed($node, 'NAME', RATE_FULL);
  280. print rate_embed($node, 'NAME', RATE_COMPACT);
  281. print rate_embed($node, 'NAME', RATE_DISABLED);
  282. print rate_embed($node, 'NAME', RATE_CLOSED);
  283. 9. Hooks
  284. --------------------------------------------------------------------------------
  285. Hooks for modules are documented in rate.hooks.inc.
  286. There are two Javascript hooks available; eventBeforeRate and eventAfterRate.
  287. This hook has an argument 'data'. This is an object which contains the variables
  288. 'content_type', 'content_id', 'widget_id' and 'widget_mode'. Example of use:
  289. $(document).bind('eventAfterRate', function(event, data)
  290. {
  291. alert('eventAfterRate called');
  292. });