Extension:Vote

From Linux Web Expert

Revision as of 18:04, 6 November 2022 by imported>Mxn (Disambiguation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<translate> For {{<tvar name=1>#if:the 2009 extension previously used in some Wikimedia polls and elections|the 2009 extension previously used in some Wikimedia polls and elections</tvar>|other uses}}, see: <tvar name=2>Extension:SpecialVote</tvar>.</translate>
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>
Quarterly downloads Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').
Public wikis using Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').
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

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?

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

  • <translate> Download and place the file(s) in a directory called <tvar name=name>Vote</tvar> in your <tvar name=ext>extensions/</tvar> folder.</translate>
  • <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
    wfLoadExtension( 'Vote' );
    
  • File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>