Difference between revisions of "Template:Infobox Region"

From Hattrick
(Add parser function on regionid to make it so that special pages can be leveraged to find missing regionids, otherwise they produce malformed HT links.)
 
(6 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
-->{| align="right" cellpadding="4" style="border: 1px #aaaaaa solid; width: 20em; font-size: 95%; margin: 0 0 1em 1em;"  
 
-->{| align="right" cellpadding="4" style="border: 1px #aaaaaa solid; width: 20em; font-size: 95%; margin: 0 0 1em 1em;"  
 
|+ style="margin-center: inherit; font-size: medium;" | '''{{{full_local_name}}}'''
 
|+ style="margin-center: inherit; font-size: medium;" | '''{{{full_local_name}}}'''
|-
+
{{#if:{{{image_flag|{{{image_coat|}}}}}}|{{!}}-
|- style="text-align: center;"
+
{{!}} align="center" colspan="2" {{!}}
| colspan="2" style="background:#ffffff;" | [[Image:{{{image_coat}}}|100px|Coat of {{{name_(english)}}}]]
+
{{{!}} style="width: 280px; background: none; text-align: center;"
 +
{{!}}- style="vertical-align: middle;"
 +
{{!}} style="border: 0;" align="center" {{!}} <span style="display:table-cell; border-collapse:collapse; border: solid 1px #BBBBBB;">[[Image:{{{image_flag}}}|125px|Flag of {{{name_(english)}}}]]</span>
 +
{{#if:{{{image_coat|}}}|{{!}} style="border: 0;" {{!}} [[Image:{{{image_coat}}}|110px|Coat of Arms of {{{name_(english)}}}]]|}}
 +
{{!}}}|}}
 
|-
 
|-
 
|- style="text-align: center;"
 
|- style="text-align: center;"
Line 21: Line 25:
 
|-
 
|-
 
| '''[[Countries|Country]]:'''
 
| '''[[Countries|Country]]:'''
|[[{{{country}}}]]
+
|{{Flag|{{{country}}}}}
 
|-
 
|-
 
| '''Latitude:'''
 
| '''Latitude:'''
Line 28: Line 32:
 
| '''Longitude:'''
 
| '''Longitude:'''
 
|{{{longitude}}}
 
|{{{longitude}}}
|-
+
{{#if: {{{regionid|}}}|{{!}}-
| '''RegionID:'''
+
{{!}} '''RegionID:'''
|{{#if: {{{regionid|}}}|[http://www.hattrick.org/World/Regions/Region.aspx?RegionID={{{regionid}}} {{{regionid}}}]|[[File:no.regionid]]}}
+
{{!}}[http://www.hattrick.org/World/Regions/Region.aspx?RegionID={{{regionid}}} {{{regionid}}}]|<includeonly>[[Category:Regions missing ID]]</includeonly>}}
 +
{{#if: {{{number_of_teams|}}}|{{!}}-
 +
{{!}} '''Number of teams:'''
 +
{{!}} {{{number_of_teams}}}|}}
 
|-
 
|-
 
| '''[[Hattrick Time|Time zone]]:'''
 
| '''[[Hattrick Time|Time zone]]:'''
 
| {{{htt_offset}}}
 
| {{{htt_offset}}}
 
|-
 
|-
| colspan=2 | <small>{{{footnotes}}}</small>
+
| colspan=2 | <small>{{{footnotes|}}}</small>
|}<noinclude>[[Category:Region templates]]</noinclude>
+
|}<noinclude>
 +
{{Documentation}}
 +
[[Category:Region templates]]
 +
</noinclude>

Latest revision as of 20:51, 17 May 2010

{{{full_local_name}}}
Link to Wikipedia
Continent: [[{{{continent}}}]]
Zone: [[{{{zone}}}]]
Country: {{country data {{{country}}} country flag2 name = {{{country}}} variant = altlink = size =

}}

Latitude: {{{latitude}}}
Longitude: {{{longitude}}}


Time zone: {{{htt_offset}}}

[edit] Template documentation

Usage

Parameter explanation

{{Infobox_Region|
  | full_local_name   = official (local) name of the region in Hattrick
  | name_(english)    = name of the region in English
  | image_flag        = image of the regional flag (optional)
  | image_coat        = image of the regional coat of arms (optional)
  | image_map         = optional image with the location of the region on the globe
  | continent         = continent
  | zone              = Hattrick-zone where this country belongs (Western Europe, Eastern Europe...)
  | country           = country where the region belongs 
  | latitude          = as the name says (check your regional page @ hattrick.org)
  | longitude         = same as above
  | number_of_teams   = approximate number of teams (10k, 20k, 30k ...)
  | regionid          = id of the region in Hattrick (optional)
  | htt_offset        = offset to Hattrick time
  | footnotes         = additional notes (optional)
}}

See Thüringen for an working example.


Guidelines

  • All the images needed (flag, map) can be obtained from the country's page at Wikipedia.