Difference between revisions of "Template:Infobox"

From QBWiki
Jump to navigation Jump to search
m (Reverted edits by Vidyut Arvind (talk) to last revision by Kevin Wang)
Tag: Rollback
 
(19 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
{| border=1 cellpadding=2 cellspacing=0 width=310 class="toccolours" style="float: right; margin: 0 0 0.75em 0.75em; background: #f9f9f9; border: 1px #c6c6c6 solid; border-collapse: collapse; font-size: 85%;"
 
{| border=1 cellpadding=2 cellspacing=0 width=310 class="toccolours" style="float: right; margin: 0 0 0.75em 0.75em; background: #f9f9f9; border: 1px #c6c6c6 solid; border-collapse: collapse; font-size: 85%;"
 
|- style="border-bottom-width:0"
 
|- style="border-bottom-width:0"
| align="center" colspan="2" style="border-bottom-width:0" |<strong style="font-size:9pt">'''{{#if:{{{Name|}}}|{{{Name}}}|{{#if:{{{1|}}}|{{{1}}}}} {{#if:{{{2|}}}|{{{2}}}}} {{#if:{{{3|}}}|{{{3}}}}}}}'''</strong>
+
| align="center" colspan="2" style="border-bottom-width:0" |<strong style="font-size: 112%;">{{#if:{{{Name|}}}|{{{Name}}}|{{#if:{{{1|}}}|{{{1}}}}} {{#if:{{{2|}}}|{{{2}}}}} {{#if:{{{3|}}}|{{{3}}}}}}}</strong>
 
|-
 
|-
 
{{if|test={{{Image|}}}|then=
 
{{if|test={{{Image|}}}|then=
 
{{!-}}
 
{{!-}}
! style="border-top-width:0" align=center colspan=2 style="border-top-width:0" {{!}} [[Image:{{{Image}}}|200px]]
+
{{!}} style="border-top-width:0" align=center colspan=2 style="border-top-width:0" {{!}} [[Image:{{{Image}}}|200px]]<!--
{{{Caption|}}}
+
-->{{#if:{{{Caption|}}}|<br>{{{Caption}}}|}}{{c|Infoboxes using images}}
 
{{!-}}
 
{{!-}}
 
}}
 
}}
 
|-
 
|-
! align=center colspan=2| Noted Subjects: <br> {{{Subjects|n/a}}}
+
{{if|test={{{Subjects|}}}{{{subjects|}}}|then=
 +
{{!-}}
 +
{{!}} width="96" {{!}} '''Noted subjects'''{{!!}} {{{Subjects|}}}{{{subjects|}}}
 +
{{!-}}
 +
}}
 
|-
 
|-
 
{{if|test={{{schoolcur|}}}|then=
 
{{if|test={{{schoolcur|}}}|then=
 
{{!-}}
 
{{!-}}
{{!}}'''Current Collegiate Team'''{{!!}} {{{schoolcur}}}
+
{{!}}'''Current college'''{{!!}} {{{schoolcur}}}
 
{{!-}}
 
{{!-}}
 
}}
 
}}
Line 21: Line 25:
 
{{if|test={{{schoolpast|}}}|then=
 
{{if|test={{{schoolpast|}}}|then=
 
{{!-}}
 
{{!-}}
{{!}}'''Past Collegiate Teams'''{{!!}} {{{schoolpast}}}
+
{{!}}'''Past colleges'''{{!!}} {{{schoolpast}}}
 
{{!-}}
 
{{!-}}
 
}}
 
}}
Line 27: Line 31:
 
{{if|test={{{highschool|}}}|then=
 
{{if|test={{{highschool|}}}|then=
 
{{!-}}
 
{{!-}}
{{!}}'''High School Team'''{{!!}} {{{highschool}}}
+
{{!}}'''High school'''{{!!}} {{{highschool}}}
 
{{!-}}
 
{{!-}}
 
}}
 
}}
Line 33: Line 37:
 
{{if|test={{{middleschool|}}}|then=
 
{{if|test={{{middleschool|}}}|then=
 
{{!-}}
 
{{!-}}
{{!}}'''Middle School Team'''{{!!}} {{{middleschool}}}
+
{{!}}'''Middle school'''{{!!}} {{{middleschool}}}
 
{{!-}}
 
{{!-}}
 
}}
 
}}
Line 39: Line 43:
 
{{if|test={{{elementaryschool|}}}|then=
 
{{if|test={{{elementaryschool|}}}|then=
 
{{!-}}
 
{{!-}}
{{!}}'''Elementary School Team'''{{!!}} {{{elementaryschool}}}
+
{{!}}'''Elem. school'''{{!!}} {{{elementaryschool}}}
 
{{!-}}
 
{{!-}}
 
}}
 
}}
 
|-
 
|-
|'''Stats'''||
+
{{#if:{{{forums|}}}|
{{#if:{{{firstname|}}}{{{lastname|}}}{{{naqtstats|}}}
+
{{!}}'''[[HSQB]] profile'''{{!!}}{{{forums}}}
 +
}}
 +
|-
 +
{{#if:{{{pronouns|}}}|
 +
{{!}}'''Pronouns'''{{!!}}{{{pronouns}}}
 +
}}
 +
|-
 +
{{#if:{{{nostats|}}}||
 +
{{!}}'''Stats'''{{!!}}<!--
 +
-->{{#if:{{{stats|}}}
 +
<!---->|{{{stats}}}
 
<!---->|{{#if:{{{firstname|}}}{{{lastname|}}}
 
<!---->|{{#if:{{{firstname|}}}{{{lastname|}}}
<!----><!---->|[https://hdwhite.org/qb/stats/player/{{{firstname}}}+{{{lastname}}} HDWhite]<br>
+
<!----><!---->|[https://hdwhite.org/qb/stats/player/{{{firstname}}}+{{{lastname}}} HDWhite]
<!----><!---->{{#if:{{{naqtstats|}}}
 
<!----><!----><!---->|{{{naqtstats}}}
 
<!----><!----><!---->|[https://www.naqt.com/stats/player/search.jsp?PASSBACK=PLAYER_SEARCH&first_name={{{firstname}}}&last_name={{{lastname}}} NAQT page]
 
<!----><!---->}}
 
 
<!----><!---->|{{#if:{{{1|}}}
 
<!----><!---->|{{#if:{{{1|}}}
 
<!----><!----><!---->|{{#if:{{{2|}}}
 
<!----><!----><!---->|{{#if:{{{2|}}}
Line 56: Line 66:
 
<!----><!----><!----><!----><!---->|https://hdwhite.org/qb/stats/player/{{{1}}}+{{{3}}}
 
<!----><!----><!----><!----><!---->|https://hdwhite.org/qb/stats/player/{{{1}}}+{{{3}}}
 
<!----><!----><!----><!----><!---->|https://hdwhite.org/qb/stats/player/{{{1}}}+{{{2}}}
 
<!----><!----><!----><!----><!---->|https://hdwhite.org/qb/stats/player/{{{1}}}+{{{2}}}
<!----><!----><!----><!---->}} HDWhite]<br/>
+
<!----><!----><!----><!---->}} HDWhite]
 +
<!----><!----><!----><!---->|[https://hdwhite.org/qb/stats/player/{{#explode:{{{1}}}| |0}}+{{#explode:{{{1}}}| |-1}} HDWhite]
 +
<!----><!----><!---->}}
 +
<!----><!----><!---->|[https://hdwhite.org/qb/stats/player/{{#explode:{{{Name}}}| |0}}+{{#explode:{{{Name}}}| |-1}} HDWhite]
 +
<!----><!---->}}
 +
<!---->}} • <!--
 +
    -->{{#if:{{{naqtstats|}}}
 +
<!----><!---->|{{{naqtstats}}}
 +
<!----><!---->|{{#if:{{{firstname|}}}{{{lastname|}}}
 +
<!----><!----><!---->|[https://www.naqt.com/stats/player/search.jsp?PASSBACK=PLAYER_SEARCH&first_name={{{firstname}}}&last_name={{{lastname}}} NAQT]
 +
<!----><!----><!---->|{{#if:{{{1|}}}
 +
<!----><!----><!----><!---->|{{#if:{{{2|}}}
 +
<!----><!----><!----><!----><!---->|[{{#if:{{{3|}}}
 +
<!----><!----><!----><!----><!----><!---->|https://www.naqt.com/stats/player/search.jsp?PASSBACK=PLAYER_SEARCH&first_name={{{1}}}&last_name={{{3}}}
 +
<!----><!----><!----><!----><!----><!---->|https://www.naqt.com/stats/player/search.jsp?PASSBACK=PLAYER_SEARCH&first_name={{{1}}}&last_name={{{2}}}
 +
<!----><!----><!----><!----><!---->}} NAQT]
 +
<!----><!----><!----><!----><!---->|[https://www.naqt.com/stats/player/search.jsp?PASSBACK=PLAYER_SEARCH&first_name={{#explode:{{{1}}}| |0}}&last_name={{#explode:{{{1}}}| |-1}} NAQT]
 +
<!----><!----><!----><!---->}}
 +
<!----><!----><!----><!---->|[https://www.naqt.com/stats/player/search.jsp?PASSBACK=PLAYER_SEARCH&first_name={{#explode:{{{Name}}}| |0}}&last_name={{#explode:{{{Name}}}| |-1}} NAQT]
 
<!----><!----><!---->}}
 
<!----><!----><!---->}}
<!----><!---->}}{{{naqtstats}}}
 
<!---->}}
 
<!---->|{{#if:{{{1|}}}
 
<!----><!---->|{{#if:{{{2|}}}
 
<!----><!----><!---->|[{{#if:{{{3|}}}
 
<!----><!----><!----><!---->|https://hdwhite.org/qb/stats/player/{{{1}}}+{{{3}}}
 
<!----><!----><!----><!---->|https://hdwhite.org/qb/stats/player/{{{1}}}+{{{2}}}
 
<!----><!----><!---->}} HDWhite]<br/>
 
<!----><!----><!---->[{{#if:{{{3|}}}
 
<!----><!----><!----><!---->|https://www.naqt.com/stats/player/search.jsp?PASSBACK=PLAYER_SEARCH&first_name={{{1}}}&last_name={{{3}}}
 
<!----><!----><!----><!---->|https://www.naqt.com/stats/player/search.jsp?PASSBACK=PLAYER_SEARCH&first_name={{{1}}}&last_name={{{2}}}
 
<!----><!----><!---->}} NAQT page]
 
<!----><!---->|n/a
 
 
<!----><!---->}}
 
<!----><!---->}}
<!---->|[https://hdwhite.org/qb/stats/player/{{#explode:{{{Name}}}| |0}}+{{#explode:{{{Name}}}| |-1}} HDWhite]<br>[https://www.naqt.com/stats/player/search.jsp?PASSBACK=PLAYER_SEARCH&first_name={{#explode:{{{Name}}}| |0}}&last_name={{#explode:{{{Name}}}| |-1}} NAQT page]
 
 
<!---->}}
 
<!---->}}
 +
}}
 
}}
 
}}
 
|-
 
|-
|}
+
|}<!--
[[Category:People]]</includeonly>
+
-->[[Category:People]]</includeonly><!--
<noinclude>
+
--><noinclude>
 
{{Infobox
 
{{Infobox
 
   |Name = Full Name
 
   |Name = Full Name
Line 88: Line 103:
 
   |middleschool = middleschool (optional)
 
   |middleschool = middleschool (optional)
 
   |elementaryschool = elementaryschool (optional)
 
   |elementaryschool = elementaryschool (optional)
 +
  |forums = forums (optional)
 
   |firstname = Full
 
   |firstname = Full
 
   |lastname = Name
 
   |lastname = Name
 
   |naqtstats = naqtstats (optional)
 
   |naqtstats = naqtstats (optional)
 +
  |pronouns = they/them
 
}}
 
}}
 
Usage:<pre>{{Infobox
 
Usage:<pre>{{Infobox
Line 101: Line 118:
 
   |middleschool = middleschool (optional)
 
   |middleschool = middleschool (optional)
 
   |elementaryschool = elementaryschool (optional)
 
   |elementaryschool = elementaryschool (optional)
 +
  |forums = forums (optional)
 +
  |pronouns = pronouns (optional)
 
   |firstname = Full (optional)
 
   |firstname = Full (optional)
 
   |lastname = Name (optional)
 
   |lastname = Name (optional)
 
   |naqtstats = naqtstats (optional)
 
   |naqtstats = naqtstats (optional)
 +
  |nostats = optional
 +
  |pronouns = they/them
 
}}</pre>
 
}}</pre>
  
Line 110: Line 131:
 
An alternative to ''firstname/lastname'' is {{{1}}}/{{{2}}}, the first two anonymous parameters. All named parameters will take precedence over these anonymous parameters, though.
 
An alternative to ''firstname/lastname'' is {{{1}}}/{{{2}}}, the first two anonymous parameters. All named parameters will take precedence over these anonymous parameters, though.
  
 +
''nostats'' removes the entire stats section of the infobox. Using ''nostats'' requires setting it to any non-whitespace value (e.g. not " " or "").
 +
 +
{| class="wikitable"
 +
! Input
 +
! Output
 +
|-
 +
|Minimal box
 +
<pre>{{Infobox
 +
  |Name = Full Name
 +
}}</pre>
 +
|
 
{{Infobox
 
{{Infobox
 
   |Name = Full Name
 
   |Name = Full Name
 
}}
 
}}
Minimal box:
+
|-
 +
|Box with firstname/lastname but no naqtstats:
 
<pre>{{Infobox
 
<pre>{{Infobox
 
   |Name = Full Name
 
   |Name = Full Name
 +
  |firstname = Full
 +
  |lastname = Name
 
}}</pre>
 
}}</pre>
 
+
|{{Infobox
{{Infobox
 
 
   |Name = Full Name
 
   |Name = Full Name
 
   |firstname = Full
 
   |firstname = Full
 
   |lastname = Name
 
   |lastname = Name
 
}}
 
}}
Box with firstname/lastname but no naqtstats:
+
|-
 +
|Box with naqtstats but no firstname/lastname:
 
<pre>{{Infobox
 
<pre>{{Infobox
 
   |Name = Full Name
 
   |Name = Full Name
   |firstname = Full
+
   |naqtstats = naqtstats
  |lastname = Name
 
 
}}</pre>
 
}}</pre>
 
+
|{{Infobox
{{Infobox
 
 
   |Name = Full Name
 
   |Name = Full Name
 
   |naqtstats = naqtstats
 
   |naqtstats = naqtstats
 
}}
 
}}
Box with naqtstats but no firstname/lastname:
+
|-
 +
|Box with full name passed in anonymous parameters.
 
<pre>{{Infobox
 
<pre>{{Infobox
   |Name = Full Name
+
   |Full|Name
  |naqtstats = naqtstats
 
 
}}</pre>
 
}}</pre>
 
+
|{{Infobox
{{Infobox
 
 
   |Full|Name
 
   |Full|Name
 
}}
 
}}
Box with full name passed in anonymous parameters.
+
|-
 +
|Box with full name + middle name passed in anonymous parameters.
 
<pre>{{Infobox
 
<pre>{{Infobox
   |Full|Name
+
   |Full|Middle Initials|Name
 
}}</pre>
 
}}</pre>
 
+
|{{Infobox
{{Infobox
 
 
   |Full|Middle Initials|Name
 
   |Full|Middle Initials|Name
 
}}
 
}}
Box with full name + middle name passed in anonymous parameters.
+
|-
 +
|Box with full name passed in anonymous parameters and also manually specified.
 
<pre>{{Infobox
 
<pre>{{Infobox
   |Full|Middle Initials|Name
+
  |Name=Explicitly specified full name
 +
   |Full|Name
 
}}</pre>
 
}}</pre>
 
+
|{{Infobox
{{Infobox
 
 
   |Name=Explicitly specified full name
 
   |Name=Explicitly specified full name
 
   |Full|Name
 
   |Full|Name
 
}}
 
}}
Box with full name passed in anonymous parameters and also manually specified.
+
|-
 +
|Box with full name passed in anonymous parameters and naqtstats.
 
<pre>{{Infobox
 
<pre>{{Infobox
  |Name=Explicitly specified full name
 
 
   |Full|Name
 
   |Full|Name
 +
  |naqtstats = naqtstats
 
}}</pre>
 
}}</pre>
 
+
|{{Infobox
{{Infobox
 
 
   |Full|Name
 
   |Full|Name
 
   |naqtstats = naqtstats
 
   |naqtstats = naqtstats
 
}}
 
}}
Box with full name passed in anonymous parameters and naqtstats.
+
|-
 +
|Box with full name passed in anonymous parameters and stats.
 
<pre>{{Infobox
 
<pre>{{Infobox
 
   |Full|Name
 
   |Full|Name
   |naqtstats = naqtstats
+
   |stats = stats
 
}}</pre>
 
}}</pre>
 +
|{{Infobox
 +
  |Full|Name
 +
  |stats = stats
 +
}}
 +
|}
 +
 
</noinclude>
 
</noinclude>

Latest revision as of 16:37, 11 August 2023


Full Name
200px
Noted subjects Subjects (optional)
Current college schoolcur (optional)
Past colleges schoolpast (optional)
High school highschool (optional)
Middle school middleschool (optional)
Elem. school elementaryschool (optional)
HSQB profile forums (optional)
Pronouns they/them
Stats HDWhite • naqtstats (optional)

Usage:

{{Infobox
  |Name = Full Name
  |Image = Image (optional)
  |Subjects = Subjects (optional)
  |schoolcur = schoolcur (optional)
  |schoolpast = schoolpast (optional)
  |highschool = highschool (optional)
  |middleschool = middleschool (optional)
  |elementaryschool = elementaryschool (optional)
  |forums = forums (optional)
  |pronouns = pronouns (optional)
  |firstname = Full (optional)
  |lastname = Name (optional)
  |naqtstats = naqtstats (optional)
  |nostats = optional
  |pronouns = they/them
}}

firstname and lastname should be their first and last name as it appears in stats and is used to look up the name on HDWhite. If an explicit link to naqt stats is not provided via naqtstats, it will use the firstname and lastname to search them up on NAQT's player search.

An alternative to firstname/lastname is {{{1}}}/{{{2}}}, the first two anonymous parameters. All named parameters will take precedence over these anonymous parameters, though.

nostats removes the entire stats section of the infobox. Using nostats requires setting it to any non-whitespace value (e.g. not " " or "").

Input Output
Minimal box
{{Infobox
  |Name = Full Name
}}
Full Name
Stats HDWhite • NAQT
Box with firstname/lastname but no naqtstats:
{{Infobox
  |Name = Full Name
  |firstname = Full
  |lastname = Name
}}
Full Name
Stats HDWhite • NAQT
Box with naqtstats but no firstname/lastname:
{{Infobox
  |Name = Full Name
  |naqtstats = naqtstats
}}
Full Name
Stats HDWhite • naqtstats
Box with full name passed in anonymous parameters.
{{Infobox
  |Full|Name
}}
Full Name
Stats HDWhite • NAQT
Box with full name + middle name passed in anonymous parameters.
{{Infobox
  |Full|Middle Initials|Name
}}
Full Middle Initials Name
Stats HDWhite • NAQT
Box with full name passed in anonymous parameters and also manually specified.
{{Infobox
  |Name=Explicitly specified full name
  |Full|Name
}}
Explicitly specified full name
Stats HDWhite • NAQT
Box with full name passed in anonymous parameters and naqtstats.
{{Infobox
  |Full|Name
  |naqtstats = naqtstats
}}
Full Name
Stats HDWhite • naqtstats
Box with full name passed in anonymous parameters and stats.
{{Infobox
  |Full|Name
  |stats = stats
}}
Full Name
Stats stats