Difference between revisions of "Template:Player anecdotes"

From QBWiki
Jump to navigation Jump to search
m
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Anecdotes==
+
<includeonly>==Anecdotes==
{{#ifexist:{{FULLPAGENAME}}/anecdotes
+
:''Full list: [[{{FULLPAGENAME}}/anecdotes|here]]''
|{{#vardefine:ii|{{#time:z}}}}
+
{{List lookup helper|{{FULLPAGENAME}}/anecdotes}}<!--
{{#vardefine:size|{{Size|Anecdote}}}}
+
-->{{#ifexpr:{{#var:length}}=1|<nowiki/>
:''Full list: [[{{FULLPAGENAME}}/anecdotes]]''
+
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|1}}}}<!--
* {{Smart lookup|Anecdote|{{#var:ii}}}}
+
-->{{#ifexpr:{{#var:length}}=2|<nowiki/>
{{#ifexpr:{{#var:size}}>1|{{#vardefine:jj|{{#expr:2*{{#time:z}}}}}}{{#ifexpr:({{#var:jj}} mod {{#var:size}})={{#var:ii}}|{{Add|jj|1}}}}
+
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|1}}
* {{Smart lookup|Anecdote|{{#var:jj}}}}
+
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|2}}}}<!--
}}
+
-->{{#ifexpr:{{#var:length}}=3|<nowiki/>
{{#ifexpr:{{#var:size}}>2|{{#vardefine:kk|{{#expr:3*{{#time:z}}}}}}{{#ifexpr:({{#var:kk}} mod {{#var:size}})={{#var:ii}}|{{Add|kk|1}}}}{{#ifexpr:({{#var:kk}} mod {{#var:size}})={{#var:jj}}|{{Add|kk|1}}}}
+
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|1}}
* {{Smart lookup|Anecdote|{{#var:kk}}}}
+
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|2}}
}}
+
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|3}}}}<!--
|''There are no anecdotes for this player - add some at [[{{FULLPAGENAME}}/anecdotes]]''
+
-->{{#ifexpr:{{#var:length}}>3|<nowiki/>{{Save|i|j|k}}<!--
}}
+
-->{{#vardefine:i|{{PRNG|{{#time:z}}|{{#var:length}}}}}}<!--
 +
-->{{#vardefine:j|{{PRNG|{{#expr:{{#time:z}}+1}}|{{#var:length}}}}}}<!--
 +
-->{{#vardefine:k|{{PRNG|{{#expr:{{#time:z}}+2}}|{{#var:length}}}}}}
 +
* {{Smart lookup|{{FULLPAGENAME}}/anecdotes|{{#var:i}}}}
 +
* {{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.
 +
 
 +
'''NOTE:''' Currently refs are not supported in lists, including anecdote pages.
 +
 
 +
<pre>{{Player anecdotes}}</pre>
 +
{{Player anecdotes}}
 +
}}</noinclude>

Latest revision as of 21:58, 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.

NOTE: Currently refs are not supported in lists, including anecdote pages.

{{Player anecdotes}}

Anecdotes

Full list: here

  • test15
  • test18
  • test21