Template:Votes: Difference between revisions

From Zelda Dungeon Wiki
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
mNo edit summary
(should fix inputs with operators causing errors)
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#switch:{{lc:{{{1|}}}}}
<onlyinclude><includeonly>{{#vardefine:VotesNum|0}}{{#while:|{{NotEmpty|{{#explode:{{N}}
|start={{((}}#tag:vardefine{{!}}SupportVotes{{!}}
{{{1|}}}|{{N}}
|end={{))}}{{#vardefine:i|0}}{{#vardefine:SupportVotesNum|0}}{{#while:|{{#ifexpr:{{#var:i}}<11|true}}|{{#vardefine:i|{{#expr:{{#var:i}}+1}}}}{{#vardefine:SupportVotesNum|{{#expr:{{#var:SupportVotesNum}}+{{#if:{{#explode:{{#var:SupportVotes}}|*|{{#var:i}}}}|1|0}}}}}}}}
#|{{++|VotesNum}}}}}}|}}{{--|VotesNum}}</includeonly></onlyinclude>
}}
==Purpose==
This template is used to automatically count the rolling votes in featured content nominations.
 
==Usage==
Using this template properly requires a certain formatting to be put in place when setting up a new nomination, after which, it'll function on its own so long as new votes are put in the proper locations. This formatting is added to a nomination below the introductory post with the code:
 
<pre>{{subst:Votes/Template}}</pre>
 
This code can also be found in the edittools box when editing a nomination page.
 
 
{{Cat|Formatting Templates}}

Latest revision as of 19:57, April 24, 2014

Purpose

This template is used to automatically count the rolling votes in featured content nominations.

Usage

Using this template properly requires a certain formatting to be put in place when setting up a new nomination, after which, it'll function on its own so long as new votes are put in the proper locations. This formatting is added to a nomination below the introductory post with the code:

{{subst:Votes/Template}}

This code can also be found in the edittools box when editing a nomination page.