Template:Userbox Server: Difference between revisions

From Homecoming Wiki
Jump to navigation Jump to search
imported>Konoko (historical)
m (changed default hero/villain icon ''again'')
imported>SaintNicster (historical)
(Updating)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<div style="float: left; border: solid #4169E1 1px; margin: 1px;">
<includeonly><div style="float: left; border: solid #4169E1 1px; margin: 1px;">
{| cellspacing="0" style="width: 238px; color: #000000; background: #D3D3D3;"
{| cellspacing="0" style="width: 238px; color: #000000; background: #D3D3D3;"
| style="width: 45px; height: 45px; background: white; text-align: center;" | {{#if: {{{3|}}} | {{{3}}} | {{#ifeq: {{{1}}} | Heroes | [[Image:Badge defeatstatesman.png]] | {{#ifeq: {{{1}}} | Villains | [[Image:Badge defeatrecluse.png]] | [[Image:Power_Missing.png]] }} }} }}
| style="width: 45px; height: 45px; background: white; text-align: center;" | {{{3|{{#switch: {{lc:{{{1}}}}}
| style="font-size: 8pt; padding: 4pt; line-height: 1.25em;" | This user plays City of {{{1}}} on the '''<font style="font-weight:bold;">[[Servers|{{{2}}}]]</font>''' server.
| h
|}</div><noinclude>
| coh
{{clr}}
| hero
==Usage==
| heroes = [[Image:CoH Game Icon.png|32px]]
Three parameters
| cov
* first is the game, either '''Heroes''' or '''Villains'''
| v
* second is the server.
| villain
* the third parameter is optional. if specified, will replace the image with the one specified.
| villains = [[Image:CoV Game Icon.png|32px]]
: If the first paramter does not match Heroes or Villians, a 'default' image will be displayed, unless replaced by this third parameter.
| vh
:* '''<nowiki>{{#if: {{{3|}}} | {{{3}}}</nowiki>'''
| both
:*: ''If third parameter exists, then display the third paratmeter''
| cohv
:** '''<nowiki> | {{#ifeq: {{{1}}} | Heroes | [[Image:Badge defeatstatesman.png]] </nowiki>'''
| coh/v
:**: ''if third parameter does not exist, attempt to replace with a default 'hero' icon, based on first parameter''
| cox
:*** '''<nowiki> | {{#ifeq: {{{1}}} | Villains | [[Image:Badge defeatrecluse.png]]</nowiki>'''
| hv = [[Image:CoX Game Icon.png|32px]]
:***: ''if not heroes, try villains''
| #default = [[Image:Power Missing.png]]}}}}}
:**** '''<nowiki> | [[Image:Power_Missing.png]]</nowiki>'''
| style="font-size: 8pt; padding: 4pt; line-height: 1.25em;" | This user plays {{#switch: {{lc:{{{1}}}}}
:****: ''if all else fails, display the missing icon (replace with paragon wiki icon?!?)''
| h
:***** '''<nowiki> }} }} }}</nowiki>'''
| coh
:*****: ''close all three if statements''
| hero
----
| heroes = City of Heroes
{|
| cov
|-
| v
| <nowiki>{{Userbox Server|Heroes|Champion}}</nowiki>
| villain
| {{Userbox Server|Heroes|Champion}}
| villains = City of Villains
|-
| vh = both City of Villains and Heroes
| <nowiki>{{Userbox Server|Villains|Virtue}}</nowiki>
| both
| {{Userbox Server|Villains|Virtue}}
| cohv
|-
| coh/v
| <nowiki>{{Userbox Server|Villains|Freedom|[[Image:Skill power invent.png]]}}</nowiki>
| cox
| {{Userbox Server|Villains|Freedom|[[Image:Skill power invent.png]]}}
| hv = both City of Heroes and Villains
|-
| #default = City of {{{1|<nowiki>{{{1}}}</nowiki>}}}<!-- Has to be a "nowiki" like that; if you just use {{{1}}} it breaks. -->}} on the '''<font style="font-weight:bold;">[[{{#switch:{{{2}}}
| <nowiki>{{Userbox Server|Moonmen|Pinnacle}}</nowiki>
|Exalted
| {{Userbox Server|Moonmen|Pinnacle}}
|Freedom
|-
|Infinity
| <nowiki>{{Userbox Server|Zeroes|Elysium|[[Image:ArcticMastery BlockOfIce.png]]}}</nowiki>
|Liberty
| {{Userbox Server|Zeroes|Elysium|[[Image:ArcticMastery BlockOfIce.png]]}}
|Pinnacle
|-
|Triumph
|}
|Victory
[[Category:Userbox Templates]]</noinclude>
|Champion
|Guardian
|Justice
|Protector
|Virtue
|Defiant
|Union
|Vigilance
|Zukunft=Servers#{{{2}}}
|#default=Servers}}|{{{2}}}]]</font>''' server.
|}</div></includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 00:32, 7 November 2011

[edit] [purge] Documentation

Usage

Three parameters

  • first is the game
    • most variants of Heroes, CoH, Villains, COHV will be replaced with "City of Heroes" or "City of Villains" or "City of Heroes/Villains".
    • Other words will replace "City of" with that word.
  • second is the server.
    • no matter which server is entered, it always links to the Servers article. Has been updated with a #switch statement to only link to Servers if the one specified is a valid CoX server
  • the third parameter is optional. if specified, will replace the image with the one specified.
    • If the first parameter does not match Heroes or Villains, a 'default' image will be displayed, unless replaced by this third parameter.
  • Both the first and third parameters use the same #switch statement to replace text/images.

Example

{{Userbox Server|Heroes|Champion}}
CoH Game Icon.png This user plays City of Heroes on the Champion server.
{{Userbox Server|Villains|Virtue}}
CoV Game Icon.png This user plays City of Villains on the Virtue server.
{{Userbox Server|CoH/V|Justice}}
CoX Game Icon.png This user plays both City of Heroes and Villains on the Justice server.
{{Userbox Server|vh|Liberty}}
CoX Game Icon.png This user plays both City of Villains and Heroes on the Liberty server.
{{Userbox Server|Villains|Freedom|[[Image:Skill power invent.png]]}}
Skill power invent.png This user plays City of Villains on the Freedom server.
{{Userbox Server|Moonmen|Pinnacle}}
Power Missing.png This user plays City of Moonmen on the Pinnacle server.
{{Userbox Server|Zeroes|Elysium|[[Image:ArcticMastery BlockOfIce.png]]}}
ArcticMastery BlockOfIce.png This user plays City of Zeroes on the Elysium server.