I have decided to stop putting proposed functions in the main Internal Functions page. New functions will be written up here, and when written, tested and revised, will be moved to the main doc page. -Bludwyng
You can see the documentation for all currently implemented Internal Functions at Internal Functions.
Contents [hide] |
Format: {{#GameTag|gameid|option1|option2|switch1}}
This function is currently a Template at GameTag but, due to speed issues, will be rewritten in perl as an internal function.
GameTag's purpose is to display a small, right-floated box with the Game's Icon, name (linked to the Main Page for the game), and a subcategory link (if requested).
All icons used are from Category:Game Icons (Wiki). The actual page for a specific game will be "game_fullname (Game Icon)" and the contents of the wiki page there should be {{Icon|Wiki|Game}}. The page may also contain the game's tag to add it to that game's main category. The icon used will be the first image attached to that page (if there is more than one). Icons there are expected to be no more than 60px wide, but if larger (or smaller) that is how they will display! no automatic re-sizing is performed on these icons.
There are two ways this sub-category link can be requested. If option1 (usually the only option) is ADMIN, FAQ, D, G, L, LE or T then the page is linked to Admin Pages, Frequently Asked Questions, Dictionary, Guides, Lore, Live Events or Templates. If option1 is not equal to one of those 7 values then it is assumed to be the name of a subcategory. option2 can further define how the name of the subcategory will be displayed.
For most games the Category name is in the format "Category:category_name (gameid)" but a few games use the older "Category:gameid category_name" format.
EQ2, WAR, WoW, FFXI and TR use the older format, EXCEPT for "Guides (WoW)". Also, WoW uses Terms instead of Dictionary.
IF switch1 is defined it has one of the following values:
syntax: {{#set:varname|value}}
This function would allow us to process data normalization tasks ONCE at the top of a template, then use the normalized value, which is stored in the set varname, in all subsequent references without having to re-process the same data normalization code, thus saving considerable processing time.
syntax: {{#tags:pagename[|n]}}
syntax: {{#dblist:game_id|db_name|record_title|relation_name}}
syntax: {{#category:category_name}}
syntax: {{#copy:text2push|text2display|imageID}}