Difference between revisions of "Template:List lookup helper"

From QBWiki
Jump to navigation Jump to search
m
m
 
Line 32: Line 32:
  
 
<pre>
 
<pre>
{{:Matt Bollinger/anecdotes}}
 
 
{{List lookup helper|Matt Bollinger/anecdotes}}
 
{{List lookup helper|Matt Bollinger/anecdotes}}
 
{{#var:cleaned_page}}
 
{{#var:cleaned_page}}
 
{{#var:length}}, {{#var:invocations}}
 
{{#var:length}}, {{#var:invocations}}
 
 
{{Save|jj}}
 
{{Save|jj}}
{{#loop:jj|1|{{#var:length}}|{{#var:entry_{{#var:jj}}}}<br/>}}
+
{{#loop:jj|1|{{#var:length}}|<nowiki/>
{{Load|jj}}
+
* {{#var:entry_{{#var:jj}}}}
 +
}}
 
</pre>
 
</pre>
  
Line 45: Line 44:
 
{{#var:cleaned_page}}
 
{{#var:cleaned_page}}
 
{{#var:length}}, {{#var:invocations}}
 
{{#var:length}}, {{#var:invocations}}
 
 
{{Save|jj}}
 
{{Save|jj}}
{{#loop:jj|1|{{#var:length}}|{{#var:entry_{{#var:jj}}}}<br/>}}
+
{{#loop:jj|1|{{#var:length}}|<nowiki/>
 +
* {{#var:entry_{{#var:jj}}}}
 +
}}
 
{{Load|jj}}
 
{{Load|jj}}
 
}}</noinclude>
 
}}</noinclude>

Latest revision as of 20:03, 20 December 2025

Template documentation

Given a list page, loads it exactly once and sets up enough variables it will not need to be loaded again to retrieve any entry. If this template has been invoked before with the same page_name, no-op.

  • page_name - the page name provided as arg1
  • length - the length of the list
  • entry_i - the entry in the list at position i, where i is in [1, length-1] (0-indexed)

If using the default case (<1000 total characters), the following will be set:

  • loaded_page - the text of page_name
  • cleaned_page - the text of page_name before the first section header ("==")

There is also the housekeeping variable "invocations", which equals the number of times this template was resolved and should thus always be 1.

Implementation is split between List lookup helper/default case and List lookup helper/sublist case.

{{List lookup helper|Matt Bollinger/anecdotes}}
{{#var:cleaned_page}}
{{#var:length}}, {{#var:invocations}}
{{Save|jj}}
{{#loop:jj|1|{{#var:length}}|<nowiki/>
* {{#var:entry_{{#var:jj}}}}
}}


5, 1

  • Matt is the best known user of the phrase "that's a word", which he directed towards moderator Mike Sorice while playing a bonus part on "hapticity" in the NSC All-Star Round.
  • The answerline of "zeppelins" was briefly a facetious benchmark of absurd difficulty after Matt insisted that a NASAT tossup on zeppelins written by Mike Cheyne was extremely difficult to answer.
  • At one point Carsten Gehring and Mike Cheyne referred to the duo of Bollinger and Evan Adams as "Rizzoli and Isles" respectively in reference to the unpopular TNT program - an attempt to find other quizbowlers to fit the similarly-titled TNT show Franklin & Bash was inconclusive.
  • Matt's involvement in a long argument about a NASAT tossup on the United States-Canada border spawned the parodic phrase "true knowledge of the Pig War" to describe the question's failure to reward Jacob Wasserman's "real knowledge".
  • Matt has been noted for his tendency to blush, a fact he was unaware of until an IRC conversation in which he claimed not to know what his own face looks like.