Template:CitePoll/doc: Difference between revisions

From RuneRealm Wiki
Jump to navigation Jump to search
Content added Content deleted
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
 
Line 1: Line 1:
{{documentation}}
{{Documentation}}
__NOTOC__

{{invokes|References}}
:''Not to be confused with [[Template:Old School RuneScape Wiki/Poll]]''

This template provides formatting for poll results for use in Old School Content Poll mw.pages. This automatically ignores answer votes for percentage calculation for answers with the names Skip question and Skip.

==Usage==
==Usage==
<pre>{{CitePoll|url=|poll=|question=|polldate=|notes=|name=}}</pre>
This template can be used by entering the following code.

<pre>
{{Poll
|Question <-- The question text on the poll -->
|AnswerX <-- The answer text on the poll -->
|VotesX <-- The number of votes for an answer -->
|Note <-- Additional notes for the question -->
}}
</pre>

For example:
<pre>{{Poll|Question=Do you want to understand this template?|Answer1=Yes|Votes1=8000|Answer2=No|Votes2=2000}}</pre>

{{Poll|Question=Do you want to understand this template?|Answer1=Yes|Votes1=8000|Answer2=No|Votes2=2000}}

For more answers:
<pre>{{Poll|Question=Do you want to add more answers?|Answer1=Yes|Votes1=8000|Answer2=No|Votes2=1500|Answer3=Skip question|Votes3=500}}</pre>


===url===
{{Poll|Question=Do you want to add more answers?|Answer1=Yes|Votes1=8000|Answer2=No|Votes2=1500|Answer3=Skip question|Votes3=500}}
The full URL of the poll, including <code>http://</code>


===poll===
This template currently supports up to 20 answers per question.
Name of the poll being cited.


===question===
For a note:
Number of the question being cited. Do not use names. If the poll only has a single question, use <code>question=no</code> - this removes a maintenance category.
<pre>{{Poll|Question=Do you want to add a note?|Answer1=Yes|Votes1=8000|Answer2=From time to time|Votes2=8000|Answer3=Occasionally|Votes3=8000|Note=This is a multiple-choice question.}}</pre>


===Polldate===
{{Poll|Question=Do you want to add a note?|Answer1=Yes|Votes1=8000|Answer2=From time to time|Votes2=8000|Answer3=Occasionally|Votes3=8000|Note=This is a multiple-choice question.}}
Date the poll was opened.


{{References standard parameters}}
<includeonly>[[Category:Formatting templates|{{PAGENAME}}]]</includeonly>
{{citations}}
<includeonly>[[Category:Reference templates]]</includeonly>

Latest revision as of 11:32, 17 October 2024

This is a documentation subpage for Template:CitePoll.
It contains usage information, categories, and other content that is not part of the original template page.
Template:CitePoll invokes function pollref in Module:References using Lua.
Template:CitePoll invokes Module:References using Lua.

Usage

{{CitePoll|url=|poll=|question=|polldate=|notes=|name=}}

url

The full URL of the poll, including http://

poll

Name of the poll being cited.

question

Number of the question being cited. Do not use names. If the poll only has a single question, use question=no - this removes a maintenance category.

Polldate

Date the poll was opened.

Standard parameters

The following parameters are standard across all citation templates.

notes

Optional. This parameter allows you to add text beginning one space after the end of the citation. Having no formatting (meaning you will have to format it yourself), this area can be used for anything you require.

name

Optional. If you want to use this reference more than once, you must name it the first time you use it, then whenever you want to use it again, add {{NamedRef|name}} wherever you want it to re-appear.

group

Optional. This can be used to put the reference into a specific group, to separate it from other types of reference. See here for more on reference groups.