Wikipedia:Wikipedia Signpost/Templates/Voter/Documentation

Parameters

edit

This template is a proposal for an in-wiki polling apparatus for weekly use by the Signpost. The parameters are as follows:

{{Wikipedia:Wikipedia Signpost/Templates/Voter
| image = <!-- An image for the top-right corner of the sidebar; defaults to the Signpost logo. -->
| question = <!-- Question under consideration in the poll. -->
| option1 = <!-- Name of the first option, as reported in the legend and in the vote button. Defaults to the test poll. -->
| option1color = <!-- Color of the first option choice; defaults to #006699, Foundation blue. -->
| option2 = <!-- Name of the second option, as reported in the legend and in the vote button. Defaults to the test poll. -->
| option2color = <!-- Color of the first option choice; defaults to #339966, Foundation green. -->
| option3 = <!-- Optional. Where the votes for option two will be collected. Defaults to the test poll. -->
| option3color = <!-- Color of the first option choice; defaults to #990000, Foundation red. -->
| votepage = <!-- The page at which all of the votes will be accrued. -->
| min_votes = <!-- The minimum number of votes that must accrue before the template begins to display results. Defaults to 10. -->
| break = <!-- If this parameter is non-empty the votebar is split into two to better accommodate lengthier poll options. -->
| overlay = <!-- overlay image; defaults to File:Foundation Logo Transparent.svg. -->
| expiry = <!-- The number of days after which the poll is closed; defaults to 14 days. -->
}}
  • question: Question under consideration in the poll. (required)
  • votepage: Page that the votes will be stored on (required). If in doubt, choose poll location/Votes.
  • option1: Name of the first option, as reported in the legend and in the vote button. Defaults to Yes.
  • option1color = Color of the first option choice; defaults to   , Foundation blue.
  • option2: Name of the second options, as reported in the legend and in the vote button. Defaults to No.
  • option2color: Color of the second option choice; defaults to   , Foundation green.
  • option3: Optional. Name of the third options, as reported in the legend and in the vote button. No default.
  • option3color: Optional. Color of the third option choice; defaults to   , Foundation red (if the third option is enabled at all).
  • minimum: Minimum number of votes that must accrue before the poll will display the visualization; before this many votes are made the poll will tell readers that X more votes are needed based on the size of the deficit. Defaults to 10.
  • break: Set to "yes" to break columns between the buttons to allow longer button names. If this is not set, the template will try and auto-detect a sensible value.
  • expiry: The number of days after which the poll is closed; defaults to 14 days (two publication cycles). Note that is this defined from the day that you create the template not from the day that you actually publish the article!
  • header: Text that goes in the poll header. The default is "Signpost poll".
  • icon: Changes the image that is displayed in the top-right corner of the poll. As used in the Signpost other images are not recommended.
  • overlay: Overlay on the stacked bar chart which produces the template's fancy visualization. By default this is File:Foundation Logo Transparent.svg, a transparent version of the Wikimedia Foundation's logo. With some basic vector editing skills such images are easy to make; requirements for a working overlay are:
    • Square image; the transparent Foundation logo is a vector SVG with native resolution of 1050x1050.
    • Canvas whitespace; The bar chart is not displayed wherever the image canvas is explicitly white.
    • Transparent logo; this is where the chart will be displayed.

Test cases

edit

For test-cases see here.