Difference between revisions of "Template:Quick links smart in-jokes"

From QBWiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{#vardefine:index|{{{1|1}}}}}{{#if:{{Quick links in-jokes|{{#var:index}}}}
+
{{#vardefine:index|{{{1|1}}}}}{{Add|index|1}}{{#if:{{Quick links in-jokes|{{#var:index}}}}
 
|{{Quick links in-jokes|{{#var:index}}}}
 
|{{Quick links in-jokes|{{#var:index}}}}
 
|{{#vardefine:minindex|{{#var:index}}}}{{#vardefine:maxindex|1}}<!--
 
|{{#vardefine:minindex|{{#var:index}}}}{{#vardefine:maxindex|1}}<!--
Line 12: Line 12:
 
}}{{#vardefine:adjusted_index|{{#expr:({{{1|1}}} mod {{#var:index}})}}}}{{#ifexpr:{{#var:adjusted_index}}=0|{{#vardefine:adjusted_index|{{#var:index}}}}}}{{Quick links in-jokes|{{#var:adjusted_index}}}}
 
}}{{#vardefine:adjusted_index|{{#expr:({{{1|1}}} mod {{#var:index}})}}}}{{#ifexpr:{{#var:adjusted_index}}=0|{{#vardefine:adjusted_index|{{#var:index}}}}}}{{Quick links in-jokes|{{#var:adjusted_index}}}}
 
}}<noinclude>
 
}}<noinclude>
 +
 
Incremental improvement on [[Template:Quick links in-jokes]]
 
Incremental improvement on [[Template:Quick links in-jokes]]
  

Latest revision as of 15:59, 1 January 2023

Interested in the significance of capybaras?

Incremental improvement on Template:Quick links in-jokes

When index i <= # of in-jokes quips, return quip straight away. If i > #, it'll wrap around (mod #).

Index Quip
1 Interested in the significance of capybaras? Test sentence
2 Ever notice how frequently quizbowlers use the verb "barge"? Test sentence
3 Ever notice how frequently quizbowlers use the verb "barge"? Test sentence