Difference between revisions of "Template:Infobox 2on2team"

From QWiki
m
m
Line 146: Line 146:
 
--></div>
 
--></div>
 
</div><!--
 
</div><!--
 
Categories
 
 
-->{{#ifeq:{{NAMESPACE}}||[[Category:Players]]
 
{{#if:{{{id|}}}||[[Category:InfoboxIncomplete]]}}
 
{{#if:{{{image|}}}|{{#ifeq:{{{image|}}}|PlayerImagePlaceholder.png|[[Category:Players with no profile picture]]}}|[[Category:Players with no profile picture]]}}<!-- To add to a hidden category to find players without profile images.
 
-->{{#if:{{{twitter|}}}{{{facebook|}}}{{{gplus|}}}{{{vk|}}}{{{weibo|}}}{{{tencent|}}}||[[Category:Players with no social media links]]}}<!-- To add to a hidden category to find players without social media links.
 
-->{{#if:{{{fanclub|}}}||[[Category:Players without a fanpage]]}}<!-- To add to a hidden category to find players without a fanclub.
 
-->{{#if:{{{status|}}}||[[Category:Players without a status]]}}<!-- To add to a hidden category to find players without an activity status listed.
 
-->{{#if:{{{birth_date|}}}||[[Category:People with an unknown birth date]]}}<!-- To add to a hidden category to find players, shoutcasters and managers with an unknown birth date.
 
-->{{#if:{{{country|}}}|{{#ifeq:{{localisation|{{{country}}}}}|error
 
|[[Category:Unrecognised Country{{!}}{{{country}}}]]
 
|[[Category:{{localisation|{{{country}}}}} Players]]}}| }}<!-- Adds category for the country using localisation template unless the country error is returned then adds to unrecognised country category.
 
-->{{#if:{{{country2|}}}|{{#ifeq:{{localisation|{{{country2}}}}}|error
 
|[[Category:Unrecognised Country{{!}}{{{country2}}}]]
 
|[[Category:{{localisation|{{{country2}}}}} Players]]}}}}<!-- Same for country2.
 
-->{{#ifeq:{{{role|}}}|Caster|[[Category:Casters]]}}<!--
 
  
 
SMW
 
SMW
Line 185: Line 168:
 
|has second nationality={{{country2|}}}
 
|has second nationality={{{country2|}}}
 
|has status={{#if:{{{status|}}}|{{{status|}}}|Unknown}}
 
|has status={{#if:{{{status|}}}|{{{status|}}}|Unknown}}
}}<!--
+
}}
 
 
-->{{#ifeq:{{NAMESPACE}}||{{#vardefine:birthday|{{#show: {{PAGENAME}}|?has birth day  }}}}<!--
 
-->{{#if:{{#var:birthday|}}|
 
{{#set_recurring_event: Birthday
 
|property=Has yearly birthday
 
|start={{#var:birthday}}
 
|end={{{death_date|}}}
 
|unit=month
 
|period=12
 
|has original birthday={{#var:birthday|}}
 
|has player={{{id|{{PAGENAME}}}}}
 
|has flag={{lc:{{{country|}}}}}
 
}} }} }}
 
}}<!-- this one from before the categories
 
  
--></includeonly><noinclude>[[Category:Infoboxes]] {{documentation}}</noinclude>
+
</includeonly><noinclude>[[Category:Infoboxes]] {{documentation}}</noinclude>

Revision as of 15:24, 28 March 2017

Documentation (view - edit)

My team
Infobox placeholder.png
2on2 team Information
Team:
ABCD
Color:
  4    13 
Created:
2016
Status:
Active
Sponsor:
Dreamhack
Earnings:
2000 SEK


This template produces an Infobox on a team page.

Parameters

These are the variables in the Player template:

  • name = Team Name
  • team = (optional) Team tag / shortname
  • image = (optional) Picture
  • color1 = (optional) Top color, 1-13
  • color2 = (optional) Bottom color, 1-13
  • flag = (optional) 2 letter country code
  • created = (optional) Year, month (2010, April)
  • status = (optional) Active / Inactive
  • sponsor = (optional) Team's personal sponsor
  • earnings = (optional) Team's earnings, approximately

Example

The following code was used to create the infobox on this page.

{{Infobox 2on2team
|name=My team
|team=ABCD
|image=Infobox placeholder.png
|color1=4
|color2=13
|flag=tbd
|created=2016
|status=Active
|sponsor=Dreamhack
|earnings=2000 SEK
}}