Template:didyouknow

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
(fixing spacing. sorry for all of these edits.)
(removed a bullet point to 1. save space, 2. simplify the coding, 3. spread out the facts longer)
Line 1: Line 1:
<noinclude>A randomized template for the [[HRWiki:Main page redesign|new Main Page]]. Facts are stored on {{t|didyouknow facts}}. For each bullet point, the template picks a random number. If two numbers are the same, a number is picked from outside of the usual range, corresponding to the bullet point, meaning no fact will be repeated. Additionally, the first bullet point is programmed to pull from a separate list of pictured facts.</noinclude>
<noinclude>A randomized template for the [[HRWiki:Main page redesign|new Main Page]]. Facts are stored on {{t|didyouknow facts}}. For each bullet point, the template picks a random number. If two numbers are the same, a number is picked from outside of the usual range, corresponding to the bullet point, meaning no fact will be repeated. Additionally, the first bullet point is programmed to pull from a separate list of pictured facts.</noinclude>
-
{{#resetcount:rando1|{{#rand:1|{{didyouknow facts|image|}}}}}}{{#resetcount:rando2|{{#rand:1|{{#expr:{{didyouknow facts|}}-3}}}}}}{{#resetcount:rando3|{{#rand:1|{{#expr:{{didyouknow facts|}}-3}}}}}}{{#resetcount:rando4|{{#rand:1|{{#expr:{{didyouknow facts|}}-3}}}}}}{{#resetcount:rando5|{{#rand:1|{{#expr:{{didyouknow facts|}}-3}}}}}}{{#ifeq:{{#count:rando2|0}}|{{#count:rando3|0}}|{{#resetcount:rando2|{{#expr:{{didyouknow facts|}}-2}}}}|}}{{#ifeq:{{#count:rando2|0}}|{{#count:rando4|0}}|{{#resetcount:rando2|{{#expr:{{didyouknow facts|}}-2}}}}|}}{{#ifeq:{{#count:rando2|0}}|{{#count:rando5|0}}|{{#resetcount:rando2|{{#expr:{{didyouknow facts|}}-2}}}}|}}{{#ifeq:{{#count:rando3|0}}|{{#count:rando4|0}}|{{#resetcount:rando3|{{#expr:{{didyouknow facts|}}-1}}}}|}}{{#ifeq:{{#count:rando3|0}}|{{#count:rando5|0}}|{{#resetcount:rando3|{{#expr:{{didyouknow facts|}}-1}}}}|}}{{#ifeq:{{#count:rando4|0}}|{{#count:rando5|0}}|{{#resetcount:rando4|{{didyouknow facts|}}}}|}}
+
{{#resetcount:rando1|{{#rand:1|{{didyouknow facts|image|}}}}}}{{#resetcount:rando2|{{#rand:1|{{#expr:{{didyouknow facts|}}-3}}}}}}{{#resetcount:rando3|{{#rand:1|{{#expr:{{didyouknow facts|}}-3}}}}}}{{#resetcount:rando4|{{#rand:1|{{#expr:{{didyouknow facts|}}-3}}}}}}
{{didyouknow facts|image|{{#count:rando1}}}}
{{didyouknow facts|image|{{#count:rando1}}}}
*{{didyouknow facts|{{#count:rando2}}}}
*{{didyouknow facts|{{#count:rando2}}}}
*{{didyouknow facts|{{#count:rando3}}}}
*{{didyouknow facts|{{#count:rando3}}}}
*{{didyouknow facts|{{#count:rando4}}}}
*{{didyouknow facts|{{#count:rando4}}}}
-
*{{didyouknow facts|{{#count:rando5}}}}
 

Revision as of 04:02, 4 September 2020

A randomized template for the new Main Page. Facts are stored on {{didyouknow facts}}. For each bullet point, the template picks a random number. If two numbers are the same, a number is picked from outside of the usual range, corresponding to the bullet point, meaning no fact will be repeated. Additionally, the first bullet point is programmed to pull from a separate list of pictured facts.

"I'd like to clean his clock."
Personal tools