Difference between revisions of "Template:MatchMaps"

From comp.tf
Jump to navigation Jump to search
m (Hopefully this doesn't break anything)
 
(54 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<includeonly>{{#if:{{{date|}}}|<tr><!--
 
<includeonly>{{#if:{{{date|}}}|<tr><!--
{{#vardefine:timezone|{{#explode:{{#explode:{{{date|}}}|data-tz="|1}}|"|0}}}}
+
-->{{#vardefine:timezone|{{#explode:{{#explode:{{{date|}}}|data-tz="|1}}|"|0}}}}<!--
{{#vardefine:Match_date|{{#replace:{{#explode:{{{date|}}}|<|0}}|-}}}}
+
-->{{#vardefine:Match_date|{{#replace:{{#explode:{{{date|}}}|<|0}}|-}}}}<!--
{{#vardefine:Raw_Match_date|{{#explode:{{{date|TBD}}}|<|0}}}}
+
-->{{#vardefine:Raw_Match_date|{{#explode:{{{date|TBD}}}|<|0}}}}<!--
 
--><td colspan="4" style="font-weight:bold; background-color:#f2f2f2; font-size:85%; line-height:90%; height:13px;"><center>{{#ifeq:{{{finished|}}}|true|{{{date}}}|<span class="streamLink">{{{stream|}}}</span><span class="datetime">{{{date}}}</span><br /><span class="countdown" style="font-weight:normal"></span>}}</center></td>
 
--><td colspan="4" style="font-weight:bold; background-color:#f2f2f2; font-size:85%; line-height:90%; height:13px;"><center>{{#ifeq:{{{finished|}}}|true|{{{date}}}|<span class="streamLink">{{{stream|}}}</span><span class="datetime">{{{date}}}</span><br /><span class="countdown" style="font-weight:normal"></span>}}</center></td>
 
</tr><!--
 
</tr><!--
 
-->}}<tr class="match-row">
 
-->}}<tr class="match-row">
 
<td class="matchlistslot" width="42%" align="right" {{#ifeq:{{{winner|}}}|1|style="font-weight:bold; background-color:#cfc"}}{{#ifeq:{{{winner|}}}|draw|style="font-weight:bold; background-color:#FFFFBB"}}><!--
 
<td class="matchlistslot" width="42%" align="right" {{#ifeq:{{{winner|}}}|1|style="font-weight:bold; background-color:#cfc"}}{{#ifeq:{{{winner|}}}|draw|style="font-weight:bold; background-color:#FFFFBB"}}><!--
--> {{#if:{{{team1|}}}|{{team2/{{{team1}}}}}}} <!--
+
--> {{#if:{{{team1|}}}|{{team2/{{lc:{{{team1}}}}}}}}} <!--
--> {{#if:{{{team1tf|}}}|{{team2/tf|{{{team1tf}}}}}}}</td>
+
--> {{#if:{{{team1tf|}}}|{{team2/tf|{{{team1tf}}}}}}} <!--
 +
--></td>
 
<td width="8%" align="center" {{#switch:{{{default|}}}|1=style="font-weight:bold;"> W|2=> -|{{#ifeq:{{{winner|}}}|1|style="font-weight:bold;"}}{{#ifeq:{{{winner|}}}|draw|style="font-weight:bold;"}}> {{#if:{{{games1|}}}|{{{games1}}}|0}}}}<!--
 
<td width="8%" align="center" {{#switch:{{{default|}}}|1=style="font-weight:bold;"> W|2=> -|{{#ifeq:{{{winner|}}}|1|style="font-weight:bold;"}}{{#ifeq:{{{winner|}}}|draw|style="font-weight:bold;"}}> {{#if:{{{games1|}}}|{{{games1}}}|0}}}}<!--
 
-->{{#if:{{{details|}}}|<div class="bracket-game-details" style="margin-left:{{#expr:({{{width|300}}}-580)/2}}px;">
 
-->{{#if:{{{details|}}}|<div class="bracket-game-details" style="margin-left:{{#expr:({{{width|300}}}-580)/2}}px;">
 
<div class="header">
 
<div class="header">
<div class="left">{{#if:{{{team1|}}}|{{team2/{{{team1}}}}}}} <!--
+
<div class="left">{{#if:{{{team1|}}}|{{team2/{{lc:{{{team1}}}}}}}}} <!--
 
--> {{#if:{{{team1tf|}}}|{{team2/tf|{{{team1tf}}}}}}} </div>
 
--> {{#if:{{{team1tf|}}}|{{team2/tf|{{{team1tf}}}}}}} </div>
<div class="right">{{#if:{{{team2|}}}|{{team1/{{{team2}}}}}}} <!--
+
<div class="right">{{#if:{{{team2|}}}|{{team1/{{lc:{{{team2}}}}}}}}} <!--
 
--> {{#if:{{{team2tf|}}}|{{team1/tf|{{{team2tf}}}}}}} </div>
 
--> {{#if:{{{team2tf|}}}|{{team1/tf|{{{team2tf}}}}}}} </div>
 
</div>
 
</div>
Line 20: Line 21:
 
--> </div>}}<!--
 
--> </div>}}<!--
 
--></td>
 
--></td>
<td width="8%" align="center" {{#switch:{{{walkover|}}}|2=style="font-weight:bold;"> W|1=> -|{{#ifeq:{{{winner|}}}|2|style="font-weight:bold;"}}{{#ifeq:{{{winner|}}}|draw|style="font-weight:bold;"}}> {{#if:{{{games2|}}}|{{{games2}}}|0}}}}</td>
+
<td width="8%" align="center" {{#switch:{{{default|}}}|2=style="font-weight:bold;"> W|1=> -|{{#ifeq:{{{winner|}}}|2|style="font-weight:bold;"}}{{#ifeq:{{{winner|}}}|draw|style="font-weight:bold;"}}> {{#if:{{{games2|}}}|{{{games2}}}|0}}}}</td>
 
<td class="matchlistslot" width="42%" {{#ifeq:{{{winner|}}}|2|style="font-weight:bold; background-color:#cfc"}}{{#ifeq:{{{winner|}}}|draw|style="font-weight:bold; background-color:#FFFFBB"}}><!--
 
<td class="matchlistslot" width="42%" {{#ifeq:{{{winner|}}}|2|style="font-weight:bold; background-color:#cfc"}}{{#ifeq:{{{winner|}}}|draw|style="font-weight:bold; background-color:#FFFFBB"}}><!--
-->{{#if:{{{team2|}}}|{{team1/{{{team2}}}}}}} <!--
+
-->{{#if:{{{team2|}}}|{{team1/{{lc:{{{team2}}}}}}}}} <!--
 
--> {{#if:{{{team2tf|}}}|{{team1/tf|{{{team2tf}}}}}}}</td>
 
--> {{#if:{{{team2tf|}}}|{{team1/tf|{{{team2tf}}}}}}}</td>
 
</tr><!--
 
</tr><!--
  
<!-- Re-enable and modify under new server change
 
 
Variables transformations
 
Variables transformations
-->{{#vardefine:team1|{{#ifeq:{{{team1|}}}||TBD|{{#ifeq:{{{team1|}}}|&nbsp;|TBD|{{#explode:{{#explode:{{Team/{{{team1|}}}}}|link=|1}}|]]|0}} }}}}}}<!--
+
-->{{#vardefine:team1|{{#if:{{{team1tf|}}}|{{{team1tf|}}}|{{#ifeq:{{{team1|}}}||TBD|{{#ifeq:{{{team1|}}}|&nbsp;|TBD|{{#ifexist:Template:Team/{{{team1|}}}|{{#explode:{{#explode:{{Team/{{{team1|}}}}}|link=|1}}|]]|0}}|{{{team1|}}}}} }}}}}}}}<!--
-->{{#vardefine:team2|{{#ifeq:{{{team2|}}}||TBD|{{#ifeq:{{{team2|}}}|&nbsp;|TBD|{{#explode:{{#explode:{{Team/{{{team2|}}}}}|link=|1}}|]]|0}} }}}}}}<!--
+
-->{{#vardefine:team2|{{#if:{{{team2tf|}}}|{{{team2tf|}}}|{{#ifeq:{{{team2|}}}||TBD|{{#ifeq:{{{team2|}}}|&nbsp;|TBD|{{#ifexist:Template:Team/{{{team2|}}}|{{#explode:{{#explode:{{Team/{{{team2|}}}}}|link=|1}}|]]|0}}|{{{team2|}}}}} }}}}}}}}<!--
 +
 
 
SMW storage
 
SMW storage
 
-->{{#subobject:{{#var:team1|TBD}}_vs_{{#var:team2|TBD}}_at_{{#var:Raw_Match_date|TBD}}{{#var:timezone|}}_in_Match_{{#var:match_number|TBD}}
 
-->{{#subobject:{{#var:team1|TBD}}_vs_{{#var:team2|TBD}}_at_{{#var:Raw_Match_date|TBD}}{{#var:timezone|}}_in_Match_{{#var:match_number|TBD}}
Line 35: Line 36:
 
|has team left={{#var:team1|TBD}}
 
|has team left={{#var:team1|TBD}}
 
|has team right={{#var:team2|TBD}}
 
|has team right={{#var:team2|TBD}}
 +
|Has sub={{#var:sub1}}
 +
|Has sub={{#var:sub2}}
 +
|Has sub={{#var:sub3}}
 +
|Has sub={{#var:sub4}}
 +
|Has sub={{#var:sub5}}
 +
|Has replaced={{#var:replaced1|}}
 +
|Has replaced={{#var:replaced2|}}
 +
|Has replaced={{#var:replaced3|}}
 +
|Has replaced={{#var:replaced4|}}
 +
|Has replaced={{#var:replaced5|}}
 
|Has map date={{#var:Match_date}}{{#var:timezone}}
 
|Has map date={{#var:Match_date}}{{#var:timezone}}
 
|Has tournament={{FULLPAGENAME}}
 
|Has tournament={{FULLPAGENAME}}
 
|Has tournament tier={{#var:tournament_tier|}}
 
|Has tournament tier={{#var:tournament_tier|}}
 
|Has match stream={{{stream|{{#var:stream|}}}}}
 
|Has match stream={{{stream|{{#var:stream|}}}}}
|Has tournament name={{#var:tournament_name|}}
+
|Has tournament name={{#var:tournament_ticker_name|{{#var:tournament_name|{{FULLPAGENAME}}}}}}
 +
|Is part of series={{#var:tournament_series|}}
 
|Has tournament icon={{#var:tournament_icon|}}
 
|Has tournament icon={{#var:tournament_icon|}}
 
|Is finished={{#ifeq:{{#var:finished|}}|true|true|{{#if:{{#var:Match_date|}}|{{#ifexpr:({{#time:U}}-{{#time:U|{{#var:Match_date}}{{#var:timezone}}}}) > 30800|true|false}}|false}}}}
 
|Is finished={{#ifeq:{{#var:finished|}}|true|true|{{#if:{{#var:Match_date|}}|{{#ifexpr:({{#time:U}}-{{#time:U|{{#var:Match_date}}{{#var:timezone}}}}) > 30800|true|false}}|false}}}}
|Has team left score={{#var:team1wins|0}}
+
|Has team left score={{{games1|0}}}
|Has team right score={{#var:team2wins|0}}
+
|Has team right score={{{games2|0}}}
 +
|Has default={{{default|}}}<!--
 +
|Has details={{{details|}}} -->
 
|has exact time={{#if:{{#var:timezone|}}|true|false}}
 
|has exact time={{#if:{{#var:timezone|}}|true|false}}
}}{{#vardefine:team1wins|0}}{{#vardefine:team2wins|0}}{{#vardefine:finished|false}} --></includeonly><noinclude>[[Category:Source Liquipedia]]{{documentation}}</noinclude>
+
}}{{#vardefine:games1|0}}{{#vardefine:games2|0}}{{#vardefine:finished|false}}</includeonly><noinclude>{{documentation}}[[Category:Source Liquipedia]]</noinclude>

Latest revision as of 16:48, 5 March 2017

(view - edit) Documentation

This template is used by: