Extension:Vote

From mediawiki.org
For the 2009 extension previously used in some Wikimedia polls and elections, see: Extension:SpecialVote.
MediaWiki extensions manual
Vote
Release status: experimental
Implementation Tag , User interface
Description A user-friendly GUI for votes conducted on wiki pages.
Author(s) (push-ftalk)
MediaWiki
License MIT License
Download https://git.push-f.com/mw-vote/
<vote>
The voting format will probably be changed to support the reply tool of Discussion Tools, see phabricator:T320777.

A MediaWiki extension to provide a user-friendly graphical user interface for votes conducted on wiki pages.

Usage[edit]

To add a vote to a page you just add the <vote> tag as follows:

<vote>
</vote>

This extension then turns this tag into a web form with radio buttons for the available options (approve, oppose and abstain) and a textarea to attach a comment to the vote. When you submit the form, the extension simply edits the page, inserting a new line before the closing </vote> tag. By storing the votes in the page text all the changes are conveniently and transparently tracked in the page history.

Additional features include:

  • The votes are automatically tallied.
  • You can change your vote by just submitting the form again (your last vote counts).
  • An end date may be specified for the vote with the end attribute e.g. with <vote end=2022-10-15> the vote will close on the 15th October 2022 at 23:59 in the wiki timezone. After the deadline the web form to add new votes disappears.
  • A vote may be cancelled by adding the cancel attribute, e.g. <vote cancel>.
  • Any line within the <vote> tag that does not start with *␣ is skipped when tallying, so it is possible to reply to votes by editing the wikitext, e.g:
<vote>
* 2022-10-14 12:28 Alice: NO I am concerned that ...
: Some reply to Alice ... --~~~~
* 2022-10-14 12:30 Bob: YES I think that ...
</vote>

Pages with open votes are by default tracked in the Category:Pages with open votes category (which can be customized by editing MediaWiki:pages-with-open-votes-category).

How to reply to votes?[edit]

Replying to votes is currently only possible by editing the wikitext manually.

I am thinking about changing the vote format to be compatible with Convenient Discussions and the reply tool of Discussion Tools.

Installation[edit]

  • Download and place the file(s) in a directory called Vote in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'Vote' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.