Topics

Spirit

# Topic title here

nitely
Esteban Castro Borsani

- 3
- 4h

I just implemented this new-ish feature. There used to be topic polls (one poll per topic), that feature was removed in favor of comment polls (many polls per comment).

About this feature: the number of polls is limited by the number of choices, there can be 20 (by default) choices per comment, that means 1 poll with 20 choices, 2 polls with 10 choices each and so on. There is no limit of times a poll can be edited and the comment history will show what was changed. It is possible to schedule when the poll will automatically close , the number of choices a user can vote (one or more), if the results can be displayed at any time (by default) or at the end of the poll (when it's closed), see who has voted a given choice (at the moment there is no way to hide the voters) and close/open the poll at any point.

A poll can take several parameters as shown below:

Minimal poll:

- Description A
- Description B

Show results close

    [poll name=mypoll]
    1. Description A
    2. Description B
    [/poll]

> Note: the name of the poll must be unique. Two polls within a comment should not have the same name. If there is an error in the poll (ie: non unique name, non unique choice numbers, so on) it won't be rendered, no error will be displayed (that's how markdown works so...)

Poll with title:

You take the red pill and you stay in Wonderland and I show you how deep the rabbit hole goes.

- Blue pill, 0%
- Red pill, 100% View voters

Votes: 3.
Show vote choices close

    [poll name=mypoll2]
    # You take the red pill and you stay in Wonderland and I show you how deep the rabbit hole goes.
    1. Blue pill
    2. Red pill
    [/poll]

Multi choice with a maximum:

Select up to 2 choices...

- A
- B
- C

You may select up to 2 choices.
Show results close

    [poll name=mypoll3 max=2]
    # Select up to 2 choices...
    1. A
    2. B
    3. C
    [/poll]

Multi choice with a minimum:

Select at least 2 choices...

- A, 50% View voters
- B, 50% View voters
- C, 0%

Votes: 2.
Show vote choices close

    [poll name=mypoll4 min=2]
    # Select at least 2 choices...
    1. A
    2. B
    3. C
    [/poll]

Multi choice with a min&max:

Select at least 2 and up to 3 choices...

- A
- B
- C
- D

You may select no less than 2 and no more than 3 choices.
Show results close

    [poll name=mypoll5 min=2 max=3]
    # Select at least 2 and up to 3 choices...
    1. A
    2. B
    3. C
    4. D
    [/poll]

Poll with auto close:

This one closes next year

- A, 0%
- B, 0%

Votes: 0.
open

    [poll name=mypoll6 close=365d]
    # This one closes next year
    1. A
    2. B
    [/poll]

Secret (ish) poll:

Results won't get displayed until it's closed

- A
- B

Results will be available when the poll is closed.
close

    [poll name=mypoll7 mode=secret]
    # Results won't get displayed until it's closed
    1. A
    2. B
    [/poll]

Spirit