News:

Why not join!! Its FREE!

Main Menu

Ranked Polls

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

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Deaks

Ranked Polls v1.1.0
Give Your Community a Better Way to Vote!

By BoredSkull for SMF 2.1.x
ISC Licence



Overview

Why settle for choosing just one option when members could rank their preferences?

Introducing Ranked Polls, a modification that brings ranked-choice voting to SMF using the instant-runoff voting system.

Instead of selecting a single answer, members arrange poll options in order of preference. If no option receives a majority of the continuing votes, the lowest-ranked candidate is eliminated and their votes transfer to voters' next available choices.

The process continues until a winner is determined.

Whether you're running community elections, choosing event locations, selecting new forum features or making group decisions, Ranked Polls provides a flexible alternative to traditional polls.

Best of all, your existing SMF polls remain completely unchanged!

100% Hook Based - No Core or Theme File Edits Required!



Create Ranked Polls Using SMF's Existing Poll System

There's no separate poll creation interface to learn.

Ranked Polls integrates directly with SMF's existing poll functionality.

  • Simple Creation: Tick "Ranked-choice poll" when creating a topic with a poll or adding a poll to an existing topic.
  • Board Controls: Administrators choose which boards support ranked polls.
  • Permission-Based Access: A dedicated "Create ranked-choice polls" permission determines which membergroups can create them.
  • Familiar Poll Settings: Continue using SMF's normal poll questions, options, closing dates, locking, vote changes and results visibility settings.
  • Standard Poll Compatibility: Regular SMF polls continue operating normally.

Ranked polls can be introduced only where needed without affecting the rest of your forum.



An Intuitive Voting Experience

Ranked Polls makes expressing preferences straightforward.

  • Rank Your Choices: Click available options to add them to your ranked ballot.
  • Drag-and-Drop Ordering: Rearrange preferences into your chosen order.
  • Accessible Controls: Use up/down buttons or Alt+Up/Down keyboard shortcuts to reorder options.
  • Screen Reader Support: Ranking changes are announced for accessibility.
  • No JavaScript Required: A numbered ranking form is available when JavaScript is disabled.
  • Server-Side Validation: Ballots are checked on the server before acceptance.
  • One Ballot Per Member: Voting is restricted to registered members, preventing multiple ballots from the same account.

Members can express their preferences without needing to understand how the counting system works.



Optional Anonymous Ballots

For elections or sensitive community decisions, Ranked Polls offers configurable ballot anonymity.

Administrators can choose:

  • Never Anonymous: Standard identifiable ballot storage.
  • Creator's Choice: Let poll creators choose whether ballots are anonymous.
  • Always Anonymous: Require anonymous voting for every ranked poll.

Anonymous ballots are stored without member IDs, timestamps or linking identifiers.

A separate voter record prevents duplicate submissions without connecting individual members to their ranking choices.

This provides a voting option for communities where ballot privacy matters.



Instant-Runoff Voting Explained

Ranked Polls uses instant-runoff counting to identify the winning option.

Rather than simply counting first choices, it considers voters' next preferences when an option is eliminated.

How it works:

  • Round 1: Count everyone's first-choice votes.
  • Majority Check: If an option receives more than half of the continuing ballots, it wins.
  • Elimination: Otherwise, the option with the fewest votes is eliminated.
  • Vote Transfers: Ballots for the eliminated option move to their next available preference.
  • Repeat: Further rounds continue until a winner is determined.

When options are tied, Ranked Polls applies a consistent sequence of tie-breaking rules:

  • Votes received in earlier counting rounds, starting with the most recent.
  • Overall ranking score using Borda points.
  • The number of ballots ranking each option.
  • Original poll option order as the final tie-breaker.

Every round can be examined, making the counting process transparent.



Detailed Results & Visualisations

Ranked Polls goes beyond simply announcing a winner.

Members can explore how the result was reached through detailed round-by-round reporting.

  • Visual Bar Charts: See each option's votes in every counting round.
  • Majority Indicator: A 50% reference line shows the winning threshold.
  • Elimination Tracking: Identify which options were removed in each round.
  • Vote Transfers: See where eliminated options' votes were transferred.
  • Exhausted Ballots: Track ballots without any remaining ranked choices.
  • Ballot Statistics: View first-choice totals, ranking frequency and Borda scores.
  • CSV Exports: Download round-by-round results or individual ballot data for further analysis.

CSV exports are available to administrators and, optionally, poll creators.

Anonymous ballots are shuffled during export, and exported cells are protected against spreadsheet formula injection.



Designed to Work With SMF

Ranked Polls integrates with the existing SMF poll system rather than replacing it.

  • Normal SMF polls remain unchanged.
  • Existing poll settings continue to work.
  • SMF's native first-choice vote totals are maintained for compatibility with SSI and other modifications.
  • Existing ranked polls continue functioning even if administrators disable the creation of new ones.
  • Members who voted receive an alert when a ranked poll with an end date closes.



What's New in v1.1.0?

Version 1.1.0 includes additional reliability, permissions and scheduled-task corrections.

  • Existing Poll Protection: Disabling the creation of new ranked polls no longer affects existing ranked polls.
  • CSV Privacy: Poll creator exports now respect configured results visibility settings, while administrators retain full export access.
  • Scheduled Task Reliability: Ensures the RankedPolls class is loaded correctly during unattended scheduled tasks.
  • Notification Protection: Unapproved topics are excluded from scheduled poll-closing alerts.

Includes the improvements introduced in v1.0.1:

  • Improved concurrent voting protection to prevent duplicate voter claims.
  • Support for up to 256 ranked options per ballot.
  • Resetting votes no longer converts ranked polls into normal polls.
  • Protects existing ballots by restricting option additions and removals after voting begins.
  • Prevents conversion of existing polls with votes unless those votes are reset.
  • Improved notification consistency and strict ballot validation.



Administration & Configuration

After installation, navigate to:

Admin > Configuration > Ranked Polls

From here, administrators can configure the boards where ranked polls are available and control ballot anonymity and other ranked-poll settings.

The dedicated Create ranked-choice polls board permission determines which membergroups can create them.



Installation & Requirements

  • SMF 2.1.x
  • PHP 7.0 or newer
  • SMF polls enabled
  • No core or theme file modifications required

Install using SMF's Package Manager.

Upgrading from v1.0.0 or v1.0.1:

Use the Package Manager's upgrade option.

Existing ballots, settings and poll metadata are preserved during the migration, including the expanded ballot storage introduced in v1.0.1.

Important: Back up your database before upgrading. Testing the upgrade on a staging installation is recommended before applying it to a live forum.



Why Choose Ranked Polls?

Traditional polls are useful when members have one clear favourite, but community decisions are often more complicated.

Ranked Polls lets members express their preferences beyond a single choice and provides a transparent way to identify the result through successive counting rounds.

With accessible voting, configurable anonymity, detailed visual results and native SMF integration, it's suited to elections, competitions and everyday community decisions.

More Than One Choice. One Clear Result.



Developed by BoredSkull

Licence: ISC

Giving every preference a place in the vote.

Awaiting Approval: https://custom.simplemachines.org/index.php?mod=4533
  • 0 reactions

    Members who reacted