Difference between revisions of "Templates"

From QBWiki
Jump to navigation Jump to search
 
(36 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
Put the code for all useful '''templates''' on here in the manner I have done.
 
Put the code for all useful '''templates''' on here in the manner I have done.
  
==Template:Infobox (template for quizbowl player pages)==
+
=Boxes=
 
+
==Template:Infobox==
:''See [[Matt Weiner]]''
 
 
 
 
{{Infobox|Name = Name
 
{{Infobox|Name = Name
 
|Image = Image
 
|Image = Image
Line 11: Line 9:
 
|schoolpast = schoolpast
 
|schoolpast = schoolpast
 
|highschool = highschool
 
|highschool = highschool
| }}
+
|naqtstats = naqtstats
 +
}}
 +
Template for quizbowl player pages.<br>
 +
[[Template:Infobox]]
 +
:''See: [[Matt Weiner]]''
 +
<br><br><br><br><br><br><br>
  
==Template:Pic (template for a picture with a caption)==
+
==Template:Coachbox==
 +
{{Coachbox
 +
|Name=Name
 +
|Image=Image (optional)
 +
|currentschool=currentschool
 +
|schoolpast=schoolpast
 +
|colpast=colpast
 +
|hspast=hspast
 +
}}
 +
Template for coaches.<br>
 +
[[Template:Coachbox]]
 +
:''See: [[John Barnes]]''
 +
{{-}}
  
:''See [[Negstorm]]''
+
==Template:Infobox question set==
 +
{{Infobox question set
 +
| Name        = Name
 +
| AltNames    = AltNames (optional)
 +
| Season      = Season
 +
| Series    = Series (optional)
 +
| School    = School (optional)
 +
| HeadEd      = HeadEd
 +
| Difficulty  = Difficulty
 +
| First        = First
 +
| Announcement = Announcement
 +
| Packets = Packets
 +
}}
 +
Template for question sets. For college nationals with undergrad championships, [[Templates#Template:Collegiate Nat Tourneybox|Collegiate Nat Tourneybox]] is recommended.<br>
 +
[[Template:Infobox question set]]
 +
<br><br><br><br><br><br><br><br><br><br>
  
 +
==Template:Pic==
 
{{Pic|Image = Image
 
{{Pic|Image = Image
 
|Caption = Caption
 
|Caption = Caption
| }}
+
}}
 
 
==Template:Collegebox (template for use on college club pages)==
 
  
:''See [[Harvard]]''
+
Template for a picture with a caption.<br>
 +
[[Template:Pic]]
 +
:''See: [[Negstorm]]''
 +
<br>
  
 +
==Template:Collegebox==
 
{{Collegebox|College Name = College Name
 
{{Collegebox|College Name = College Name
 
|Image = Image
 
|Image = Image
Line 30: Line 63:
 
|president = president
 
|president = president
 
|nats = nats
 
|nats = nats
 +
|website = https://www.google.com
 
| }}
 
| }}
 +
Template for use on college club pages.<br>
 +
[[Template:Collegebox]]
 +
:''See: [[Harvard]]''
 +
<br><br><br><br><br>
  
==Template:Tourneybox (template for use on pages for concluded tournament pages)==
+
==Template:Highschoolteam==
 
+
{{Highschoolteam|Name = Name
:''See [[2007 ACF Nationals]]
+
|image = image
 +
|citystate = citystate
 +
|currentpres = currentpres
 +
|currentcoach = currentcoach
 +
|state = state
 +
|nats = nats
 +
|nats appearances = nats appearances
 +
|status = status
 +
|size = size
 +
|website = https://www.google.com
 +
| }}
 +
Template for use on high-school club pages.<br>
 +
[[Template:Highschoolteam]]
 +
:''See: [[Ladue]]''
 +
{{-}}
  
 +
==Template:Tourneybox==
 
{{Tourneybox|Tournament Name = Tournament Name
 
{{Tourneybox|Tournament Name = Tournament Name
 
|champion = champion
 
|champion = champion
Line 46: Line 99:
 
| }}
 
| }}
  
==Template: Tourneybox short (template for tournaments listing only first and second place)==
+
Template for use on pages for concluded tournaments.<br>
 +
[[Template:Tourneybox]]
 +
:''See: [[2007 ACF Nationals]]
 +
<br><br><br><br><br><br><br><br>
  
 +
==Template:College Nat Tourneybox==
 +
{{College Nat Tourneybox|Tournament Name = Tournament Name
 +
|champion = champion
 +
|second = second
 +
|third = third (optional)
 +
|fourth = fourth (optional)
 +
|scorer = scorer
 +
|undergrad = undergrad (optional)
 +
|undergradsecond = undergradsecond (optional)
 +
|undergradscorer = undergradscorer (optional)
 +
|dii = dii (optional)
 +
|diisecond = diisecond (optional)
 +
|site = site
 +
|field = field
 +
|stats = stats
 +
}}
 +
 +
Template for use on pages for concluded collegiate national championships.<br>
 +
[[Template:College Nat Tourneybox]]
 +
:''See: [[2017 ICT]]''
 +
<br><br><br><br><br><br><br><br><br><br><br><br>
 +
 +
==Template: Tourneybox short==
 
{{Tourneybox short|Tournament Name = Tournament Name
 
{{Tourneybox short|Tournament Name = Tournament Name
 
|champion = champion
 
|champion = champion
 
|runner-up = runner-up
 
|runner-up = runner-up
 
|site = site
 
|site = site
 +
|date = date
 
| }}
 
| }}
  
==Template:Upcoming (template for use on pages for upcoming tournaments)==
+
Template for tournaments listing only first and second place.<br>
 
+
[[Template:Tourneybox short]]
:''See [[2008 ACF Nationals]]''
+
:''No known examples''
 +
<br><br>
  
 +
==Template:Upcoming==
 
{{Upcoming|Tournament Name = Tournament Name
 
{{Upcoming|Tournament Name = Tournament Name
 
|date = date
 
|date = date
Line 72: Line 154:
 
| }}
 
| }}
  
==Template:Succession_box (for use on year-by-year team pages for teams who have won a particular tournament)==
+
Template for use on pages for upcoming tournaments.<br>
 +
[[Template:Upcoming]]
 +
:''No known examples''
 +
<br><br><br><br><br><br><br><br><br><br><br>
  
 +
==Template:Succession_box==
 +
For use on year-by-year team pages for teams who have won a particular tournament.<br>
 +
[[Template:Succession_box]]
 
:''See: [[2006 Byram Hills]]
 
:''See: [[2006 Byram Hills]]
  
Line 82: Line 170:
 
| }}
 
| }}
  
==Template:Browse box (for use on year-by-year concluded tournament pages)==
+
==Template:Browse box==
 
+
For use on year-by-year concluded tournament pages.<br>
 +
[[Template:Browse box]]
 
:''See: [[2007 NAC]]
 
:''See: [[2007 NAC]]
  
Line 91: Line 180:
 
| }}
 
| }}
  
==Template:Companybox (template for use on company pages)==
+
==Template:Companybox==
 
 
:''See [[Olympia Academic Competition Questions]]''
 
 
 
 
{{Companybox|Company Name = Company Name
 
{{Companybox|Company Name = Company Name
 
|Image = Image
 
|Image = Image
 
|president = president
 
|president = president
 
|citystate = citystate
 
|citystate = citystate
 +
|status = status
 
| }}
 
| }}
 +
Template for use on company pages.<br>
 +
[[Template:Companybox]]
 +
:''See: [[Play Quiz Bowl]]''
 +
{{-}}
 +
 +
==Template:Left/Right quote box==
 +
{{Left quote box|Template for embedding quotes in a box on the left.<br/>
 +
[[Template:Left quote box]]}}
 +
 +
{{Right quote box|Template for embedding quotes in a box on the right.<br/>
 +
[[Template:Right quote box]]}}
 +
{{-}}
 +
{{Center quote box|Template for embedding quotes in a box in the middle.<br/>
 +
[[Template:Center quote box]]}}
 +
 +
{{-}}
 +
 +
=Brackets=
 +
==Template:SuperSeven(A/B)==
 +
{{SuperSevenA}}
 +
{{SuperSevenB}}
 +
Templates for the [[NAQT]] Super Seven playoff format. [[Template:SuperSevenA]] is for when the undefeated team wins their semi, while [[Template:SuperSevenB]] is for when they lose it.<br/>
 +
 +
=General Use=
 +
==Template:If==
 +
An if/then statement with optional else based on whether test parameter is null or not.<br>
 +
[[Template:If]]
 +
<pre>{{if
 +
  |test=VARIABLE_OR_PARAMETER_TO_TEST
 +
  |then=code if 'test' is not empty
 +
  |else=code if 'test' is empty (optional)
 +
}}</pre>
 +
 +
This is no longer necessary, as it exactly replicates the behavior of <nowiki>{{#if:test||}}</nowiki>.
 +
 +
==Template:Tl==
 +
Template for a shortened link to a template's page that can be transcluded.<br>
 +
{{Tl|Tl}}
 +
 +
==Template:dot==
 +
Template for a dot.<br>
 +
[[Template:dot]]<br>
 +
{{dot}}
 +
 +
==Template:!/!-==
 +
Templates for inserting a | or |- inside of another template. Useful for adding optional rows to a table. Examples of "magic words" built into MediaWiki. For more detail, see [https://www.mediawiki.org/wiki/Help:Tables MediaWiki Tables].
 +
 +
<pre>|-
 +
{{if|test={{{variable_x|}}}
 +
|then={{!-}}
 +
{{!}}'''optional_row_name''' {{!}}{{!}} {{{variable_x|}}}
 +
}}
 +
|-</pre>
 +
 +
In this example, the if statement checks if the variable_x has been assigned a value and then adds in an optional row (shown below) to the table with variable_x as a parameter. Because additional row enders ("|-") can be added without changing the formatting, it is recommended that you wrap any optional rows created this way with |-.
 +
 +
<pre>|-
 +
|-
 +
|'''optional_row_name''' || {{{variable_x|}}}
 +
|-</pre>
 +
 +
==Template:Placement row/cell==
 +
Templates for giving gold/silver/bronze color to either a row or a cell. The template for cells is a little finicky.
 +
 +
[[Template:Placement row]]{{dot}} [[Template:Placement cell]]
 +
 +
==Template:Create if absent==
 +
A template for either transcluding the contents of a page as-is or displaying a message indicating that it doesn't exist.
 +
 +
[[Template:Create if absent]]
 +
 +
==Template:Non-zero number==
 +
For displaying a number (technically any text, since this is not enforced) and giving a blank when it is zero.
 +
 +
[[Template:Non-zero number]]
  
 
[[Category:Wiki maintenance]]
 
[[Category:Wiki maintenance]]
 
[[Category:Original QBWiki Page]]
 
[[Category:Original QBWiki Page]]

Latest revision as of 18:26, 4 December 2023

Put the code for all useful templates on here in the manner I have done.

Boxes

Template:Infobox

Name
200px
Noted subjects Subjects
Current college schoolcur
Past colleges schoolpast
High school highschool
Stats HDWhite • naqtstats

Template for quizbowl player pages.
Template:Infobox

See: Matt Weiner








Template:Coachbox

Name
File:Image (optional)
Current Team Coached currentschool
Past Teams Coached schoolpast
College colpast
High School hspast
Stats HDWhite
NAQT page

Template for coaches.
Template:Coachbox

See: John Barnes


Template:Infobox question set

Name
AltNames (optional)
Competition season Season
Series Series (optional)
School(s) School (optional)
Head editor(s) HeadEd
Difficulty Difficulty
First mirror First
Announcement [Announcement link]
Packets [Packets link]

Template for question sets. For college nationals with undergrad championships, Collegiate Nat Tourneybox is recommended.
Template:Infobox question set









Template:Pic

300px
Above:
Caption

Template for a picture with a caption.
Template:Pic

See: Negstorm


Template:Collegebox

College Name
200px
Location:
citystate
Current President or Coach president
National championships nats
NAQT Page link
Website link

Template for use on college club pages.
Template:Collegebox

See: Harvard






Template:Highschoolteam

Name
250px
Location:
citystate
Club Presidents currentpres
Coaches currentcoach
State Championships state
National Championships nats
National Appearances nats appearances
Program Status status
School Size size
NAQT Page link
Website link

Template for use on high-school club pages.
Template:Highschoolteam

See: Ladue


Template:Tourneybox

Tournament Name
Edited by editors
Champion champion
Runner-up second
Third third
Fourth fourth
High scorer scorer
Site site
Field
Stats


Template for use on pages for concluded tournaments.
Template:Tourneybox

See: 2007 ACF Nationals









Template:College Nat Tourneybox

Tournament Name
Champion champion
Runner-up second
Third third (optional)
Fourth fourth (optional)
High scorer scorer
Undergrad Champion undergrad (optional)
Undergrad Runner-up undergradsecond (optional)
Undergrad High scorer undergradscorer (optional)
DII Champion dii (optional)
DII Runner-up diisecond (optional)
Site site
Field field
Stats stats

Template for use on pages for concluded collegiate national championships.
Template:College Nat Tourneybox

See: 2017 ICT













Template: Tourneybox short

Tournament Name
Champion champion
Runner-up runner-up
Site site
Date date

Template for tournaments listing only first and second place.
Template:Tourneybox short

No known examples



Template:Upcoming

Tournament Name
Date date
Time time
Location location
Editor editor
Contact: email
Format format
First Discount Deadline deadline1
Second Discount Deadline deadline2
No Packet Penalty Deadline deadline3
First Penalty Deadline deadline4
Second Penalty Deadline deadline5

Template for use on pages for upcoming tournaments.
Template:Upcoming

No known examples












Template:Succession_box

For use on year-by-year team pages for teams who have won a particular tournament.
Template:Succession_box

See: 2006 Byram Hills
Tournament Champion
Preceded by
Year
Succeeded by
previous
year
next

Template:Browse box

For use on year-by-year concluded tournament pages.
Template:Browse box

See: 2007 NAC
Tournament
Previous
Next
previous
next

Template:Companybox

Company Name
200px
President or CEO president
Location: citystate
Status status

Template for use on company pages.
Template:Companybox

See: Play Quiz Bowl


Template:Left/Right quote box

Template for embedding quotes in a box on the left.

Template:Left quote box

Template for embedding quotes in a box on the right.

Template:Right quote box


Template for embedding quotes in a box in the middle.

Template:Center quote box


Brackets

Template:SuperSeven(A/B)

  Quarterfinals     Semifinals     Advantaged Finals
Unbeaten team has advantage
                             
  4      
  5         1      
         
  3                    
  6                      
           
              Third place
  2                
  7          

NOTE: Seeds represent seeds at the start of bracket play.


  Quarterfinals   Semifinals   Super Semifinal
Loser is 3rd place
  One-Game Final
                                     
4       1      
5                      
   
3                          
  6                          
               
             
  2      
  7      
   
Key:         Losing team progressing     Winning team progressing

NOTE: Numbers represent seeds at the start of bracket play.


Templates for the NAQT Super Seven playoff format. Template:SuperSevenA is for when the undefeated team wins their semi, while Template:SuperSevenB is for when they lose it.

General Use

Template:If

An if/then statement with optional else based on whether test parameter is null or not.
Template:If

{{if
  |test=VARIABLE_OR_PARAMETER_TO_TEST
  |then=code if 'test' is not empty
  |else=code if 'test' is empty (optional)
}}

This is no longer necessary, as it exactly replicates the behavior of {{#if:test||}}.

Template:Tl

Template for a shortened link to a template's page that can be transcluded.
{{Tl}}


Template:dot

Template for a dot.
Template:dot
 ·

Template:!/!-

Templates for inserting a | or |- inside of another template. Useful for adding optional rows to a table. Examples of "magic words" built into MediaWiki. For more detail, see MediaWiki Tables.

|-
{{if|test={{{variable_x|}}}
|then={{!-}}
{{!}}'''optional_row_name''' {{!}}{{!}} {{{variable_x|}}}
}}
|-

In this example, the if statement checks if the variable_x has been assigned a value and then adds in an optional row (shown below) to the table with variable_x as a parameter. Because additional row enders ("|-") can be added without changing the formatting, it is recommended that you wrap any optional rows created this way with |-.

|-
|-
|'''optional_row_name''' || {{{variable_x|}}}
|-

Template:Placement row/cell

Templates for giving gold/silver/bronze color to either a row or a cell. The template for cells is a little finicky.

Template:Placement row · Template:Placement cell

Template:Create if absent

A template for either transcluding the contents of a page as-is or displaying a message indicating that it doesn't exist.

Template:Create if absent

Template:Non-zero number

For displaying a number (technically any text, since this is not enforced) and giving a blank when it is zero.

Template:Non-zero number