Difference between revisions of "Template:Region"

From eRepublik Official Wiki
Jump to: navigation, search
m (Undo revision 511936 by Sampo555 (talk) - ...if it would work :()
 
(added optional map field in case autolinking map doesn't work)
 
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<includeonly><div style="float:right; clear:right; opacity:1; width:250px; border:2px solid #C6E4F2; -moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;font-size:100%; background-color:#F1FAFF; margin:0px 0px 10px 10px; padding:10px 0px 5px 0px; text-align:left;">
 
<includeonly><div style="float:right; clear:right; opacity:1; width:250px; border:2px solid #C6E4F2; -moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;font-size:100%; background-color:#F1FAFF; margin:0px 0px 10px 10px; padding:10px 0px 5px 0px; text-align:left;">
<div align="center"><span class="plainlinks" style="padding:1px;  font-size:130%; font-weight:bold; text-align:center; color:#3C8FA7">[http://www.erepublik.com/en/region/{{#if: {{{link|}}}|{{{link|}}}|{{{name|}}}}} <span>{{{name|Unnamed region}}}</span>]</span>
+
<div align="center"><span class="plainlinks" style="padding:1px;  font-size:130%; font-weight:bold; text-align:center; color:#3C8FA7">[http://www.erepublik.com/en/region/{{#if: {{{link|}}}|{{{link|}}}|{{{name|}}}}} <span>{{{name|Unnamed region}}}</span>{{#if:{{{altname1|}}}|<br /><span style="font-size:12px;">''{{{altname1|}}}''</span>|}}{{#if:{{{altname2|}}}|<br /><span style="font-size:12px;">''{{{altname2|}}}''</span>|}}{{#if:{{{altname3|}}}|<br /><span style="font-size:12px;">''{{{altname3|}}}''</span>|}}]</span>
  
 
<span style="font-family:sans-serif; font-size:120%; font-weight:bold;">{{CountryLink|{{#ifeq:{{Regions/Owners|{{BASEPAGENAME}}}}|FAIL|{{{country|eRepublik}}}|{{Regions/Owners|{{BASEPAGENAME}}}}}}}}</span>
 
<span style="font-family:sans-serif; font-size:120%; font-weight:bold;">{{CountryLink|{{#ifeq:{{Regions/Owners|{{BASEPAGENAME}}}}|FAIL|{{{country|eRepublik}}}|{{Regions/Owners|{{BASEPAGENAME}}}}}}}}</span>
Line 8: Line 8:
 
| {{#if: {{{map|}}}|style="border-bottom:1px solid #C6E4F2; margin-bottom:5px; padding-bottom:5px; width:222px"}}|<center>[[File:Flag-{{#ifeq:{{Regions/Owners|{{BASEPAGENAME}}}}|FAIL|{{{country|eRepublik}}}|{{Regions/Owners|{{BASEPAGENAME}}}}}}.jpg|110px|Flag of the owner|link={{#ifeq:{{Regions/Owners|{{BASEPAGENAME}}}}|FAIL|{{{country|eRepublik}}}|{{Regions/Owners|{{BASEPAGENAME}}}}}}]]&nbsp;&nbsp;{{#if: {{{coatofarms|}}}| [[File:{{{coatofarms|}}}{{!}}60px{{!}}Coat of Arms of {{{name|unknown region}}}]]|}}</center>
 
| {{#if: {{{map|}}}|style="border-bottom:1px solid #C6E4F2; margin-bottom:5px; padding-bottom:5px; width:222px"}}|<center>[[File:Flag-{{#ifeq:{{Regions/Owners|{{BASEPAGENAME}}}}|FAIL|{{{country|eRepublik}}}|{{Regions/Owners|{{BASEPAGENAME}}}}}}.jpg|110px|Flag of the owner|link={{#ifeq:{{Regions/Owners|{{BASEPAGENAME}}}}|FAIL|{{{country|eRepublik}}}|{{Regions/Owners|{{BASEPAGENAME}}}}}}]]&nbsp;&nbsp;{{#if: {{{coatofarms|}}}| [[File:{{{coatofarms|}}}{{!}}60px{{!}}Coat of Arms of {{{name|unknown region}}}]]|}}</center>
 
|-
 
|-
|{{#if: {{{map|}}}|style="padding-top:5px;"{{!}}<center>[[File:{{{map|}}}|220px|Map of the region]]</center>}}
+
|style="padding-top:5px;"{{!}}<center>{{#ifexist: File:Region-{{BASEPAGENAME}}.png | [[File:Region-{{BASEPAGENAME}}.png|220px|Map of the region]] | {{#ifexist: File:Region-{{{name}}}.png | [[File:Region-{{{name}}}.png|220px|Map of the region]] | [[File:{{{map}}}|220px|Map of the region]]}} }}</center>
 +
 
 +
|-
 +
{| style="background:transparent; width:220px; font-size: 90%; text-align: center;" colspan="3"
 +
| {{#ifeq: {{Region/HistoricalCapitalSwitch}}|{{BASEPAGENAME}}|'''''[[Historical capital]]''' of {{RegionLink/Original|{{BASEPAGENAME}}}}''}}
 
|}
 
|}
 
</div>
 
</div>
Line 21: Line 25:
 
{{RowV2|Original owner|{{#ifeq: {{Regions/Owners|{{BASEPAGENAME}}}}|{{RegionLink/Original|{{BASEPAGENAME}}}}||{{FlagLink|{{RegionLink/Original|{{BASEPAGENAME}}}}}}}}}}
 
{{RowV2|Original owner|{{#ifeq: {{Regions/Owners|{{BASEPAGENAME}}}}|{{RegionLink/Original|{{BASEPAGENAME}}}}||{{FlagLink|{{RegionLink/Original|{{BASEPAGENAME}}}}}}}}}}
 
{{RowV2|Capital|{{{capital|}}} }}
 
{{RowV2|Capital|{{{capital|}}} }}
{{RowV2|Population|{{{population|}}}}}
+
{{RowV2|Residents|{{{residents|}}}}}
 +
{{RowV2|Visitors|{{{visitors|}}}}}
 
{{RowV2|Language|{{{language|}}} }}
 
{{RowV2|Language|{{{language|}}} }}
{{RowV2|Moving Zone|{{{movingzone|}}} }}
+
{{RowV2|Moving zone|{{{movingzone|}}} }}
 
|}
 
|}
 
{| style="width:225px;"
 
{| style="width:225px;"
{{HeaderV2|Military}}
 
{{RowV2|Hospitals|{{{hospital_quality|0}}} }}
 
{{RowV2|Defense Systems|{{{defense_system_quality|0}}} }}
 
 
|}
 
|}
  
 
{| style="width:225px;"
 
{| style="width:225px;"
{{HeaderV2|Economy}}
+
{{HeaderV2|Productivity}}
{{Region/RawRow|Resource|{{{resource|{{Region/SwitchRaw|{{BASEPAGENAME}}}}}}}}}
+
{{RowV2|{{#if: {{{resource2|}}}|Resources|Resource}}|{{#if: {{{resource1|}}} | [[File:Icon_-_{{{resource1}}}.png|link={{{resource1}}}|40px]] | {{#if: {{{resource1}}}||''None''}} }} {{#if: {{{resource2|}}} | [[File:Icon_-_{{{resource2}}}.png|link={{{resource2}}}|40px]] }} {{#if: {{{resource4|}}} | <br/> }} {{#if: {{{resource3|}}} | [[File:Icon_-_{{{resource3}}}.png|link={{{resource3}}}|40px]] }} {{#if: {{{resource4|}}} | [[File:Icon_-_{{{resource4}}}.png|link={{{resource4}}}|40px]] }} }}
 +
|}
 
|}
 
|}
  
 +
{| style="width:225px;"
 +
{{#if: {{{last update|}}} |
 +
{{!}} style="font-size: 80%; font-weight: lighter; text-align: center;" colspan="3" {{!}}
 +
<span style="margin: 1em; color: #555;">{{nowrap|'''Last update''':&nbsp;{{{last update}}}}}</span> }}
 
|}
 
|}
 +
 
</div>
 
</div>
 
</div>
 
</div>
Line 43: Line 51:
 
{{#ifeq: {{NAMESPACE}}||
 
{{#ifeq: {{NAMESPACE}}||
 
{{#ifeq: {{Regions/Owners|{{BASEPAGENAME}}}}|FAIL||[[Category:Regions of {{Regions/Owners|{{BASEPAGENAME}}}}]]}}
 
{{#ifeq: {{Regions/Owners|{{BASEPAGENAME}}}}|FAIL||[[Category:Regions of {{Regions/Owners|{{BASEPAGENAME}}}}]]}}
[[Category:Regions with {{{resource|{{Region/SwitchRaw|{{BASEPAGENAME}}}}}}}]]
+
{{#if:{{{resource1|}}}|[[Category:Regions with {{{resource1|}}}]]|[[Category:Regions with no resource]]}}{{#if:{{{resource2|}}}|[[Category:Regions with {{{resource2|}}}]]}}{{#if:{{{resource3|}}}|[[Category:Regions with {{{resource3|}}}]]}}{{#if:{{{resource4|}}}|[[Category:Regions with {{{resource4|}}}]]}}
 +
 
 
}} <!-- END #ifeq namespace -->
 
}} <!-- END #ifeq namespace -->
 
}} <!-- END #ifeq not translation -->
 
}} <!-- END #ifeq not translation -->
 
}} <!-- END #if nocat -->
 
}} <!-- END #if nocat -->
</includeonly>
+
</includeonly><noinclude>{{Documentation}}[[Category:Main Templates|Region]]</noinclude>
 
+
<noinclude>
+
{{Region|
+
  nocat=true|
+
  name= Anhui|
+
  country= Pakistan|
+
  number= Anhui| <!-- replace spaces with hyphens -->
+
  flag= Flag-Pakistan.jpg|
+
  coatofarms= Coat-Pakistan.jpg|
+
  country_map= PakistanMap.gif|
+
  capital= Hefei|
+
  population= 1|
+
  language= English|
+
  movingzone=A1|
+
  hospital_quality= 3|
+
  defense_system_quality= 0|
+
  resource=Iron|
+
}}
+
 
+
<pre>
+
{{Region|
+
  name= |
+
  link=|
+
  country= |
+
  number= |
+
  coatofarms= |
+
  map= |
+
  <!-- Society --> |
+
  capital= |
+
  population= |
+
  language= |
+
  movingzone= |
+
  hospital_quality= 0|
+
  defense_system_quality= 0|
+
  <!-- Productivity --> |
+
  resource=| <!-- Needed only if not working right. -->
+
}}
+
</pre>
+
 
+
==Notes==
+
*If a value is not known, do not enter a place holder value (n/a, none, ..., etc.).  This might create a strange link.
+
*This template automatically places the region into a "Region of country" category.
+
*'''Coat of Arms''' - Use this place for the coat of arms of the country, the coat of arms of the region, or the flag of the region. 
+
*'''Map''' - If you have a map, enter it in the field and remove the arrows.  If you do not, leave the arrows
+
*For productivity, use h for high and m for medium.
+
 
+
==Conquered Regions==
+
There are a few things different when the region has been conquered
+
*'''Country''' - add the country that controls the region
+
*'''Coat of Arms''' - add the flag of the original country
+
 
+
For example, Pakistan conquered China and the region of Shanghai.  Place Pakistan in the country field and the flag of China in the coat of arms field.
+
 
+
</noinclude>
+

Latest revision as of 06:43, 19 March 2019

[edit] [purge]

Documentation


Usage

Sichuan

Icon-China.png China

Flag of the owner  Coat of Arms of Sichuan
Map of the region
Society
Capital Chengdu
Residents 77
Visitors 78
Language Chinese
Moving zone B4
Productivity
Resources Icon - Deer.png Icon - Grain.png
Icon - Cattle.png Icon - Fruits.png

Last update: February 4, 2018


{{Region
  |name = 
  |link = 
  |altname1 = 
  |altname2 = 
  |altname3 = 
  |number = 
  |coatofarms = 

<!-- Society --> 
  |capital = 
  |residents = 
  |visitors = 
  |language = 
  |movingzone = 
  |last update = 

<!-- Productivity --> 
  |resource1 = 
  |resource2 = 
  |resource3 = 
  |resource4 = 
}}

Notes

  • If a value is not known, do not enter a place holder value (n/a, none, ..., etc.). This might create a strange link.
  • This template automatically places the region into a "Region of country" and "Regions with resource" categories, so do not add any categories to region pages.
  • Coat of Arms - Use this place for the coat of arms of the region, but if there is none then use the coat of arms of the country.
  • Region map is added automatically.

Resources

  • If region has multiple resources, use resource1, resource2, resource3, resource4 (as many as the region has). If region has no resource, use resource1 and leave it blank.