Difference between revisions of "Template:Infobox"

From QBWiki
Jump to navigation Jump to search
(If no image specified, don't show the Image syntax. Someone could create a "no image" placeholder if everyone thinks that would be better)
m (attempt to remove unwanted new paragraph)
(39 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{| border=1 align=right cellpadding=2 cellspacing=0 width=150 class="toccolours" style="margin: 0 0 0.75em 0.75em; background: #f9f9f9; border: 1px #c6c6c6 solid; border-collapse: collapse; font-size: 85%;"
+
<includeonly>
 
+
{| 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%;"
| align="center" colspan="2"|
+
|- style="border-bottom-width:0"
{| border=0 align=right cellpadding=4 cellspacing=4 width=310 style="background:#f9f9f9; text-align:center;"
+
| 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>
| width="160px"| <font style="font-size:9pt">'''{{{Name}}}'''</font>
+
|-
 +
{{if|test={{{Image|}}}|then=
 +
{{!-}}
 +
{{!}} style="border-top-width:0" align=center colspan=2 style="border-top-width:0" {{!}} [[Image:{{{Image}}}|200px]]<!--
 +
-->{{#if:{{{Caption|}}}|<br>{{{Caption}}}|}}
 +
{{!-}}
 +
}}
 +
|-
 +
{{if|test={{{Subjects|}}}|then=
 +
{{!-}}
 +
{{!}} width="96" {{!}} '''Noted subjects'''{{!!}} {{{Subjects}}}
 +
{{!-}}
 +
}}
 +
|-
 +
{{if|test={{{schoolcur|}}}|then=
 +
{{!-}}
 +
{{!}}'''Current college'''{{!!}} {{{schoolcur}}}
 +
{{!-}}
 +
}}
 
|-
 
|-
! align=center colspan=2 | [[Image:{{{Image|Blankpixel.png}}}]]
+
{{if|test={{{schoolpast|}}}|then=
{{{Caption|}}}
+
{{!-}}
|}
+
{{!}}'''Past colleges'''{{!!}} {{{schoolpast}}}
 +
{{!-}}
 +
}}
 
|-
 
|-
! align=center colspan=2| Noted Subjects: <br> {{{Subjects|}}}
+
{{if|test={{{highschool|}}}|then=
 +
{{!-}}
 +
{{!}}'''High school'''{{!!}} {{{highschool}}}
 +
{{!-}}
 +
}}
 
|-
 
|-
|'''Current Collegiate Team'''|| {{{schoolcur|None}}}
+
{{if|test={{{middleschool|}}}|then=
 +
{{!-}}
 +
{{!}}'''Middle school'''{{!!}} {{{middleschool}}}
 +
{{!-}}
 +
}}
 
|-
 
|-
|'''Past Collegiate Teams'''|| {{{schoolpast|None}}}
+
{{if|test={{{elementaryschool|}}}|then=
 +
{{!-}}
 +
{{!}}'''Elem. school'''{{!!}} {{{elementaryschool}}}
 +
{{!-}}
 +
}}
 
|-
 
|-
|'''High School Team'''|| {{{highschool|None}}}
+
{{#if:{{{forums|}}}|
 +
{{!}}'''[[HSQB]] profile{{!!}}{{{forums}}}
 +
}}
 
|-
 
|-
 +
{{#if:{{{nostats|}}}||
 +
{{!}}'''Stats'''{{!!}}<!--
 +
-->{{#if:{{{stats|}}}
 +
<!---->|{{{stats}}}
 +
<!---->|{{#if:{{{firstname|}}}{{{lastname|}}}
 +
<!----><!---->|[https://hdwhite.org/qb/stats/player/{{{firstname}}}+{{{lastname}}} HDWhite]
 +
<!----><!---->|{{#if:{{{1|}}}
 +
<!----><!----><!---->|{{#if:{{{2|}}}
 +
<!----><!----><!----><!---->|[{{#if:{{{3|}}}
 +
<!----><!----><!----><!----><!---->|https://hdwhite.org/qb/stats/player/{{{1}}}+{{{3}}}
 +
<!----><!----><!----><!----><!---->|https://hdwhite.org/qb/stats/player/{{{1}}}+{{{2}}}
 +
<!----><!----><!----><!---->}} 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]
 +
<!----><!----><!---->}}
 +
<!----><!---->}}
 +
<!---->}}
 +
}}
 +
}}
 
|-
 
|-
|}
+
|}<!--
 +
-->[[Category:People]]</includeonly><!--
 +
--><noinclude>
 +
{{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)
 +
  |firstname = Full
 +
  |lastname = Name
 +
  |naqtstats = naqtstats (optional)
 +
}}
 +
Usage:<pre>{{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)
 +
  |firstname = Full (optional)
 +
  |lastname = Name (optional)
 +
  |naqtstats = naqtstats (optional)
 +
  |nostats = optional
 +
}}</pre>
 +
 
 +
''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 "").
 +
 
 +
{{Infobox
 +
  |Name = Full Name
 +
}}
 +
Minimal box:
 +
<pre>{{Infobox
 +
  |Name = Full Name
 +
}}</pre>
 +
 
 +
{{Infobox
 +
  |Name = Full Name
 +
  |firstname = Full
 +
  |lastname = Name
 +
}}
 +
Box with firstname/lastname but no naqtstats:
 +
<pre>{{Infobox
 +
  |Name = Full Name
 +
  |firstname = Full
 +
  |lastname = Name
 +
}}</pre>
 +
 
 +
{{Infobox
 +
  |Name = Full Name
 +
  |naqtstats = naqtstats
 +
}}
 +
Box with naqtstats but no firstname/lastname:
 +
<pre>{{Infobox
 +
  |Name = Full Name
 +
  |naqtstats = naqtstats
 +
}}</pre>
 +
 
 +
{{Infobox
 +
  |Full|Name
 +
}}
 +
Box with full name passed in anonymous parameters.
 +
<pre>{{Infobox
 +
  |Full|Name
 +
}}</pre>
 +
 
 +
{{Infobox
 +
  |Full|Middle Initials|Name
 +
}}
 +
Box with full name + middle name passed in anonymous parameters.
 +
<pre>{{Infobox
 +
  |Full|Middle Initials|Name
 +
}}</pre>
 +
 
 +
{{Infobox
 +
  |Name=Explicitly specified full name
 +
  |Full|Name
 +
}}
 +
Box with full name passed in anonymous parameters and also manually specified.
 +
<pre>{{Infobox
 +
  |Name=Explicitly specified full name
 +
  |Full|Name
 +
}}</pre>
 +
 
 +
{{Infobox
 +
  |Full|Name
 +
  |naqtstats = naqtstats
 +
}}
 +
Box with full name passed in anonymous parameters and naqtstats.
 +
<pre>{{Infobox
 +
  |Full|Name
 +
  |naqtstats = naqtstats
 +
}}</pre>
 +
 
 +
{{Infobox
 +
  |Full|Name
 +
  |stats = stats
 +
}}
 +
Box with full name passed in anonymous parameters and stats.
 +
<pre>{{Infobox
 +
  |Full|Name
 +
  |stats = stats
 +
}}</pre>
 +
</noinclude>

Revision as of 19:59, 30 April 2021


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)
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)
  |firstname = Full (optional)
  |lastname = Name (optional)
  |naqtstats = naqtstats (optional)
  |nostats = optional
}}

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 "").


Full Name
Stats HDWhite • NAQT

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 • naqtstats

Box with naqtstats but no firstname/lastname:

{{Infobox
  |Name = Full Name
  |naqtstats = naqtstats
}}


Full Name
Stats HDWhite • NAQT

Box with full name passed in anonymous parameters.

{{Infobox
  |Full|Name
}}


Full Middle Initials Name
Stats HDWhite • NAQT

Box with full name + middle name passed in anonymous parameters.

{{Infobox
  |Full|Middle Initials|Name
}}


Explicitly specified full name
Stats HDWhite • NAQT

Box with full name passed in anonymous parameters and also manually specified.

{{Infobox
  |Name=Explicitly specified full name
  |Full|Name
}}


Full Name
Stats HDWhite • naqtstats

Box with full name passed in anonymous parameters and naqtstats.

{{Infobox
  |Full|Name
  |naqtstats = naqtstats
}}


Full Name
Stats stats

Box with full name passed in anonymous parameters and stats.

{{Infobox
  |Full|Name
  |stats = stats
}}