Difference between revisions of "Template:RealmBox"

From BattleMaster Wiki
Jump to navigation Jump to search
m
m
Line 3: Line 3:
 
|TextColor = {{{TitleTextColor|black}}}
 
|TextColor = {{{TitleTextColor|black}}}
 
|BackColor = {{{TitleBackColor|#aabbcc}}}
 
|BackColor = {{{TitleBackColor|#aabbcc}}}
|Text = {{{RealmName}}}}}
+
|Text = {{{RealmName |{{C|red|You must specify a "RealmName"}}}}}}}
{{#ifeq: {{{WantFlag}}} | Yes | {{RBImage|Image = {{{Flag}}}|TextStyle = normal|Caption ={{{FlagCaption}}}}}|}}
+
{{#if: {{{Flag}}} | {{RBImage|Image = {{{Flag}}}|TextStyle = normal|Caption ={{{FlagCaption|}}}}}|}}
{{Template:RBDouble
+
{{#if: {{{Island}}} | {{Template:RBDouble |BorderBottomStyle = hidden |Left = <b>Island</b> |Right = [[Located on::{{{Island}}}]]}} | {{c|red|You must specify an "Island"}} }}
|BorderBottomStyle = hidden
+
{{#if: {{{RealmName}}} | {{RBDouble|BorderBottomStyle = hidden|Left = <b>Capital</b>|Right = {{#ask: [[capital of::{{{RealmName}}}]]| default=Unknown}} }} | }}
|Left = <b>Island</b>
+
{{#if: {{{RealmName}}} | {{RBDouble|BorderBottomStyle = hidden|Left = <b>Largest City</b>|Right = {{#ask: [[part of::{{{RealmName}}}]] [[is regiontype::Stronghold||City]] | limit = 1 | sort = population | order = desc | searchlabel= | default=Unknown}}}} | }}
|Right = [[Located on::{{{Island}}}]]}}
+
{{#if: {{{Government}}} | {{RBDouble | BorderBottomStyle = hidden | Left = <b>Government</b> |Right = [[government type is::{{{Government}}}]]}} | }}
{{RBDouble
+
{{#if: {{{StateReligion}}} | {{RBDouble|BorderBottomStyle = hidden|Left = <b>State Religion</b>|Right = [[has state religion::{{{StateReligion}}}]]}} | }}
|BorderBottomStyle = hidden
+
{{#if: {{{RealmName}}} | {{RBDouble|BorderBottomStyle = hidden|Left = <b>Duchies</b>|Right = {{#ask: [[part of::{{{RealmName}}}]] [[is regiontype::Stronghold||City]] | format = count | default=Unknown}}}} | }}
|Left = <b>Capital</b>
+
{{#if: {{{RealmName}}} | {{RBDouble|BorderBottomStyle = hidden|Left = <b>Regions</b>|Right = {{#ask: [[part of::{{{RealmName}}}]] [[is regiontype::+]] | format = count | default=Unknown}}}} | }}
|Right = {{#ask: [[capital of::{{{RealmName}}}]]| default=Unknown}} }}
+
{{#if: {{{RealmName}}} | {{RBDouble|BorderBottomStyle = hidden|Left = <b>Nobles</b>|Right = {{#ask: [[member of::{{{RealmName}}}]] | format = count | default=Unknown}}}} | }}
{{RBDouble
+
{{#if: {{{RealmName}}} | {{RBDouble |BorderBottomStyle = hidden|Left = <b>Population</b>|Right = [[population::{{{Population}}}]]}} | }}
|BorderBottomStyle = hidden
+
{{#if: {{{Food}}} | {{RBDouble|Left = <b>Food Production</b>|Right = {{{Food}}}}} | }}
|Left = <b>Largest City</b>
 
|Right = {{#ask: [[part of::{{{RealmName}}}]] [[is regiontype::Stronghold||City]] | limit = 1 | sort = population | order = desc | searchlabel= | default=Unknown}}}}
 
{{RBDouble
 
|BorderBottomStyle = hidden
 
|Left = <b>Government</b>
 
|Right = [[government type is::{{{Government}}}]]}}
 
{{RBDouble
 
|BorderBottomStyle = hidden
 
|Left = <b>State Religion</b>
 
|Right = [[has state religion::{{{StateReligion}}}]]}}
 
{{RBDouble
 
|BorderBottomStyle = hidden
 
|Left = <b>Duchies</b>
 
|Right = {{#ask: [[part of::{{{RealmName}}}]] [[is regiontype::Stronghold||City]] | format = count | default=Unknown}}}}
 
{{RBDouble
 
|BorderBottomStyle = hidden
 
|Left = <b>Regions</b>
 
|Right = {{#ask: [[part of::{{{RealmName}}}]] [[is regiontype::+]] | format = count | default=Unknown}}}}
 
{{RBDouble
 
|BorderBottomStyle = hidden
 
|Left = <b>Nobles</b>
 
|Right = {{#ask: [[member of::{{{RealmName}}}]] | format = count | default=Unknown}}}}
 
{{RBDouble
 
|BorderBottomStyle = hidden
 
|Left = <b>Population</b>
 
|Right = [[population::{{{Population}}}]]}}
 
{{RBDouble
 
|Left = <b>Food Production</b>
 
|Right = {{{Food}}}}}
 
 
{{RBTitle
 
{{RBTitle
|TextColor = {{{TitleTextColor}}}
+
|TextColor = {{{TitleTextColor|black}}}
|BackColor = {{{TitleBackColor}}}
+
|BackColor = {{{TitleBackColor|#aabbcc}}}
 
|Text = Council}}
 
|Text = Council}}
 
{{RBDouble
 
{{RBDouble
Line 55: Line 26:
 
|Left = <b>{{{GeneralTitle|General}}}<br>{{{BankerTitle|Banker}}}<br>{{{JudgeTitle|Judge}}}</b>
 
|Left = <b>{{{GeneralTitle|General}}}<br>{{{BankerTitle|Banker}}}<br>{{{JudgeTitle|Judge}}}</b>
 
|Right = {{{GeneralName}}}<br>{{{BankerName}}}<br>{{{JudgeName}}}}}
 
|Right = {{{GeneralName}}}<br>{{{BankerName}}}<br>{{{JudgeName}}}}}
{{RBTitle
+
{{#if: {{{RealmName}}} | {{RBTitle |BackColor = {{{TitleBackColor|#aabbcc}}} |TextColor = {{{TitleTextColor|black}}} |Text = Regions }} {{RBSingle|Text = {{#ask: [[part of::Keplerstan]] | mainlabel=region | ?has lord=Lord | format = table | headers = hide | default=Unknown}} }} | }}
|BackColor = {{{TitleBackColor}}}
 
|TextColor = {{{TitleTextColor}}}
 
|Text = Regions}}
 
{{RBDouble
 
|Left = {{{RegionNames}}}
 
|Right = {{{RegionLords}}}}}
 
 
{{RBBottom}}
 
{{RBBottom}}
 
</includeonly><noinclude>
 
</includeonly><noinclude>
Line 71: Line 36:
 
This template calls other RealmBox templates to create a complete RealmBox. It is pre-configured to provide much more detail than [[Template:RBRealmOne]]. All you need to do is invoke this one single template, and it calls all the RealmBox templates needed.
 
This template calls other RealmBox templates to create a complete RealmBox. It is pre-configured to provide much more detail than [[Template:RBRealmOne]]. All you need to do is invoke this one single template, and it calls all the RealmBox templates needed.
  
Certain parameters in this template are automatically tagged for the [[Semantic Wiki]]. These properties are noted in their descriptions below.
+
* Certain parameters in this template are automatically tagged for the [[Semantic Wiki]]. These properties are noted in their descriptions below.
 +
* Some parameters '''must''' have values. (RealmName, Island, etc.) If you fail to supply the required information, then you will get some nasty-grams on your page telling you about it.
 +
* '''All parameters must be included on your page.''' If you do not wish a particular piece of information to appear, then leave that parameter blank. i.e.:
 +
:<pre>|StateReligion = </pre>
 +
:If you leave the parameter out, the template will not function properly, and you'll see something like <nowiki>{{{Government}}}</nowiki> on your page.
 +
* Several pieces of information will be automatically calculated and added to the page. This includes the number of duchies, number of regions, region names, region lords, etc. You cannot manually specify this information. We are working on autogenerating population, food, and gold, but we're not there yet.
  
 
==Parameters==
 
==Parameters==
 
All parameters, vertical format:
 
All parameters, vertical format:
 
* RealmName - The name of the realm.
 
* RealmName - The name of the realm.
* TitleBackColor - The color code for the title bar backgrounds.
+
* TitleBackColor - The color code for the title bar backgrounds. Optional. Defaults to a light blue/gray color. ''(#aabbcc)''
* TitleTextColor - The color code of the title bar text.
+
* TitleTextColor - The color code of the title bar text. Defaults to black.
* WantFlag - If you want a flag displayed, set this to '''Yes''' (case counts!). If you don't want a flag, set it to '''No'''.
 
 
* Flag - The name of the image file to use at the top of the RealmBox. Must be an image uploaded to the wiki. Do not include the "Image:" part of the name.
 
* Flag - The name of the image file to use at the top of the RealmBox. Must be an image uploaded to the wiki. Do not include the "Image:" part of the name.
 
* FlagCaption - A caption to go under the image.
 
* FlagCaption - A caption to go under the image.
Line 90: Line 59:
 
* BankerName - Banker's name.
 
* BankerName - Banker's name.
 
* Island - The name of the island on which the realm is located.
 
* Island - The name of the island on which the realm is located.
* Capital - The name of the capital city. You can use [[Template:Reglink]] to link it to the wiki page for the region.
 
* LargeCity - The name of the largest city. You can use [[Template:Reglink]] to link it to the wiki page for the region.
 
* Duchies - The number of duchies in the realm.
 
 
* Government - The government type: Monarchy, Theocracy, etc.
 
* Government - The government type: Monarchy, Theocracy, etc.
* Regions - The number of regions in the realm.
 
 
* Nobles - The number of nobles in the realm.
 
* Nobles - The number of nobles in the realm.
 
* Population - The approximate population of the realm.
 
* Population - The approximate population of the realm.
 
* Food - The approximate food production of the realm.
 
* Food - The approximate food production of the realm.
* RegionNames - The names of the region of the realm, separated by <nowiki><br></nowiki>. You can use [[Template:Reglink]] to link them to the wiki page for the region.
+
* Gold - Gold production of the realm.
* RegionLords - The names fo the region lords, in the same order as the regions, separated by <nowiki><br></nowiki>.
 
  
  

Revision as of 01:09, 12 February 2009

Intro

This is an experimental template for exploring the Semantic Wiki project. You should not use this for your realm.

This template is part of the RealmBox Project.

This template calls other RealmBox templates to create a complete RealmBox. It is pre-configured to provide much more detail than Template:RBRealmOne. All you need to do is invoke this one single template, and it calls all the RealmBox templates needed.

  • Certain parameters in this template are automatically tagged for the Semantic Wiki. These properties are noted in their descriptions below.
  • Some parameters must have values. (RealmName, Island, etc.) If you fail to supply the required information, then you will get some nasty-grams on your page telling you about it.
  • All parameters must be included on your page. If you do not wish a particular piece of information to appear, then leave that parameter blank. i.e.:
|StateReligion = 
If you leave the parameter out, the template will not function properly, and you'll see something like {{{Government}}} on your page.
  • Several pieces of information will be automatically calculated and added to the page. This includes the number of duchies, number of regions, region names, region lords, etc. You cannot manually specify this information. We are working on autogenerating population, food, and gold, but we're not there yet.

Parameters

All parameters, vertical format:

  • RealmName - The name of the realm.
  • TitleBackColor - The color code for the title bar backgrounds. Optional. Defaults to a light blue/gray color. (#aabbcc)
  • TitleTextColor - The color code of the title bar text. Defaults to black.
  • Flag - The name of the image file to use at the top of the RealmBox. Must be an image uploaded to the wiki. Do not include the "Image:" part of the name.
  • FlagCaption - A caption to go under the image.
  • RulerTitle - Ruler's custom title.
  • RulerName - Ruler's name.
  • GeneralTitle - General's custom title.
  • GeneralName - General's name.
  • JudgeTitle - Judge's custom title.
  • JudgeName - Judge's name.
  • BankerTitle - Banker's custom title.
  • BankerName - Banker's name.
  • Island - The name of the island on which the realm is located.
  • Government - The government type: Monarchy, Theocracy, etc.
  • Nobles - The number of nobles in the realm.
  • Population - The approximate population of the realm.
  • Food - The approximate food production of the realm.
  • Gold - Gold production of the realm.


Template

You can copy/paste the following guide into your page, then add the values.

{{RBRealmOne
|RealmName = 
|TitleBackColor = 
|TitleTextColor = 
|WantFlag = 
|Flag = 
|FlagCaption = 
|RulerTitle = 
|RulerName = 
|GeneralTitle = 
|GeneralName = 
|JudgeTitle = 
|JudgeName = 
|BankerTitle = 
|BankerName = 
|Island = 
|Duchies = 
|Regions = 
|Nobles = 
|Population = 
|Capital = 
|LargeCity = 
|Duchies = 
|Government = 
|Nobles = 
|Population = 
|Food = 
|RegionNames = 
|RegionLords = 
}}