Template:CitePoll/doc: Difference between revisions

From RuneRealm Wiki
Jump to navigation Jump to search
Content added Content deleted
(Created page with "{{Documentation}} __NOTOC__ {{invokes|References}} ==Usage== <pre>{{CitePoll|url=|poll=|question=|polldate=|notes=|name=}}</pre> ===url=== The full URL of the poll, including <code>http://</code> ===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 <code>question=no</code> - this removes a maintenance category. ===Polldate=== Date the poll was opened. {{References st...")
 
No edit summary
Tag: Reverted
Line 1: Line 1:
{{Documentation}}
{{documentation}}

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

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

<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>


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


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


For a note:
===question===
<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>
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.


{{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.}}
===Polldate===
Date the poll was opened.


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

Revision as of 00:41, 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.
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

This template can be used by entering the following code.

{{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 -->
}}

For example:

{{Poll|Question=Do you want to understand this template?|Answer1=Yes|Votes1=8000|Answer2=No|Votes2=2000}}
Do you want to understand this template?
Yes80% (8,000 votes)
No20% (2,000 votes)

For more answers:

{{Poll|Question=Do you want to add more answers?|Answer1=Yes|Votes1=8000|Answer2=No|Votes2=1500|Answer3=Skip question|Votes3=500}}
Do you want to add more answers?
Yes84.2% (8,000 votes)
No15.8% (1,500 votes)
Skip question500 votes

This template currently supports up to 20 answers per question.

For a note:

{{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.}}
Do you want to add a note?
Yes33.3% (8,000 votes)
From time to time33.3% (8,000 votes)
Occasionally33.3% (8,000 votes)
Note: This is a multiple-choice question.