Format Rules/Polls: Difference between revisions

From All The Fallen Stories
Jump to navigation Jump to search
Elerneron (talk | contribs)
No edit summary
Elerneron (talk | contribs)
No edit summary
Line 34: Line 34:
I don't vote in polls . . . I also lie.
I don't vote in polls . . . I also lie.
</poll>
</poll>
That's all well and good, but sometimes you need a poll that allows the reader to select multiple options.  This type of poll gives voters a number of votes that they can distribute between options.  All of their votes can be distributed between their choices even if they don't select as many options as they have votes.  Here is an example:
<pre>
<vote-start numvotes="3" />
'''What types of fruits do you like?'''
You have <vote-number /> votes to spread among the items below:
* Apples: <vote key="apples" />
* Oranges: <vote key="oranges" />
* Bananas: <vote key="bananas" />
<vote-end />
</pre>
Which makes this poll:
<vote-start numvotes="3" />
'''What types of fruits do you like?'''
You have <vote-number /> votes to spread among the items below:
* Apples: <vote key="apples" />
* Oranges: <vote key="oranges" />
* Bananas: <vote key="bananas" />
<vote-end />


[[Category:Format Rules|Polls]]
[[Category:Format Rules|Polls]]

Revision as of 18:05, 5 October 2015

The simplest way to make a poll is to use <poll></poll>. For example:

<poll>
Have you been to this page?
Yes, I have.
No, I haven't . . . I also lie.
</poll>

Creates this poll:

Have you been to this page?
You are not entitled to vote.
You are not entitled to view the results of this poll.
There were 29 votes since the poll was created on 17:35, 5 October 2015.
poll-id 3FD9C551A33BDA12FEA5C4CAB16BFA9A

You can also let the reader see the results before their vote. Here is another poll to demonstrate:

<poll show-results-before-voting>
Did you vote in the previous poll?
Yes, I did.
No, I didn't.
I don't vote in polls . . . I also lie.
</poll>

Which creates the following poll:

Did you vote in the previous poll?
You are not entitled to vote.
You are not entitled to view the results of this poll.
There were 23 votes since the poll was created on 17:46, 5 October 2015.
poll-id 115838FDB824ECC1FF6EE2FE00D0F51C