You are here

README.txt in Voting Rules 7

Same filename and directory in other branches
  1. 6 README.txt
The Voting Rules module provides Rules integration for VotingAPI.

Because Rules requires that content types acted upon be defined ahead of time, you must select the type of content which is being voted on.  Currently, Voting Rules only supports rules based on nodes, users, and comments.

Installation
==========
To install, follow the general directions available at: 
http://drupal.org/node/70151

Events
==========
Voting Rules supports three events for each supported content type:

* User votes on content

  This rule should be used when you want to act on an individual vote, NOT when you want to act on the results of a vote. For example, if you want to promote content to the front page when any user gives a post a 100% rating, then you should use this event. If you want to act on the aggregate data (e.g. average vote is 80% or higher) use the event below.


* Votes are calculated for content

  Used to act on the results of a vote in aggregate. This event is invoked everytime the vote is recalculated, which may happen more than once in one page load, depending on your VotingAPI configuration.   


* User deletes a vote on content

  This is the counterpart to 'User votes on content' and functions in the same way. 

Conditions
==========
* Check the value of a vote

  This condition is used in conjunction with 'User votes on content' and 'User deletes a vote on content.' It allows you to check the value of an individual vote. Note that depending on the module generating the vote the value type may be different. For instance, Fivestar evaluates votes as a percentage (by default 20, 40, 60, 80, or 100) - so you could trigger an action on a 100% vote with the rule: Value is *equal to* 100.

* Evaluate the results of a vote
 
  To be used in conjunction with 'Votes are calculated for content,' this condition allows you to check the total number of votes on the content, the average value of votes on the content, and the sum total of all votes on the content.

File

README.txt
View source
  1. The Voting Rules module provides Rules integration for VotingAPI.
  2. Because Rules requires that content types acted upon be defined ahead of time, you must select the type of content which is being voted on. Currently, Voting Rules only supports rules based on nodes, users, and comments.
  3. Installation
  4. ==========
  5. To install, follow the general directions available at:
  6. http://drupal.org/node/70151
  7. Events
  8. ==========
  9. Voting Rules supports three events for each supported content type:
  10. * User votes on content
  11. This rule should be used when you want to act on an individual vote, NOT when you want to act on the results of a vote. For example, if you want to promote content to the front page when any user gives a post a 100% rating, then you should use this event. If you want to act on the aggregate data (e.g. average vote is 80% or higher) use the event below.
  12. * Votes are calculated for content
  13. Used to act on the results of a vote in aggregate. This event is invoked everytime the vote is recalculated, which may happen more than once in one page load, depending on your VotingAPI configuration.
  14. * User deletes a vote on content
  15. This is the counterpart to 'User votes on content' and functions in the same way.
  16. Conditions
  17. ==========
  18. * Check the value of a vote
  19. This condition is used in conjunction with 'User votes on content' and 'User deletes a vote on content.' It allows you to check the value of an individual vote. Note that depending on the module generating the vote the value type may be different. For instance, Fivestar evaluates votes as a percentage (by default 20, 40, 60, 80, or 100) - so you could trigger an action on a 100% vote with the rule: Value is *equal to* 100.
  20. * Evaluate the results of a vote
  21. To be used in conjunction with 'Votes are calculated for content,' this condition allows you to check the total number of votes on the content, the average value of votes on the content, and the sum total of all votes on the content.