Difference between revisions of "Template:MatchMaps"

From comp.tf
Jump to navigation Jump to search
m (Resized VOD icon)
 
(71 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{date|}}}|<tr>
+
<includeonly>{{#if:{{{date|}}}|<tr><!--
<td colspan="4" style="font-weight:bold; background-color:#f2f2f2; font-size:85%; line-height:90%; height:13px;"><div style="float:left;width:20%;min-height:16px;"><!--
+
-->{{#vardefine:timezone|{{#explode:{{#explode:{{{date|}}}|data-tz="|1}}|"|0}}}}<!--
Icons for VODs
+
-->{{#vardefine:Match_date|{{#replace:{{#explode:{{{date|}}}|<|0}}|-}}}}<!--
-->{{#if:{{{log1|}}} {{{log2|}}} {{{tftv|}}} {{{esea|}}} {{{esea1|}}} {{{etf2l|}}}|<span style="float:left;"><!--
+
-->{{#vardefine:Raw_Match_date|{{#explode:{{{date|TBD}}}|<|0}}}}<!--
-->{{#if:{{{tftv|}}}|[[File:TeamfortressTV icon.png|link=http://www.teamfortress.tv/thread/{{{tftv}}}|16px|TF.TV matchpage]]}} <!--
+
--><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>
-->{{#if:{{{esea|}}}|[[File:ESEA icon.png|link=http://play.esea.net/index.php?s=stats&d=match&id={{{esea}}}|Match page and stats on ESEA]]}} <!--
+
</tr><!--
-->{{#if:{{{esea1|}}}|[[File:EseaLogo.png|link=http://play.esea.net/index.php?s=stats&d=match&id={{{esea1}}}|Match page and stats for game 1 on ESEA]]}} <!--
+
-->}}<tr class="match-row">
-->{{#if:{{{esea2|}}}|[[File:EseaLogo.png|link=http://play.esea.net/index.php?s=stats&d=match&id={{{esea2}}}|Match page and stats for game 2 on ESEA]]}} <!--
+
<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:{{{esea3|}}}|[[File:EseaLogo.png|link=http://play.esea.net/index.php?s=stats&d=match&id={{{esea3}}}|Match page and stats for game 3 on ESEA]]}} <!--
+
--> {{#if:{{{team1|}}}|{{team2/{{lc:{{{team1}}}}}}}}} <!--
-->{{#if:{{{etf2l|}}}|[[File:ETF2L-Icon.png|link=http://etf2l.org/matches/{{{etf2l}}}|16px|Match page on ETF2L]]}} <!--
+
--> {{#if:{{{team1tf|}}}|{{team2/tf|{{{team1tf}}}}}}} <!--
-->{{#if:{{{log1|}}}|[[File:Logs.tf icon.png|link=http://logs.tf/{{{log1}}}|16px|Logs for game 1]]}} <!--
+
--></td>
-->{{#if:{{{log2|}}}|[[File:Logs.tf icon.png|link=http://logs.tf/{{{log2}}}|16px|Logs for game 2]]}} <!--
+
<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:{{{log3|}}}|[[File:Logs.tf icon.png|link=http://logs.tf/{{{log3}}}|16px|Logs for game 3]]}} <!--
+
-->{{#if:{{{details|}}}|<div class="bracket-game-details" style="margin-left:{{#expr:({{{width|300}}}-580)/2}}px;">
-->{{#if:{{{log4|}}}|[[File:Logs.tf icon.png|link=http://logs.tf/{{{log4}}}|16px|Logs for game 4]]}} </span>}}</div><!--
+
<div class="header">
--><div style="float:left;width:60%;height:{{#ifeq:{{{approx-time|}}}|true|32px|auto}};"><center style="margin-top:3px;">{{#if:{{{finished|}}}|{{{date}}}|{{#ifeq:{{{approx-time|}}}|true|~ }}{{{date}}}<span class="streamLink">{{{stream|}}}</span><span class="datetime" style="display:none">{{{date}}}</span><span  style="padding:5px 0px 0px 0px; display:block;" class="countdown"></span>}}</center></div><div style="float:left;width:20%;height:auto;"><!--
+
<div class="left">{{#if:{{{team1|}}}|{{team2/{{lc:{{{team1}}}}}}}}} <!--
Icons for stats, HLTV, etc.
+
--> {{#if:{{{team1tf|}}}|{{team2/tf|{{{team1tf}}}}}}} </div>
-->{{#if:{{{vod|}}} {{{youtube1|}}} {{{youtube2|}}} {{{youtube3|}}} {{{youtube4|}}}|<span style="float:right;margin-top:2px;"> <!--
+
<div class="right">{{#if:{{{team2|}}}|{{team1/{{lc:{{{team2}}}}}}}}} <!--
-->{{#if:{{{vod|}}}|[[File:VOD_icon.png|link={{{vod}}}|15px|Game VOD]]}} <!--
+
--> {{#if:{{{team2tf|}}}|{{team1/tf|{{{team2tf}}}}}}} </div>
-->{{#if:{{{youtube1|}}}|[[File:Youtube_icon.png|link=https://youtu.be/{{{youtube1}}}|VOD for game 1]]}} <!--
+
</div>
-->{{#if:{{{youtube2|}}}|[[File:Youtube_icon.png|link=https://youtu.be/{{{youtube2}}}|VOD for game 2]]}} <!--
+
{{{details}}}<!--
-->{{#if:{{{youtube3|}}}|[[File:Youtube_icon.png|link=https://youtu.be/{{{youtube3}}}|VOD for game 3]]}} <!--
+
--> </div>}}<!--
-->{{#if:{{{youtube4|}}}|[[File:Youtube_icon.png|link=https://youtu.be/{{{youtube4}}}|VOD for game 4]]}} <!--
+
--></td>
-->{{#if:{{{interview|}}}|[[File:Int_Icon.png|link={{{interview}}}|15px|Interview]]}} </span>}}</div></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>
</tr>}}<!--
+
<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"}}><!--
--><tr>
+
-->{{#if:{{{team2|}}}|{{team1/{{lc:{{{team2}}}}}}}}} <!--
<td class="matchlistslot" width="44%" align="right" {{#ifeq:{{{winner|}}}|1|style="font-weight:bold; background-color:#dfd"}}{{#ifeq:{{{winner|}}}|draw|style="font-weight:bold; background-color:#ffd"}}><!--
+
--> {{#if:{{{team2tf|}}}|{{team1/tf|{{{team2tf}}}}}}}</td>
--> {{#if:{{{T1|}}}|{{Team2/{{{T1}}}}}}}</td>
+
</tr><!--
<td width="6%" 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;"}}>
+
 
{{{games1|0 [[Category:Template MatchMaps missing scores]]}}}}}</td>
+
Variables transformations
<td width="6%" 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;"}}>
+
-->{{#vardefine:team1|{{#if:{{{team1tf|}}}|{{{team1tf|}}}|{{#ifeq:{{{team1|}}}||TBD|{{#ifeq:{{{team1|}}}|&nbsp;|TBD|{{#ifexist:Template:Team/{{{team1|}}}|{{#explode:{{#explode:{{Team/{{{team1|}}}}}|link=|1}}|]]|0}}|{{{team1|}}}}} }}}}}}}}<!--
{{{games2|0}}}}}</td>
+
-->{{#vardefine:team2|{{#if:{{{team2tf|}}}|{{{team2tf|}}}|{{#ifeq:{{{team2|}}}||TBD|{{#ifeq:{{{team2|}}}|&nbsp;|TBD|{{#ifexist:Template:Team/{{{team2|}}}|{{#explode:{{#explode:{{Team/{{{team2|}}}}}|link=|1}}|]]|0}}|{{{team2|}}}}} }}}}}}}}<!--
<td class="matchlistslot" width="44%" {{#ifeq:{{{winner|}}}|2|style="font-weight:bold; background-color:#dfd"}}{{#ifeq:{{{winner|}}}|draw|style="font-weight:bold; background-color:#ffd"}}><!--
+
 
--> {{#if:{{{T2|}}}|{{Team/{{{T2}}}}}}}</td>
+
SMW storage
{{#if:{{{map1|}}} {{{map2|}}} {{{map3|}}} {{{map4|}}} {{{map5|}}} {{{map6|}}} {{{map7|}}} {{{map8|}}} {{{map9|}}} |</tr><tr class="maprow">
+
-->{{#subobject:{{#var:team1|TBD}}_vs_{{#var:team2|TBD}}_at_{{#var:Raw_Match_date|TBD}}{{#var:timezone|}}_in_Match_{{#var:match_number|TBD}}
<td colspan="4" style="font-size:85%; line-height:130%; text-align:left;">
+
|is map number=1
{{#if:{{{map1|}}}|{{MapWinner|{{{map1|}}}|{{{map1win|}}}}}}}{{#if:{{{map1score|}}}|<div style="text-align:center;">{{{map1score}}}</div>}}<!--
+
|has team left={{#var:team1|TBD}}
-->{{#if:{{{map2|}}}|{{MapWinner|{{{map2|}}}|{{{map2win|}}}}}}}{{#if:{{{map2score|}}}|<div style="text-align:center;">{{{map2score}}}</div>}}<!--
+
|has team right={{#var:team2|TBD}}
-->{{#if:{{{map3|}}}|{{MapWinner|{{{map3|}}}|{{{map3win|}}}}}}}{{#if:{{{map3score|}}}|<div style="text-align:center;">{{{map3score}}}</div>}}<!--
+
|Has sub={{#var:sub1}}
-->{{#if:{{{map4|}}}|{{MapWinner|{{{map4|}}}|{{{map4win|}}}}}}}{{#if:{{{map4score|}}}|<div style="text-align:center;">{{{map4score}}}</div>}}<!--
+
|Has sub={{#var:sub2}}
-->{{#if:{{{map5|}}}|{{MapWinner|{{{map5|}}}|{{{map5win|}}}}}}}{{#if:{{{map5score|}}}|<div style="text-align:center;">{{{map5score}}}</div>}}<!--
+
|Has sub={{#var:sub3}}
-->{{#if:{{{map6|}}}|{{MapWinner|{{{map6|}}}|{{{map6win|}}}}}}}{{#if:{{{map6score|}}}|<div style="text-align:center;">{{{map6score}}}</div>}}<!--
+
|Has sub={{#var:sub4}}
-->{{#if:{{{map7|}}}|{{MapWinner|{{{map7|}}}|{{{map7win|}}}}}}}{{#if:{{{map7score|}}}|<div style="text-align:center;">{{{map7score}}}</div>}}<!--
+
|Has sub={{#var:sub5}}
-->{{#if:{{{map8|}}}|{{MapWinner|{{{map8|}}}|{{{map8win|}}}}}}}{{#if:{{{map8score|}}}|<div style="text-align:center;">{{{map8score}}}</div>}}<!--
+
|Has replaced={{#var:replaced1|}}
-->{{#if:{{{map9|}}}|{{MapWinner|{{{map9|}}}|{{{map9win|}}}}}}}{{#if:{{{map9score|}}}|<div style="text-align:center;">{{{map9score}}}</div>}}</td>}}
+
|Has replaced={{#var:replaced2|}}
</tr></includeonly><noinclude>{{documentation}}[[Category:Source Liquipedia]]</noinclude>
+
|Has replaced={{#var:replaced3|}}
 +
|Has replaced={{#var:replaced4|}}
 +
|Has replaced={{#var:replaced5|}}
 +
|Has map date={{#var:Match_date}}{{#var:timezone}}
 +
|Has tournament={{FULLPAGENAME}}
 +
|Has tournament tier={{#var:tournament_tier|}}
 +
|Has match stream={{{stream|{{#var:stream|}}}}}
 +
|Has tournament name={{#var:tournament_ticker_name|{{#var:tournament_name|{{FULLPAGENAME}}}}}}
 +
|Is part of series={{#var:tournament_series|}}
 +
|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}}}}
 +
|Has team left score={{{games1|0}}}
 +
|Has team right score={{{games2|0}}}
 +
|Has default={{{default|}}}<!--
 +
|Has details={{{details|}}} -->
 +
|has exact time={{#if:{{#var:timezone|}}|true|false}}
 +
}}{{#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: