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
A really nice touch would be if these settings could be overridden on each node-settings form as well, ala fivestar.
#2
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.
#3
Here is an update to the patch that avoids a perm collision with a poorly named perm in fivestar.
#4
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
Agreed. Breaking out the JS will also help with namespacing if CCK support is introduced.
#6
Merged this w/dmitri's updates and committed.