Difference between revisions of "Template:Counter2"

From Geohashing
imported>Jevanyn
imported>Jevanyn
Line 3: Line 3:
 
{{#vardefine:countername|counterx{{{1|}}}}}
 
{{#vardefine:countername|counterx{{{1|}}}}}
 
{{#vardefine:{{#var:countername}}|{{#expr:{{#var:{{#var:countername}}|0}}+1}}}}
 
{{#vardefine:{{#var:countername}}|{{#expr:{{#var:{{#var:countername}}|0}}+1}}}}
{{#if:{{#expr:{{#var:echo}}=true}}|{{#var:{{#var:countername}}}}}}
+
{{#ifeq:{{#var:echo}}|true|{{#var:{{#var:countername}}}}}}
{{#if:{{#expr:{{#var:echo}}=token}}|{{{1}}}}}
+
{{#ifeq:{{#var:echo}}|token|{{{1}}}}}
 
</includeonly>
 
</includeonly>

Revision as of 16:54, 16 April 2015

This is a test template, to make something that can count the number of times it can be included on a page. Ultimately I'll be using it on this wiki as well as Wikipedia.