Template:Votes: Difference between revisions

Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
simplifying counter
mNo edit summary
(simplifying counter)
Line 1: Line 1:
<includeonly>{{#vardefine:Votes|{{{1|}}}}}{{#vardefine:i|0}}{{#vardefine:VotesNum|0}}{{#while:|{{#ifexpr:{{#var:i}}<11|true}}|{{#vardefine:i|{{#expr:{{#var:i}}+1}}}}{{#vardefine:VotesNum|{{#expr:{{#var:VotesNum}}+{{#if:{{#explode:{{#var:Votes}}|*|{{#var:i}}}}|1|0}}}}}}}}{{#var:VotesNum}}</includeonly><noinclude>
<includeonly>{{#vardefine:Votes|{{{1|}}}}}{{#vardefine:i|0}}{{#vardefine:VotesNum|0}}
{{#while:|{{#explode:{{#var:Votes}}|*|{{#var:VotesNum}}}}|{{++|VotesNum}}}}<!--{{#while:|{{#ifexpr:{{#var:i}}<11|true}}|{{#vardefine:i|{{#expr:{{#var:i}}+1}}}}{{#vardefine:VotesNum|{{#expr:{{#var:VotesNum}}+{{#if:{{#explode:{{#var:Votes}}|*|{{#var:i}}}}|1|0}}}}}}}}-->{{#var:VotesNum}}</includeonly><noinclude>
==Purpose==
==Purpose==
This template is used to automatically count the rolling votes in featured content nominations.
This template is used to automatically count the rolling votes in featured content nominations.

Navigation menu