Add settings form

joshk - August 21, 2008 - 00:00
Project:UpDown
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

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.

#1

joshk - August 21, 2008 - 00:04

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

#2

rwohleb - August 22, 2008 - 01:38
Status:active» patch (code needs review)

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.

AttachmentSize
updown.patch17.6 KB

#3

rwohleb - August 22, 2008 - 01:53

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

AttachmentSize
updown.patch17.64 KB

#4

joshk - August 22, 2008 - 17:28

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.

#5

rwohleb - August 22, 2008 - 17:32

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

#6

joshk - August 22, 2008 - 22:43
Status:patch (code needs review)» closed

Merged this w/dmitri's updates and committed.

 
 

Drupal is a registered trademark of Dries Buytaert.