You are here

README.txt in Vote Up/Down 6.3

Same filename and directory in other branches
  1. 5 README.txt
  2. 6 README.txt
  3. 6.2 README.txt
  4. 7.2 README.txt
  5. 7 README.txt
= Vote Up/Down =

== Overview ==

This module will let you make votes on some entities inside drupal with
different widgets, by using Voting API and its some submodules: vud_node,
vud_comment and vud_term.

AJAX functionality, provided by ctools, is used for voting if the browser
supports it.

=== Features ===

* Vote on the entities: nodes, comments and terms.

To submit bug reports and feature suggestions, or to track changes:
  http://drupal.org/project/issues/vote_up_down

== Requirements ==

* Drupal modules:
** voting_api: http://drupal.org/project/voting_api
** ctools: http://drupal.org/project/ctools

== Instalation ==

* Install as usual, see http://drupal.org/node/70151 for further
information.

== Configuration ==

* Configure permissions in Administer >> User management >> Permissions
>> vud* module:
*** vud module
**** access vote up/down statistics
+
Users in roles with the 'access vote up/down statistics' permission
will be able to see the votes performed by each user on its 'Votes' tab.
+
**** administer vote up/down
+
Users in roles with the 'administer vote up/down' permission will be able
to modify the Voting API tag for Vote Up/Down votes.
+
**** reset vote up/down votes
+
Users in roles with the 'reset vote up/down votes' permission will be able
to undo their own votes if it's also permitted in the configuration for
the respective module.
+
**** use vote up/down
+
Users in roles with the 'use vote up/down' permission will be able to
actually cast a vote with vote up/down(for the callback).
+
*** vud_comment
**** administer vote up/down on comments 
+
Users in roles with the 'administer vote up/down on comments' permission
will be able to modify the settings regardin voting on comments.
+
**** use vote up/down on comments
+
Users in roles with the 'use vote up/down on comments' permission will be
able to see the widget for casting votes on comments.
+
*** vud_node
**** administer vote up/down on nodes
+
Users in roles with the 'administer vote up/down on nodes' permission
will be able to modify the settings regarding voting on nodes.
+
**** see vote up/down node stats
+
Users in roles with the 'see vote up/down node stats' permission will be
able to see the votes performed by each user on the 'Voting details' node
tab.
+
**** use vote up/down on nodes
+
Users in roles with the 'use vote up/down on nodes' permission will be
able to see the widget for casting votes on nodes.
+
**** view vote up/down count on nodes
+
Users in roles with the 'view vote up/down count on nodes' permission
will be able to see the widget for casting votes on nodes.
+
*** vud_term
**** administer vote up/down on terms
+
Users in roles with the 'administer vote up/down on terms' permission
will be able to modify the settings regarding voting on terms.
+
**** use vote up/down on terms
+
Users in roles with the 'use vote up/down on terms' permission will be
able to see the widget for casting votes on terms.
+
* Customize the  settings in Administer >> Site configuration >>
Vote Up/Down, so you can
** match:
*** vud_node: what node types should be votable
*** vud_comment: what comments of node types should be votable
*** vid_term: what terms of node types should be votable
** which widget is going to be used
** if you want to display the widget in on teasers/full nodes
** if the user is going to be able to reset their own votes
* Start voting!

== Customization ==

You can write your own widget for Vote Up/Down, and you can put it in
your module or in your theme. Please take a look to
link:WIDGETAPI.html[WIDGETAPI.txt] for more information.

=== Theming widgets and votes ===

Since widgets are implemented through plugins, and we have many plugins
to choose at runtime, we can not use direct theme templates, so instead
we render by hands the templates.

NOTE: It is not possible to decide dinamically the path where the
template is located. In contrast we can dinamically define function and
template names.

So, before rendering the template('widget.tpl.php' or 'votes.tpl.php') we
verify in the following order the files:

* For 'vud_comment'
+
----
<template_type>_comment_<plugin_name>__<node_type>
<template_type>_comment_<plugin_name>
<template_type>_comment
----
* For 'vud_node'
+
----
<template_type>_comment_<plugin_name>__<node_type>
<template_type>_comment_<plugin_name>
<template_type>_comment
----
* For 'vud_term'
+
----
<template_type>_comment_<plugin_name>__<term_vid>
<template_type>_comment_<plugin_name>
<template_type>_comment
----

Where '<template_type>' is 'widget' or 'votes'.

This templates can be located on the root of your theme folder or inside
your widget folder(not really recommended).

== Frequently Asked Questions ==

[qanda]

How to display voting widget by API for nodes?::
If you want to custom how and where to show the widget, you need to
render manually each part of the standard node `$content` variable
(fields, body, etc).
+
[source,php]
----
<?php
// save the rendered value of the widget
$vud_widget = $node->content['vud_node_widget_display']['#value'];
// avoid show it twice
unset($node->content['vud_node_widget_display']);

// render each value inside $content
print $node->content['body']['#value'];

// print vud widget, here is the place where we want to show it
print $vud_widget;

// render more values inside $content
----

How can I prevent bots to vote when anonymous voting is enabled?::
When anonymous voting is enabled, you need to modify your 'robots.txt'
file to prevent bots to vote.
+
----
Disallow: /vote/
Disallow: /?q=vote/
----

== Credits ==

Original Author - Fredrik Jonsson fredrik at combonet dot se

Orginal 2.x version - Pratul Kalia (lut4rp)

Current Maintainer: Marco Villegas (marvil07)

// vim: set syntax=asciidoc:

File

README.txt
View source
  1. = Vote Up/Down =
  2. == Overview ==
  3. This module will let you make votes on some entities inside drupal with
  4. different widgets, by using Voting API and its some submodules: vud_node,
  5. vud_comment and vud_term.
  6. AJAX functionality, provided by ctools, is used for voting if the browser
  7. supports it.
  8. === Features ===
  9. * Vote on the entities: nodes, comments and terms.
  10. To submit bug reports and feature suggestions, or to track changes:
  11. http://drupal.org/project/issues/vote_up_down
  12. == Requirements ==
  13. * Drupal modules:
  14. ** voting_api: http://drupal.org/project/voting_api
  15. ** ctools: http://drupal.org/project/ctools
  16. == Instalation ==
  17. * Install as usual, see http://drupal.org/node/70151 for further
  18. information.
  19. == Configuration ==
  20. * Configure permissions in Administer >> User management >> Permissions
  21. >> vud* module:
  22. *** vud module
  23. **** access vote up/down statistics
  24. +
  25. Users in roles with the 'access vote up/down statistics' permission
  26. will be able to see the votes performed by each user on its 'Votes' tab.
  27. +
  28. **** administer vote up/down
  29. +
  30. Users in roles with the 'administer vote up/down' permission will be able
  31. to modify the Voting API tag for Vote Up/Down votes.
  32. +
  33. **** reset vote up/down votes
  34. +
  35. Users in roles with the 'reset vote up/down votes' permission will be able
  36. to undo their own votes if it's also permitted in the configuration for
  37. the respective module.
  38. +
  39. **** use vote up/down
  40. +
  41. Users in roles with the 'use vote up/down' permission will be able to
  42. actually cast a vote with vote up/down(for the callback).
  43. +
  44. *** vud_comment
  45. **** administer vote up/down on comments
  46. +
  47. Users in roles with the 'administer vote up/down on comments' permission
  48. will be able to modify the settings regardin voting on comments.
  49. +
  50. **** use vote up/down on comments
  51. +
  52. Users in roles with the 'use vote up/down on comments' permission will be
  53. able to see the widget for casting votes on comments.
  54. +
  55. *** vud_node
  56. **** administer vote up/down on nodes
  57. +
  58. Users in roles with the 'administer vote up/down on nodes' permission
  59. will be able to modify the settings regarding voting on nodes.
  60. +
  61. **** see vote up/down node stats
  62. +
  63. Users in roles with the 'see vote up/down node stats' permission will be
  64. able to see the votes performed by each user on the 'Voting details' node
  65. tab.
  66. +
  67. **** use vote up/down on nodes
  68. +
  69. Users in roles with the 'use vote up/down on nodes' permission will be
  70. able to see the widget for casting votes on nodes.
  71. +
  72. **** view vote up/down count on nodes
  73. +
  74. Users in roles with the 'view vote up/down count on nodes' permission
  75. will be able to see the widget for casting votes on nodes.
  76. +
  77. *** vud_term
  78. **** administer vote up/down on terms
  79. +
  80. Users in roles with the 'administer vote up/down on terms' permission
  81. will be able to modify the settings regarding voting on terms.
  82. +
  83. **** use vote up/down on terms
  84. +
  85. Users in roles with the 'use vote up/down on terms' permission will be
  86. able to see the widget for casting votes on terms.
  87. +
  88. * Customize the settings in Administer >> Site configuration >>
  89. Vote Up/Down, so you can
  90. ** match:
  91. *** vud_node: what node types should be votable
  92. *** vud_comment: what comments of node types should be votable
  93. *** vid_term: what terms of node types should be votable
  94. ** which widget is going to be used
  95. ** if you want to display the widget in on teasers/full nodes
  96. ** if the user is going to be able to reset their own votes
  97. * Start voting!
  98. == Customization ==
  99. You can write your own widget for Vote Up/Down, and you can put it in
  100. your module or in your theme. Please take a look to
  101. link:WIDGETAPI.html[WIDGETAPI.txt] for more information.
  102. === Theming widgets and votes ===
  103. Since widgets are implemented through plugins, and we have many plugins
  104. to choose at runtime, we can not use direct theme templates, so instead
  105. we render by hands the templates.
  106. NOTE: It is not possible to decide dinamically the path where the
  107. template is located. In contrast we can dinamically define function and
  108. template names.
  109. So, before rendering the template('widget.tpl.php' or 'votes.tpl.php') we
  110. verify in the following order the files:
  111. * For 'vud_comment'
  112. +
  113. ----
  114. _comment___
  115. _comment_
  116. _comment
  117. ----
  118. * For 'vud_node'
  119. +
  120. ----
  121. _comment___
  122. _comment_
  123. _comment
  124. ----
  125. * For 'vud_term'
  126. +
  127. ----
  128. _comment___
  129. _comment_
  130. _comment
  131. ----
  132. Where '' is 'widget' or 'votes'.
  133. This templates can be located on the root of your theme folder or inside
  134. your widget folder(not really recommended).
  135. == Frequently Asked Questions ==
  136. [qanda]
  137. How to display voting widget by API for nodes?::
  138. If you want to custom how and where to show the widget, you need to
  139. render manually each part of the standard node `$content` variable
  140. (fields, body, etc).
  141. +
  142. [source,php]
  143. ----
  144. // save the rendered value of the widget
  145. $vud_widget = $node->content['vud_node_widget_display']['#value'];
  146. // avoid show it twice
  147. unset($node->content['vud_node_widget_display']);
  148. // render each value inside $content
  149. print $node->content['body']['#value'];
  150. // print vud widget, here is the place where we want to show it
  151. print $vud_widget;
  152. // render more values inside $content
  153. ----
  154. How can I prevent bots to vote when anonymous voting is enabled?::
  155. When anonymous voting is enabled, you need to modify your 'robots.txt'
  156. file to prevent bots to vote.
  157. +
  158. ----
  159. Disallow: /vote/
  160. Disallow: /?q=vote/
  161. ----
  162. == Credits ==
  163. Original Author - Fredrik Jonsson fredrik at combonet dot se
  164. Orginal 2.x version - Pratul Kalia (lut4rp)
  165. Current Maintainer: Marco Villegas (marvil07)
  166. // vim: set syntax=asciidoc: