Difference between revisions of "Template:Player anecdotes"

From QBWiki
Jump to navigation Jump to search
m
Line 7: Line 7:
 
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|1}}
 
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|1}}
 
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|2}}}}<!--
 
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|2}}}}<!--
-->{{#ifexpr:{{#var:length}}>2|<nowiki/>
+
-->{{#ifexpr:{{#var:length}}>2|<nowiki/>{{Save|i|j|k}}<!--
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|{{PRNG|{{#time:z}}}}}}
+
-->{{#vardefine:i|{{PRNG|{{#time:z}}}}}}<!--
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|{{PRNG|{{#expr:{{#time:z}}+1}}}}}}
+
-->{{#vardefine:j|{{PRNG|{{#expr:{{#time:z}}+1}}}}}}<!--
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|{{PRNG|{{#expr:{{#time:z}}+2}}}}}}}}</includeonly><noinclude>{{Template doc|
+
-->{{#vardefine:k|{{PRNG|{{#expr:{{#time:z}}+2}}}}}}
Adds a section with consistent formatting listing 3 unique anecdotes from a list at <nowiki>{{CURRENTPAGE}}/anecdotes</nowiki>.
+
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|{{#var:i}}}}
Current behavior is to fetch the list and then pick the ''n'', ''2n'', and ''3n''-th entries, where ''n'' is the current day index. If there are fewer than three, it will omit those bullet points.
+
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|{{#ifeq:{{#var:i}}|{{#var:j}}|{{Add|j|1}}}}{{#var:j}}}}
 +
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|{{#ifeq:{{#var:i}}|{{#var:k}}|{{Add|k|1}}}}{{#ifeq:{{#var:j}}|{{#var:k}}|{{Add|k|1}}}}{{#var:k}}}}}}</includeonly><noinclude>{{Template doc|
 +
Adds a section with consistent formatting listing 3 unique anecdotes from a list at "<nowiki>{{CURRENTPAGE}}/anecdotes</nowiki>".
 +
Current behavior is to fetch the list using and then pick the ''n'', ''2n'', and ''3n''-th entries, where ''n'' is the current day index. If there are fewer than three, it will omit those bullet points.
  
 
<pre>{{Player anecdotes}}</pre>
 
<pre>{{Player anecdotes}}</pre>
 
{{Player anecdotes}}
 
{{Player anecdotes}}
{{Refs}}
 
 
}}</noinclude>
 
}}</noinclude>

Revision as of 21:22, 14 December 2025

Template documentation

Adds a section with consistent formatting listing 3 unique anecdotes from a list at "{{CURRENTPAGE}}/anecdotes". Current behavior is to fetch the list using and then pick the n, 2n, and 3n-th entries, where n is the current day index. If there are fewer than three, it will omit those bullet points.

{{Player anecdotes}}

Anecdotes

Full list: Template:Player anecdotes/anecdotes

  • test16
  • test19
  • test22