[Mod] Ranked Polls

Started by Deaks, Nov 20, 2026, 02:11 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Deaks

Ranked Polls v1.1.1
Ranked-choice voting for SMF 2.1.x
By BoredSkull · ISC Licence

Ranked Polls lets members vote by putting poll options in order of preference. If the forum is choosing a venue and a member's first choice is eliminated, their ballot can still count towards their next choice. Once results are visible, members can follow each round to see how the winner was decided.

Creators use SMF's familiar poll form and tick Ranked-choice poll when creating a topic or adding a poll to an existing one. Standard polls continue to work as usual. The mod uses SMF integration hooks and requires no core or theme edits.

SMF Customisation Site — Ranked Polls (awaiting approval)



What's New in v1.1.1?

  • Poll-closing alerts and cleanup — Fixed the hourly scheduled task that could not run in v1.1.0. Members who voted are again notified when a ranked poll with an end date closes. The task also cleans up ranked-poll data left behind when a poll is deleted.
  • Missed alerts — Upgrading or reinstalling repairs the task. On its first run, it sends closing alerts for polls that ended while the task was broken.
  • Direct upgrade from v1.1.0 — The Package Manager upgrade preserves existing ballots, settings and poll data.



Creating a Poll and Casting a Ballot

Poll creators can use SMF's usual settings for questions, options, closing dates, locking, vote changes and results visibility. Admins choose which boards allow ranked polls and which membergroups can create them.

To vote, select the options you want to rank and put your favourite first. Drag choices into order, use the up and down buttons, or press Alt+Up and Alt+Down. Ranking changes are announced to screen readers, and a numbered form is available when JavaScript is disabled.

Voting is open to registered members, with one ballot per account. The server validates each submission and supports up to 256 ranked options per ballot.

How the Winner Is Decided

  • Count each ballot for its first choice. An option wins as soon as it has more than half of the continuing ballots.
  • If no option has a majority, eliminate the option with the fewest votes. Each affected ballot transfers to its next choice still in the running.
  • If a ballot has no remaining ranked choice, it is marked as exhausted and is left out of the majority calculation for subsequent rounds. Repeat the count until a winner is determined.

If options tie for elimination, the count checks their totals in earlier rounds, starting with the most recent. If they are still tied, it uses their overall ranking scores (Borda points), then the number of ballots that ranked each option, and finally the original poll option order.

Results and Exports

Round-by-round bar charts show vote totals, a 50% reference line, the option eliminated, where its votes transferred and how many ballots were exhausted. Members can also see first-choice totals, how often each option was ranked and its Borda score.

Administrators can export round results or individual ballots as CSV files. Poll creators can also export data if enabled, subject to the poll's results visibility settings. Anonymous ballots are shuffled on export, and exported cells include protection against spreadsheet formula injection. SMF's native first-choice totals are also maintained for SSI and compatible mods.

Ballot Privacy

Admins can require identifiable ballots, let each poll creator choose, or require anonymous ballots for all ranked polls. An anonymous ballot stores the rankings without a member ID, timestamp or linking identifier. A separate record tracks who has voted so the forum can enforce one ballot per account without tying a member to their choices.



Installation and Administration

Ranked Polls requires SMF 2.1.x, PHP 7.0 or newer and SMF's built-in polls to be enabled.

  • Install the package through SMF's Package Manager. For an existing installation, back up your database before using the Upgrade action. Testing the upgrade on a staging forum first is recommended.
  • Go to Admin → Configuration → Ranked Polls to choose the available boards, ballot privacy settings and poll creator export options.
  • Grant the Create ranked-choice polls board permission to the membergroups that should be able to create them.

The Package Manager also supports upgrades from v1.0.0 and v1.0.1, preserving ballots, settings and poll metadata, including the expanded ballot storage introduced in v1.0.1.

Earlier Releases

v1.1.0 — Poll availability and export permissions
  • Kept existing ranked polls available when administrators disable creation of new ones.
  • Applied results visibility settings to poll creator CSV exports while retaining full export access for administrators.
  • Updated class loading for unattended scheduled tasks and excluded unapproved topics from poll-closing alerts.

v1.0.1 — Ballot limits and voting reliability
  • Added support for up to 256 ranked options, tightened ballot validation and improved handling of simultaneous submissions from the same account.
  • Kept polls ranked when votes are reset. Once voting begins, adding or removing options is restricted to protect existing ballots.
  • Required existing votes to be reset before converting a standard poll to a ranked poll, and improved notification consistency.

Support and Suggestions

For help or bug reports, please use the Support board. Include your SMF and Ranked Polls versions. If a result looks unexpected, include the round number and the vote totals shown so we can follow the count. Feature suggestions are welcome on the Requests board.
  • 0 reactions

    Members who reacted


Deaks

Ranked Polls 1.1.1
  • Fixed the hourly scheduled task, which couldn't run in 1.1.0. Poll-closing alerts are sent again and data for deleted polls is cleaned up.
  • Upgrading or reinstalling repairs the task. Alerts for polls that ended while it was broken are sent on its first run.
  • Added an upgrade path from 1.1.0. Ballots, settings and poll data are kept.
  • 0 reactions

    Members who reacted