Template:Poll aux: Difference between revisions

From Pikipedia, the Pikmin wiki
Jump to navigation Jump to search
(Might as well center this too.)
m (Changed the older polls link.)
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly><center>{{#if:{{{max|}}}|''You may select up to {{{max}}} options.''<br>}}
<includeonly>{{#if:{{{max|}}}|''You may select up to {{{max}}} options.''<br>}}
{{#tag:polldaddy||pollid={{{id}}}}}</center>
<div style="margin-top:5px">{{#widget:Crowdsignal|id={{{id|}}}}}</div>
<div style="align: left; margin: auto; font-size: 7pt;">({{tt|Not showing?|If you cannot see the poll, consider disabling any ad-blocking extension on Pikipedia. Alternately, click the link to the right to be taken to the poll page.}} <span class="plainlinks">[https://polldaddy.com/poll/{{{id}}} [Link<nowiki>]</nowiki>]</span>)</div>
<div style="font-size: 8pt; text-align: center;">({{tt|Not showing?|If you cannot see the poll, consider disabling any ad-blocking extensions on Pikipedia. Alternately, click the link to the right to be taken to the poll page.}} <span class="plainlinks">[https://poll.fm/{{{id}}} [Link<nowiki>]</nowiki>]</span>)</div>
 
{{#if:{{{prevtitle|}}}|
{| style="margin: auto;"
{{{!}} style="margin: 0 auto 10px; border: 1px rgba(96, 128, 96, 128) solid; border-radius: 8px; text-align: center;"
! Previous poll
! Previous poll
|-
{{!}}-
| [[Pikipedia:Poll#{{{psection|{{{ptitle}}}}}}|{{{ptitle}}}]]
{{!}} [[Pikipedia:Poll/older polls#{{anchorencode:{{{prevtitle}}}}}|{{{prevtitle}}}]]
|-
{{!}}-
| Winner: '''{{{pwinner}}}''' ({{{pwinnerp}}}% votes out of {{{poptions}}} options)
{{!}} Winner: '''{{{prevwinner}}}''' ({{{prevwinnerp}}}% votes out of {{{prevoptions}}} options)
|}</includeonly><noinclude>
{{!}}}
}}</includeonly><noinclude>


This template populates the poll data to be used on [[Template:Poll]]. It is only an auxiliary template that makes it easier to update to a new poll.
==Info==
This template populates the poll data to be used on [[Template:Poll]]. It is only an auxiliary template that makes it easier to update to a new poll, since this way, the editor doesn't have to find what to replace in the middle of Template:Poll's code.


{| class="wikitable"
{| class="wikitable"
Line 17: Line 19:
|-
|-
! id
! id
| '''Yes''' ||  || Poll ID used on polldaddy.com.
| '''Yes''' ||  || Poll ID used on crowdsignal.com.
|-
|-
! max
! max
| No ||  || If specified, this is the maximum number of options the user can pick.
| No ||  || If specified, this is the maximum number of options the user can pick.
|-
|-
! ptitle
! prevtitle
| '''Yes''' ||  || Title of the previous poll.
| No ||  || Title of the previous poll.
|-
! psection
| No ||  || Name of the previous poll's section on [[Pikipedia:Poll]]. Use this when the title has italics (because the section name doesn't technically have italics in it). If not specified, it'll be the same as {{{ptitle}}}.
|-
|-
! pwinner
! prevwinner
| '''Yes''' ||  || Winner of the previous poll.
| No ||  || Winner of the previous poll.
|-
|-
! pwinnerp
! prevwinnerp
| '''Yes''' ||  || Percentage of votes that the winner of the previous poll got.
| No ||  || Percentage of votes that the winner of the previous poll got.
|-
|-
! poptions
! prevoptions
| '''Yes''' ||  || Number of options that the previous poll had.
| No ||  || Number of options that the previous poll had.
|}
|}


Line 41: Line 40:
<pre>
<pre>
{{poll aux
{{poll aux
|id       =  
|id         =  
|max     =  
|max         =  
|ptitle   =  
|prevtitle   =  
|psection =
|prevwinner =  
|pwinner =  
|prevwinnerp =  
|pwinnerp =  
|prevoptions =  
|poptions =  
}}
}}
</pre>
</pre>


[[Category:Utility templates]]
[[Category:Utility templates]]</noinclude>
</noinclude>

Latest revision as of 03:37, April 14, 2024


Info

This template populates the poll data to be used on Template:Poll. It is only an auxiliary template that makes it easier to update to a new poll, since this way, the editor doesn't have to find what to replace in the middle of Template:Poll's code.

Parameter Mandatory Default Detailed description
id Yes Poll ID used on crowdsignal.com.
max No If specified, this is the maximum number of options the user can pick.
prevtitle No Title of the previous poll.
prevwinner No Winner of the previous poll.
prevwinnerp No Percentage of votes that the winner of the previous poll got.
prevoptions No Number of options that the previous poll had.

Skeleton

{{poll aux
|id          = 
|max         = 
|prevtitle   = 
|prevwinner  = 
|prevwinnerp = 
|prevoptions = 
}}