Template:RegName

From BattleMaster Wiki
Revision as of 18:21, 25 November 2008 by Indirik (talk | contribs) (first round of modifications)
Jump to navigation Jump to search


Usage

All parameters, horizontal format

{{RegName|Island Abbreviation|Region Name}}
  • Island Abbreviation is the abbreviation of the island name, as listed in Template:Reglink.
  • Region Name is the exact name of the region. You must include all spaces, punctuation, and accented characters exactly as used in the game.

Description

This template will allow you to easily link a region name to the IG region page for that region.

Limitations

This template isn't all that useful for a few reasons:

  1. You can log into BattleMaster using either http://www.battlemaster.org or http://battlemaster.org. If you log into the URL without the "www", and then try to follow a link with the "www", the link will fail, and vice versa. As a result, the link created by a template using one form of the URL will always fail for people that use the other form of the URL.
  2. The link will only work if you have logged in to the game, and played at least one character. It does not matter what island the character is on, or what island the link points to.
  3. Special characters: If the region name uses special characters, such as "Ünterstrom", then it may not be possible to get the link to work due to the way browsers encode such characters. I haven't been able to get them to work at all. (This may only apply to a few regions on Dwilight. I don't think the other islands have region names with accented characters.)
  4. Region names with spaces are not properly handled. There is a function in MediaWiki called parser functions that should be able to handle this, but the urlencode parser functions don't seem to work at all. This is odd, because other parser functions, such as {{lc:}}, {{uc:}}, and {{localurl:}} seem to work just fine.

If these are ever fixed (maybe for War 2.0), or can be worked around somehow) then this template could actually be useful. Until then, it's really just an academic exercise. Even fixing #1 would make this template moderately useful.

Example

  • Atamara: {{RegName|AT|Siver}} = Siver
  • Beluaterra: {{RegName||BT|Eno}} = Eno
  • Colonies: {{RegName|CO|Naan Forest}} = Forest Naan Forest
  • Colonies: {{RegName|CO|Naan%20Forest}} = Naan%20Forest
  • Dwilight: {{RegName|DW|Madina}} = Madina
  • East Island: {{RegName|EC|Perdan}} = Perdan
  • Far East: {{RegName|FEI|Anacan}} = Anacan