aboutsummaryrefslogtreecommitdiff
path: root/doc/ikiwiki/directive/poll.mdwn
blob: 7b9fdfdc595622364a47fbcb82c14876c5f86126 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
The `poll` directive is supplied by the [[!iki plugins/poll desc=poll]] plugin.

This directive allows you to create online polls in the wiki. Here's an
example use:

	\[[!poll 0 "red" 0 "green" 0 "blue"]]

The numbers indicate how many users voted for that choice. When a user
votes for a choice in the poll, the page is modified and the number
incremented.

While some basic precautions are taken to prevent users from accidentially
voting twice, this sort of poll should not be counted on to be very
accurate; all the usual concerns about web based polling apply. Unless the
page that the poll is in is locked, users can even edit the page and change
the numbers!

Parameters: 

* `open` - Whether voting is still open. Set to "no" to close the poll to
  voting.
* `expandable` - Set to "yes" to make this poll have an interface to add
  another choice to the poll.
* `total` - Show total number of votes at bottom of poll. Default is "yes".
* `percent` - Whether to display percents. Default is "yes".
* `postvote` - By default after voting the updated page containing the poll
  is displayed. This parameter allows advancing onward to another page.
  This is useful for multi-page polls.
* `posttrail` - Similar to postvote, but allows advancing to the next page
  on a trail after a vote. The value of the parameter is the name of the
  page that defines the trail to follow. The trail plugin must be
  enabled for this to work.

[[!meta robots="noindex, follow"]]