Difference between revisions of "Template:Infobox MLB All-Star Game"

From blackwiki
Jump to navigation Jump to search
imported>Frietjes
m (Frietjes moved page Template:MLB All-Star Game to Template:Infobox MLB All-Star Game: naming convention for infobox templates)
imported>Frietjes
(update to use template:infobox and simplify the previous/next linking)
Line 1: Line 1:
{| class="infobox" width="300" style="font-size: 90%;"
+
{{infobox
|+ style="margin-left: inherit; font-size: medium;" | {{#if:{{{Different Current|}}}| '''{{{Different Current}}}'''| '''{{{year}}} Major League Baseball All-Star Game'''}}
+
| bodystyle = width:300px; font-size:90%
|- style="text-align: center; background: #ffffff;"
+
 
| colspan="3" | {{{image}}}
+
| titlestyle = font-size:medium
|-
+
| title = {{#if:{{{name|{{{Different Current|}}}}}} | {{{name|{{{Different Current}}}}}} | {{{year}}} Major League Baseball All-Star Game }}
| align="center" colspan="3" |
+
 
{| align="center" style="background-color:transparent;"
+
| imagestyle = background: #ffffff
|- style="text-align:center;"
+
| image = {{{image|}}}
!
+
 
!1
+
| data1 = {{baseball linescore table
!2
+
| visitor = {{{visitor|}}}
!3
+
| top1 = {{{top1|}}}
!4
+
| top2 = {{{top2|}}}
!5
+
| top3 = {{{top3|}}}
!6
+
| top4 = {{{top4|}}}
!7
+
| top5 = {{{top5|}}}
!8
+
| top6 = {{{top6|}}}
!9<!--
+
| top7 = {{{top7|}}}
-->{{#if:{{{top10|}}}|!!10}}<!--
+
| top8 = {{{top8|}}}
-->{{#if:{{{top11|}}}|!!11}}<!--
+
| top9 = {{{top9|}}}
-->{{#if:{{{top12|}}}|!!12}}<!--
+
| top10 = {{{top10|}}}
-->{{#if:{{{top13|}}}|!!13}}<!--
+
| top11 = {{{top11|}}}
-->{{#if:{{{top14|}}}|!!14}}<!--
+
| top12 = {{{top12|}}}
-->{{#if:{{{top15|}}}|!!15}}<!--
+
| top13 = {{{top13|}}}
-->{{#if:{{{top16|}}}|!!16}}
+
| top14 = {{{top14|}}}
!width="8"|R
+
| top15 = {{{top15|}}}
!width="8"|H
+
| top16 = {{{top16|}}}
!width="8"|E
+
| visitor_r = {{{visitor_r|}}}
|- style="text-align:center;"
+
| visitor_h = {{{visitor_h|}}}
|align="right" nowrap|{{{visitor}}}
+
| visitor_e = {{{visitor_e|}}}
| bgcolor="#efefef"|{{{top1}}}
+
| home = {{{home|}}}
| bgcolor="#efefef"|{{{top2}}}
+
| bot1 = {{{bot1|}}}
| bgcolor="#efefef"|{{{top3}}}
+
| bot2 = {{{bot2|}}}
| bgcolor="#efefef"|{{{top4}}}
+
| bot3 = {{{bot3|}}}
| bgcolor="#efefef"|{{{top5}}}
+
| bot4 = {{{bot4|}}}
| bgcolor="#efefef"|{{{top6}}}
+
| bot5 = {{{bot5|}}}
| bgcolor="#efefef"|{{{top7}}}
+
| bot6 = {{{bot6|}}}
| bgcolor="#efefef"|{{{top8}}}
+
| bot7 = {{{bot7|}}}
| bgcolor="#efefef"|{{{top9}}}<!--
+
| bot8 = {{{bot8|}}}
-->{{#if:{{{bot10|}}}|<td bgcolor="#efefef">{{{top10}}}</td>|</td>}}<!--
+
| bot9 = {{{bot9|}}}
-->{{#if:{{{bot11|}}}|<td bgcolor="#efefef">{{{top11}}}</td>}}<!--
+
| bot10 = {{{bot10|}}}
-->{{#if:{{{bot12|}}}|<td bgcolor="#efefef">{{{top12}}}</td>|</td>}}<!--
+
| bot11 = {{{bot11|}}}
-->{{#if:{{{bot13|}}}|<td bgcolor="#efefef">{{{top13}}}</td>}}<!--
+
| bot12 = {{{bot12|}}}
-->{{#if:{{{bot14|}}}|<td bgcolor="#efefef">{{{top14}}}</td>|</td>}}<!--
+
| bot13 = {{{bot13|}}}
-->{{#if:{{{bot15|}}}|<td bgcolor="#efefef">{{{top15}}}</td>}}<!--
+
| bot14 = {{{bot14|}}}
-->{{#if:{{{bot16|}}}|<td bgcolor="#efefef">{{{top16}}}</td>|</td>}}
+
| bot15 = {{{bot15|}}}
<td><b>{{{visitor_r}}}</b></td>
+
| bot16 = {{{bot16|}}}
<td><b>{{{visitor_h}}}</b></td>
+
| home_r = {{{home_r|}}}
<td><b>{{{visitor_e}}}</b></td>
+
| home_h = {{{home_h|}}}
|- style="text-align:center;"
+
| home_e = {{{home_e|}}}
|align="right" nowrap|{{{home}}}
+
}}
| bgcolor="#efefef"|{{{bot1}}}
+
 
| bgcolor="#efefef"|{{{bot2}}}
+
| label2 = Date
| bgcolor="#efefef"|{{{bot3}}}
+
| data2 = {{{date|}}}
| bgcolor="#efefef"|{{{bot4}}}
+
 
| bgcolor="#efefef"|{{{bot5}}}
+
| label4 = Venue
| bgcolor="#efefef"|{{{bot6}}}
+
| data4 = {{{venue|}}}
| bgcolor="#efefef"|{{{bot7}}}
+
 
| bgcolor="#efefef"|{{{bot8}}}
+
| label5 = City
| bgcolor="#efefef"|{{{bot9}}}<!--
+
| data5 = {{{city|}}}
-->{{#if:{{{bot10|}}}|<td bgcolor="#efefef">{{{bot10}}}</td>|</td>}}<!--
+
 
-->{{#if:{{{bot11|}}}|<td bgcolor="#efefef">{{{bot11}}}</td>}}<!--
+
| label6 = Managers
-->{{#if:{{{bot12|}}}|<td bgcolor="#efefef">{{{bot12}}}</td>|</td>}}<!--
+
| data6 = {{#if:{{{VisitorManager|}}}
-->{{#if:{{{bot13|}}}|<td bgcolor="#efefef">{{{bot13}}}</td>}}<!--
+
|{{{visitor}}} - {{{VisitorManager}}} {{#if:{{{VisitorManagerTeam|}}}|({{{VisitorManagerTeam}}})}}<br>
-->{{#if:{{{bot14|}}}|<td bgcolor="#efefef">{{{bot14}}}</td>|</td>}}<!--
+
}}{{#if:{{{HomeManager|}}}
-->{{#if:{{{bot15|}}}|<td bgcolor="#efefef">{{{bot15}}}</td>}}<!--
+
|{{{home}}} - {{{HomeManager}}} {{#if:{{{HomeManagerTeam|}}}|({{{HomeManagerTeam}}})}}
-->{{#if:{{{bot16|}}}|<td bgcolor="#efefef">{{{bot16}}}</td>|</td>}}
+
}}
<td><b>{{{home_r}}}</b></td>
+
 
<td><b>{{{home_h}}}</b></td>
+
| label7 = MVP
<td><b>{{{home_e}}}</b></td>
+
| data7 = {{#if: {{{MVP|}}}|{{{MVP}}} ({{{MVPTeam}}})}}
|}
+
 
|- style="vertical-align: middle;"
+
| label8 = Attendance
| '''Date''' || colspan="2" |{{{date}}}
+
| data8 = {{{attendance|}}}
|- style="vertical-align: middle;"
+
 
| '''Venue''' || colspan="2" |{{{venue}}}
+
 
|- style="vertical-align: middle;"
+
| label9 = [[Ceremonial first pitch|First pitch]]
| '''City''' || colspan="2" |{{{city}}}
+
| data9 = {{{firstpitch|}}}
|- style="vertical-align: middle;"
+
 
| '''Managers''' || colspan="2" |{{{visitor}}} - {{{VisitorManager}}} ({{{VisitorManagerTeam}}})<br>{{{home}}} - {{{HomeManager}}} ({{{HomeManagerTeam}}})
+
| label10 = [[List of Major League Baseball All-Star Game broadcasters|Television]]
|- style="vertical-align: middle;"
+
| data10 = {{{television|}}}
{{#if: {{{MVP|}}}|<td> '''MVP''' </td><td> {{{MVP}}} ({{{MVPTeam}}})</td> }}
+
 
|- style="vertical-align: middle;"
+
| label11 = [[List of Major League Baseball All-Star Game broadcasters|TV announcers]]
| '''Attendance''' || colspan="2" |{{{attendance}}}
+
| data11 = {{{tv_announcers|}}}
|- style="vertical-align: middle;"
+
 
| '''[[Ceremonial first pitch|First pitch]]''' || colspan="2" |{{{firstpitch}}}
+
| label12 = [[List of Major League Baseball All-Star Game broadcasters|Radio]]
|- style="vertical-align: middle;"
+
| data12 = {{{radio|}}}
{{#if:{{{television|}}}|
+
 
{{!}} '''[[List of Major League Baseball All-Star Game broadcasters|Television]]'''
+
| label13 = [[List of Major League Baseball All-Star Game broadcasters|Radio announcers]]
{{!}} {{{television}}}}}
+
| data13 = {{{radio_announcers|}}}
|- style="vertical-align: middle;"
+
 
{{#if:{{{tv_announcers|}}}|
+
| belowstyle = border-top:solid #aaa 1px
{{!}} '''[[List of Major League Baseball All-Star Game broadcasters|TV announcers]]'''
+
| below =
{{!}} {{{tv_announcers}}}}}
+
<table style="width:100%; background:transparent; font-weight:bold"><tr>
|- style="vertical-align: middle;"
+
<td style="text-align:left; width:25%">{{#if:{{{previous|{{{Different Previous|}}}}}}
{{#if:{{{radio|}}}|
+
  | &lt;&nbsp;{{{previous|{{{Different Previous}}}}}}
{{!}} '''[[List of Major League Baseball All-Star Game broadcasters|Radio]]'''
+
  | {{#ifexist:{{#expr:{{{year|{{CURRENTYEAR}}}}}-1}} Major League Baseball All-Star Game
{{!}} {{{radio}}}}}
+
    | &lt;&nbsp;[[{{#expr:{{{year|{{CURRENTYEAR}}}}}-1}} Major League Baseball All-Star Game|{{#expr:{{{year|{{CURRENTYEAR}}}}}-1}}]]
|- style="vertical-align: middle;"
+
    | <!-- no previous game -->
{{#if:{{{radio_announcers|}}}|
+
    }}
{{!}} '''[[List of Major League Baseball All-Star Game broadcasters|Radio announcers]]'''
+
  }}</td>
{{!}} {{{radio_announcers}}}}}
+
<td style="text-align:center; width:50%">[[Major League Baseball All-Star Game]]</td>
|-
+
<td style="text-align:right; width:25%">{{#if:{{{next|{{{Different Next|}}}}}}
| align="center" width=25% | {{#if:{{{FirstGameEverPlayed|}}}| ''' &nbsp; '''| {{#if:{{{Different Previous|}}}| ''' &nbsp;&lt; {{{Different Previous}}}''' | '''[[{{#expr:{{{year|{{CURRENTYEAR}}}}}-1}} Major League Baseball All-Star Game| &nbsp;&lt; {{#expr:{{{year|{{CURRENTYEAR}}}}}-1}}]]'''}}}}
+
  | {{{next|{{{Different Next}}}}}}&nbsp;&gt;
| align="center" width=50% | '''[[Major League Baseball All-Star Game]]'''
+
  | {{#ifexist:{{#expr:{{{year|{{CURRENTYEAR}}}}}+1}} Major League Baseball All-Star Game
| align="center" width=25% | {{#if:{{{LastGameEverPlayed|}}}| ''' &nbsp; '''| {{#if:{{{Different Next|}}}| '''{{{Different Next}}} &gt;&nbsp; ''' |'''[[{{#expr:{{{year|{{CURRENTYEAR}}}}}+1}} Major League Baseball All-Star Game|{{#expr:{{{year|{{CURRENTYEAR}}}}}+1}} &gt;&nbsp;]]'''}}}}
+
    | [[{{#expr:{{{year|{{CURRENTYEAR}}}}}+1}} Major League Baseball All-Star Game|{{#expr:{{{year|{{CURRENTYEAR}}}}}+1}}]]&nbsp;&gt;
|}<noinclude>
+
    | {{#expr:{{{year|{{CURRENTYEAR}}}}}+1}}]]&nbsp;&gt;
 +
    }}
 +
  }}</td>
 +
</tr></table>
 +
}}{{#ifeq:{{{Different Current|§}}}{{{Different Next|§}}}{{{Different Previous|§}}}|§§§||[[Category:Infobox MLB All-Star Game template using undocumented parameters]]}}<noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
</noinclude>
 
</noinclude>

Revision as of 18:00, 5 December 2012

{{{year}}} Major League Baseball All-Star Game
Template:Baseball linescore table
Major League Baseball All-Star Game 2027]] >

[[Category:Infobox templates|Template:Remove first word]]

Template documentation[view] [edit] [history] [purge]

Usage

{{Infobox MLB All-Star Game
| image =
| year =
| visitor =
| top1 =
| top2 =
| top3 =
| top4 =
| top5 =
| top6 =
| top7 =
| top8 =
| top9 =
| visitor_r =
| visitor_h =
| visitor_e =
| home =
| bot1 =
| bot2 =
| bot3 =
| bot4 =
| bot5 =
| bot6 =
| bot7 =
| bot8 =
| bot9 =
| home_r =
| home_h =
| home_e =
| date =
| venue =
| city =
| VisitorManager =
| VisitorManagerTeam =
| HomeManager =
| HomeManagerTeam =
| MVP =
| MVPTeam =
| TVstation =
| TVcommentators =
| attendance =
| firstpitch =
}}

Basic example

{{Infobox MLB All-Star Game
| image = [[file:example.jpg]]
| year = 2007
| visitor = National
| top1 = 0
| top2 = 0
| top3 = 0
| top4 = 0
| top5 = 0
| top6 = 0
| top7 = 2
| top8 = 0
| top9 = 1
| top10 = 1
| top11 = 1
| top12 = 1
| visitor_r = 6
| visitor_h = 17
| visitor_e = 0
| home = American
| bot1 = 1
| bot2 = 0
| bot3 = 0
| bot4 = 0
| bot5 = 0
| bot6 = 0
| bot7 = 2
| bot8 = 0
| bot9 = 1
| bot10 = 1
| bot11 = 1
| bot12 = 2
| home_r = 8
| home_h = 11
| home_e = 1
| date = June 28, 2007
| venue = Metrodome
| city = Minneapolis
| VisitorManager = Lou Piniella
| VisitorManagerTeam = [[Chicago Cubs|CHI]]
| HomeManager = Ron Gardenhire
| HomeManagerTeam = [[Minnesota Twins|MIN]]
| MVP = Justin Morneau
| MVPTeam = [[Minnesota Twins|MIN]]
| TVstation = FOX
| TVcommentators = Jack Buck, Tim McCarver
| attendance = 20,000
| firstpitch = Tony Gwynn
}}

Example for years with two games

{{Infobox MLB All-Star Game
| image = [[File:1959MLBAllStarGame2.png|175px]]
| year = 1959
| name = 1959 Major League Baseball All-Star Game (second game)
| visitor = '''[[American League]]'''
| top1 = 0
| top2 = 1
| top3 = 2
| top4 = 0
| top5 = 0
| top6 = 0
| top7 = 1
| top8 = 1
| top9 = 0
| visitor_r = 5
| visitor_h = 6
| visitor_e = 0
| home = [[National League]]
| bot1 = 1
| bot2 = 0
| bot3 = 0
| bot4 = 0
| bot5 = 1
| bot6 = 0
| bot7 = 1
| bot8 = 0
| bot9 = 0
| home_r = 3
| home_h = 6
| home_e = 3
| date = August 3, 1959
| venue = [[Los Angeles Memorial Coliseum]]
| city = [[Los Angeles]], [[California]]
| VisitorManager = [[Casey Stengel]]
| VisitorManagerTeam = [[New York Yankees|NYY]]
| HomeManager = [[Fred Haney]]
| HomeManagerTeam = [[Atlanta Braves|MIL]]
| television = [[Major League Baseball on NBC|NBC]]
| tv_announcers = [[Mel Allen]] and [[Vin Scully]]
| radio = [[Major League Baseball on NBC Radio|NBC]]
| radio_announcers = [[Bob Neal (Cleveland sportscaster)|Bob Neal]] and [[Russ Hodges]]
| attendance = 55,105
| firstpitch = 
| previous = [[1959 Major League Baseball All-Star Game (first game)|1959 (first game)]]
| next = [[1960 Major League Baseball All-Star Game (first game)|1960 (first game)]]
}}

de:Vorlage:Infobox MLB All-Star Game fr:Modèle:Infobox MLB All-Star Game zh:模板:MLB All-Star Game