We need a settings form which exposes the following options (taken from vote_up_down):

  • Node types to allow updown voting on
  • Automatic display settings (teaser, full view, both, neither)
  • Settings for voting on comments
  • Whether or not to include the vote total in $node->links
  • What tag to assign votes in VotingAPI

Also permissions for what roles can cast votes would probably be a good idea.

CommentFileSizeAuthor
#3 updown.patch17.64 KBrwohleb
#2 updown.patch17.6 KBrwohleb

Comments

joshk’s picture

A really nice touch would be if these settings could be overridden on each node-settings form as well, ala fivestar.

rwohleb’s picture

Status: Active » Needs review
StatusFileSize
new17.6 KB

This patch adds in the missing nodeapi hook, breaks the templates out into files, allows for positioning on node/teaser, and provides settings per node type.

rwohleb’s picture

StatusFileSize
new17.64 KB

Here is an update to the patch that avoids a perm collision with a poorly named perm in fivestar.

joshk’s picture

That's good to break this into a tpl.php. Maybe this can help with different style/widget plugins ala this other ticket.

Inline javascript should be removed from the tpl.php file and put into updown.js IMHO.

rwohleb’s picture

Agreed. Breaking out the JS will also help with namespacing if CCK support is introduced.

joshk’s picture

Status: Needs review » Closed (fixed)

Merged this w/dmitri's updates and committed.