Difference between revisions of "Template:Infobox 2on2team"

From QWiki
m
m
 
(24 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
<div class="fo-nttax-infobox wiki-bordercolor-light">
 
<div class="fo-nttax-infobox wiki-bordercolor-light">
 
<div>
 
<div>
<div class="infobox-header wiki-backgroundcolor-light"><span class="infobox-buttons"><nowiki>[</nowiki>[{{SERVER}}{{localurl:{{FULLPAGENAME}}|action=edit&section=0}} e]<nowiki>]</nowiki><nowiki>[</nowiki>[[Template:Infobox_player|h]]<nowiki>]</nowiki></span>{{#ifexist:Template:TeamIcon/{{lc:{{{name}}}}}|{{TeamIcon/{{lc:{{{name}}}}}}}}} {{{id|{{PAGENAME}}}}} {{#ifexist:Template:TeamIcon/{{lc:{{{name2}}}}}|{{TeamIcon/{{lc:{{{name2}}}}}}}}}</div>
+
<div class="infobox-header wiki-backgroundcolor-light">{{#if:{{{flag|}}}|{{flag/{{lc:{{{flag}}}}}}}}} {{{name}}}
 +
</div>
 
</div><!--
 
</div><!--
  
Line 12: Line 13:
 
<div>
 
<div>
 
<div class="infobox-image">[[File:{{{image}}}|center|600px]]</div>
 
<div class="infobox-image">[[File:{{{image}}}|center|600px]]</div>
 +
</div>
 +
|<div>
 +
<div class="infobox-image">[[File:Infobox placeholder.png|center|600px]]</div>
 
</div>
 
</div>
 
}}<!--
 
}}<!--
Line 31: Line 35:
 
-->{{#if:{{{team|}}}|
 
-->{{#if:{{{team|}}}|
 
<div>
 
<div>
<div class="infobox-cell-2 infobox-description">Team:</div>
+
<div class="infobox-cell-2 infobox-description">Short team:</div>
 
<div class="infobox-cell-2">{{{team}}}</div>
 
<div class="infobox-cell-2">{{{team}}}</div>
 
</div>
 
</div>
Line 45: Line 49:
 
}}<!--
 
}}<!--
  
Name
+
Created
 
 
-->{{#if:{{{name|}}}|
 
<div>
 
<div class="infobox-cell-2 infobox-description">Name:</div>
 
<div class="infobox-cell-2">{{{name}}}</div>
 
</div>
 
}}<!--
 
 
 
First spawn
 
  
 
-->{{#if:{{{created|}}}|
 
-->{{#if:{{{created|}}}|
 
<div>
 
<div>
<div class="infobox-cell-2 infobox-description">Created:</div>
+
<div class="infobox-cell-2 infobox-description">Founded:</div>
 
<div class="infobox-cell-2">{{{created}}}</div>
 
<div class="infobox-cell-2">{{{created}}}</div>
</div>
 
}}<!--
 
 
Countries
 
 
-->{{#if:{{{country|}}}|
 
<div>
 
<div class="infobox-cell-2 infobox-description">Country:</div>
 
<div class="infobox-cell-2">{{flag/{{lc:{{{country}}}}}}} [[:Category:{{{country}}}{{!}}{{{country}}}]]{{#if:{{{country2|}}}|<br>{{flag/{{lc:{{{country2}}}}}}} [[:Category:{{{country2}}}{{!}}{{{country2}}}]]}}</div>
 
 
</div>
 
</div>
 
}}<!--
 
}}<!--
Line 78: Line 64:
 
<div class="infobox-cell-2 infobox-description">Status:</div>
 
<div class="infobox-cell-2 infobox-description">Status:</div>
 
<div class="infobox-cell-2">{{#ifexist:{{{status}}}|[[{{{status}}}]]|{{{status}}}}}</div>
 
<div class="infobox-cell-2">{{#ifexist:{{{status}}}|[[{{{status}}}]]|{{{status}}}}}</div>
</div>
 
}}<!--
 
 
Years Active (Player)
 
 
-->{{#if:{{{years_active|}}}|
 
<div>
 
<div class="infobox-cell-2 infobox-description">Years Active (Player):</div>
 
<div class="infobox-cell-2">{{#ifexist:{{{years_active}}}|[[{{{years_active}}}]]|{{{years_active}}}}}</div>
 
 
</div>
 
</div>
 
}}<!--
 
}}<!--
Line 101: Line 78:
 
Earnings
 
Earnings
  
-->{{#vardefine:earnings|{{Total earnings of|{{#if:{{{earnings|}}}|{{{earnings}}}|{{PAGENAME}}}}|player}}}}{{#ifeq:{{#var:earnings}}|$0||
+
-->{{#if:{{{earnings|}}}|
 
<div>
 
<div>
<div class="infobox-cell-2 infobox-description">Approx. Total Earnings:</div>
+
<div class="infobox-cell-2 infobox-description">Earnings (approx):</div>
<div class="infobox-cell-2 ">{{#var:earnings}}</div>
+
<div class="infobox-cell-2">{{{earnings}}}</div>
 
</div>
 
</div>
 
}}<!--
 
}}<!--
  
Icons
+
Icons & Links
  
-->{{#if:{{{site|}}} {{{tlstream|}}} {{{twitch|}}} {{{own3d|}}} {{{stream|}}} {{{youtube|}}} {{{twitter|}}} {{{facebook|}}} {{{gplus|}}} {{{tlprofile|}}} {{{reddit|}}} {{{fanclub|}}} {{{azubu|}}} {{{weibo|}}} {{{tencent|}}} {{{vk|}}} {{{askfm|}}} {{{steam|}}} {{{psn|}}} |
+
-->{{#if:{{{website|}}} {{{website2|}}} {{{website3|}}} {{{website4|}}} {{{tlstream|}}} {{{twitch|}}} {{{own3d|}}} {{{stream|}}} {{{youtube|}}} {{{twitter|}}} {{{facebook|}}} {{{tlprofile|}}} {{{fanclub|}}} {{{steam|}}} {{{psn|}}} |
 
<div>
 
<div>
 
<div class="infobox-header wiki-backgroundcolor-light infobox-header-2">Links</div>
 
<div class="infobox-header wiki-backgroundcolor-light infobox-header-2">Links</div>
Line 116: Line 93:
 
<div>
 
<div>
 
<div class="infobox-center infobox-icons"><!--
 
<div class="infobox-center infobox-icons"><!--
--> {{#if:{{{site|}}}|[{{{site}}} <i class="lp-icon lp-home"></i>]}}<!--
+
--> {{#if:{{{website|}}}|[http://{{{website}}} {{{website}}}]<br>}}<!--
--> {{#if:{{{askfm|}}}|[http://ask.fm/{{{askfm|}}} <i class="lp-icon lp-ask-fm"></i>]}}<!--
+
--> {{#if:{{{website2|}}}|<small>[http://{{{website2}}} {{{website2}}}]</small><br>}}<!--
 +
--> {{#if:{{{website3|}}}|<small>[http://{{{website3}}} {{{website3}}}]</small><br>}}<!--
 +
--> {{#if:{{{website4|}}}|<small>[http://{{{website4}}} {{{website4}}}]</small><br>}}<!--
 
--> {{#if:{{{twitch|}}}|[http://www.twitch.tv/{{{twitch}}} <i class="lp-icon lp-twitch"></i>]}}<!--
 
--> {{#if:{{{twitch|}}}|[http://www.twitch.tv/{{{twitch}}} <i class="lp-icon lp-twitch"></i>]}}<!--
--> {{#if:{{{azubu|}}}|[http://www.azubu.tv/{{{azubu}}} <i class="lp-icon lp-azubu"></i>]}}<!--
 
 
--> {{#if:{{{stream|}}}|[{{{stream}}} <i class="lp-icon lp-stream"></i>]}}<!--
 
--> {{#if:{{{stream|}}}|[{{{stream}}} <i class="lp-icon lp-stream"></i>]}}<!--
 
--> {{#if:{{{youtube|}}}|[http://www.youtube.com/{{{youtube}}} <i class="lp-icon lp-youtube"></i>]}}<!--
 
--> {{#if:{{{youtube|}}}|[http://www.youtube.com/{{{youtube}}} <i class="lp-icon lp-youtube"></i>]}}<!--
 
--> {{#if:{{{twitter|}}}|[http://twitter.com/{{{twitter}}} <i class="lp-icon lp-twitter"></i>]}}<!--
 
--> {{#if:{{{twitter|}}}|[http://twitter.com/{{{twitter}}} <i class="lp-icon lp-twitter"></i>]}}<!--
 
--> {{#if:{{{facebook|}}}|[http://facebook.com/{{{facebook}}} <i class="lp-icon lp-facebook"></i>]}}<!--
 
--> {{#if:{{{facebook|}}}|[http://facebook.com/{{{facebook}}} <i class="lp-icon lp-facebook"></i>]}}<!--
--> {{#if:{{{gplus|}}}|[http://plus.google.com/{{{gplus}}} <i class="lp-icon lp-google-plus"></i>]}}<!--
 
--> {{#if:{{{weibo|}}}|[http://weibo.com/{{{weibo}}} <i class="lp-icon lp-weibo"></i>]}}<!--
 
--> {{#if:{{{tencent|}}}|[http://t.qq.com/{{{tencent}}} <i class="lp-icon lp-tencent"></i>]}}<!--
 
--> {{#if:{{{vk|}}}|[https://vk.com/{{{vk}}} <i class="lp-icon lp-vkontakte"></i>]}}<!--
 
--> {{#if:{{{reddit|}}}|[http://www.reddit.com/user/{{{reddit}}} <i class="lp-icon lp-reddit"></i>]}}<!--
 
 
--> {{#if:{{{fanclub|}}}|[{{{fanclub}}} <i class="lp-icon lp-fanclub"></i>]}}<!--
 
--> {{#if:{{{fanclub|}}}|[{{{fanclub}}} <i class="lp-icon lp-fanclub"></i>]}}<!--
 
--> {{#if:{{{playlist|}}}|[{{{playlist}}} <i class="lp-icon lp-music"></i>]}}<!--
 
--> {{#if:{{{playlist|}}}|[{{{playlist}}} <i class="lp-icon lp-music"></i>]}}<!--
Line 160: Line 133:
 
</div>
 
</div>
 
}}<!--
 
}}<!--
 
 
--></div>
 
--></div>
 
</div><!--
 
</div><!--
 
+
}}
Categories
+
</includeonly><noinclude>[[Category:Infoboxes]] {{documentation}}</noinclude>
 
 
-->{{#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
 
 
 
-->{{#set:
 
|has id={{{id|{{PAGENAME}}}}}
 
|has pagename={{PAGENAME}}
 
|has name={{#if:{{{romanized_name|}}}|{{{romanized_name|}}}|{{{name|}}}}}
 
|has image={{#if:{{{image|}}}|File:{{{image}}}}}
 
|has nationality={{{country|}}}
 
|has region={{Player region|{{{country|}}}}}
 
|has team={{{team|}}}
 
|has role={{{role|}}}
 
|has team page={{{teampage|{{{team|}}}}}}
 
|has clan={{{clan|}}}
 
|has sponsor={{{sponsor|}}}
 
|has achievements={{{achievements|}}}
 
|has mmr={{{mmr|}}}
 
|has mmr date={{{mmrdate|}}}
 
<!-- |has history={{{history|}}} -->
 
 
 
|has site={{{site|}}}
 
|has stream={{{stream|}}}
 
|has musical playlist={{{playlist|}}}
 
|has fanclub page={{{fanclub|}}}
 
 
 
|has tl stream={{#if:{{{tlstream|}}}|http://www.teamliquid.net/stream/{{{tlstream}}}}}
 
|has twitch stream={{#if:{{{twitch|}}}|http://www.twitch.tv/{{{twitch}}}}}
 
|has own3d stream={{#if:{{{own3d|}}}|http://www.own3d.tv/{{{own3d}}}}}
 
|has youtube channel={{#if:{{{youtube|}}}|http://www.youtube.com/{{{youtube}}}}}
 
|has twitter={{#if:{{{twitter|}}}|http://twitter.com/{{{twitter}}}}}
 
|has facebook={{#if:{{{facebook|}}}|http://facebook.com/{{{facebook}}}}}
 
|has google plus={{#if:{{{gplus|}}}|http://plus.google.com/{{{gplus}}}}}
 
|has tl profile={{#if:{{{tlprofile|}}}|http://www.teamliquid.net/forum/profile.php?user={{{tlprofile}}}}}
 
|has reddit profile={{#if:{{{reddit|}}}|http://www.reddit.com/user/{{{reddit}}}}}
 
 
 
|has non-romanized name={{#if:{{{romanized_name|}}}|{{{name|}}}|}}
 
|has dual-citizenship={{#if:{{{country2|}}}|{{#if:{{{country|}}}|true|false}}|false}}
 
|has second nationality={{{country2|}}}
 
|has status={{#if:{{{status|}}}|{{{status|}}}|Unknown}}
 
|has earnings={{Total earnings of|{{{id|{{PAGENAME}}}}}|player}}
 
|has earnings in 2016={{Total earnings of|{{{id|{{PAGENAME}}}}}|player|year=2016}}
 
|has earnings in 2015={{Total earnings of|{{{id|{{PAGENAME}}}}}|player|year=2015}}
 
}}<!--
 
 
 
-->{{#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>
 

Latest revision as of 09:15, 6 April 2017

Documentation (view - edit)

TBD My team
Infobox placeholder.png
2on2 team Information
Short team:
ABCD
Color:
  4    13 
Founded:
2016
Status:
Active
Sponsor:
Dreamhack
Earnings (approx):
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
}}