Difference between revisions of "Template:Faction Infobox"

From Discovery Wiki
Jump to navigationJump to search
(Replaced previous placeholder faction image with a transparent version.)
 
(76 intermediate revisions by 10 users not shown)
Line 1: Line 1:
<noinclude><!--</noinclude>
+
<noinclude>{{Style Guide navigation}}<!--</noinclude>
<table class="infobox bordered" style="float: right; margin-left: 1em; margin-bottom: 10px; width: 250px; font-size: 11px; line-height: 14px; border: 1px solid #dddddd;" cellpadding="3">
+
{{#if: {{{image|}}} || {{Stub|This Article needs a Picture for the '''Faction'''. This is an automatically generated message that will disappear when an image is used.}}}}
<tr><td colspan="2" style="text-align: center; font-size: 14px; background: #f6f6f6;">'''{{{name}}}'''</td></tr>
+
{| class="infobox bordered" style="float: right; text-align: left; margin-left: 1em; margin-bottom: 10px; width: 270px; font-size: 11px; line-height: 14px; border: 1px solid #dddddd;" cellpadding="3"
<tr><td colspan="2" style="padding: 0px; text-align: center;">{{#if: {{{image|}}}
+
|-
| [[image:{{{image}}}|center|244px]]
+
| colspan="2" class="infobox-name" | '''{{{name}}}'''
| [[Image:Nofactionimage.jpg|center|244px]]
+
|-
}}</td></tr>
+
| colspan="2" style="padding: 0px; text-align: center;" | {{#if: {{{image|}}}
<tr><td style="background: #f6f6f6;">'''Origin'''</td>
+
| [[image:{{{image}}}|center|{{#if: {{{imgsz|}}} | {{{imgsz}}} | 264px}}]]
<td style="padding-right: 1em;">{{#if: {{{origin|}}}
+
| [[Image:FactionPlaceholderImage.png|center|264px]]
| {{{origin}}}
+
}}
| ''unknown''
+
|-
}}</td></tr>
+
| class="infobox-data-title" style="width: 110px;" | '''Origin'''
<tr><td style="background: #f6f6f6;">'''Alignment'''</td>
+
| style="padding-right: 1em;" | {{#if: {{{origin|}}} | {{#switch: {{{origin}}}
<td style="padding-right: 1em;">{{#switch: {{{alignment}}}
+
| outcast = {{House Link | Outcasts | long}}
 +
| Outcast = {{House Link | Outcasts | long}}
 +
| outcasts = {{House Link | Outcasts | long}}
 +
| Outcasts = {{House Link | Outcasts | long}}
 +
| corsair = {{House Link | Corsairs | long}}
 +
| Corsair = {{House Link | Corsairs | long}}
 +
| corsairs = {{House Link | Corsairs | long}}
 +
| Corsairs = {{House Link | Corsairs | long}}
 +
| liberty = {{House Link | Liberty | long}}
 +
| Liberty = {{House Link | Liberty | long}}
 +
| kusari = {{House Link | Kusari | long}}
 +
| Kusari = {{House Link | Kusari | long}}
 +
| rheinland = {{House Link | Rheinland | long}}
 +
| Rheinland = {{House Link | Rheinland | long}}
 +
| bretonia = {{House Link | Bretonia | long}}
 +
| Bretonia = {{House Link | Bretonia | long}}
 +
| gallia = {{House Link | Gallia | long}}
 +
| Gallia = {{House Link | Gallia | long}}
 +
| Nomads = {{House Link | Nomads | long}}
 +
| colonials = {{House Link | Colonial Republic | long}}
 +
| Colonials = {{House Link | Colonial Republic | long}}
 +
| #default = {{{origin}}}}}
 +
}}
 +
{{#if: {{{affiliation|}}}
 +
| {{!}}-
 +
{{!}} class="infobox-data-title" {{!}} '''Affiliation'''
 +
{{!}} style="padding-right: 1em;" {{!}} {{{affiliation}}}
 +
}}
 +
|-
 +
| class="infobox-data-title" | '''Alignment'''
 +
| style="padding-right: 1em;" | {{#switch: {{{alignment}}}
 
| LAWFUL = Lawful
 
| LAWFUL = Lawful
 
| UNLAWFUL = Unlawful
 
| UNLAWFUL = Unlawful
Line 19: Line 49:
 
| INDEPENDENT = Independent
 
| INDEPENDENT = Independent
 
| #default = {{{alignment}}}
 
| #default = {{{alignment}}}
}}</td></tr>
+
}}{{#if: {{{recruitment|}}} | <nowiki />
<tr><td colspan="2" style="vertical-align: top; font-weight: bold; text-align: center;">Profile</td></tr>
+
{{!}}-
<tr><td style="background: #f6f6f6;">'''Date of founding'''</td>
+
{{!}} class="infobox-data-title" {{!}} '''Recruitment'''
<tr><td style="padding-right: 1em;">{{#if: {{{founding_date|}}}
+
{{!}} style="padding-right: 1em;" {{!}} {{#switch: {{{recruitment}}}
 +
| CLOSED = <span style="color:#F00;">'''CLOSED'''</span>
 +
| INVITE = <span style="color:#FF0;">'''By invitation ONLY'''</span>
 +
| #default =  {{#iferror: {{#expr: {{{recruitment}}}*2}} | {{{recruitment}}} | '''[[dgctopic:{{{recruitment}}}|Click to join]]'''}}}}}}
 +
|-
 +
| colspan="2" class="infobox-section" | Profile
 +
|-
 +
| class="infobox-data-title" | '''Date of founding'''
 +
| style="padding-right: 1em;" | {{#if: {{{founding_date|}}}
 
| {{{founding_date}}} [[A.S.]]
 
| {{{founding_date}}} [[A.S.]]
 
| ''unknown''
 
| ''unknown''
}}</td></tr>
+
}}
 
{{#if: {{{dissolution_date|}}}
 
{{#if: {{{dissolution_date|}}}
| <tr><td style="background: #f6f6f6;">'''Date of dissolution'''</td>
+
| {{!}}-
<td style="padding-right: 1em;">{{{dissolution_date}}} [[A.S.]]</td></tr>
+
{{!}} class="infobox-data-title" {{!}} '''Date of dissolution'''
 +
{{!}} style="padding-right: 1em;" {{!}} {{{dissolution_date}}} [[A.S.]]
 
}}
 
}}
<tr><td style="background: #f6f6f6;">'''Current leader'''</td>
+
|-
<tr><td style="padding-right: 1em;">{{#if: {{{leader|}}}
+
| class="infobox-data-title" | '''Founder(s)'''
| {{{leader}}}
+
| style="padding-right: 1em;" | {{#if: {{{founder|}}}
 +
| {{{founder}}}
 
| ''unknown''
 
| ''unknown''
}}</td></tr>
 
{{#if: {{{founder|}}}
 
| <tr><td style="background: #f6f6f6;">'''Founder'''</td>
 
<td style="padding-right: 1em;">{{{founder}}}</td></tr>
 
 
}}
 
}}
<tr><td style="background: #f6f6f6;">'''Base of operations'''</td>
+
{{#if: {{{leader|}}} | {{!}}-
<tr><td style="padding-right: 1em;">{{#if: {{{base|}}}
+
{{!}} class="infobox-data-title" {{!}} '''Current leader(s)'''
 +
{{!}} style="padding-right: 1em;" {{!}} {{{leader}}}
 +
}}
 +
|-
 +
| class="infobox-data-title" | '''Base of operations'''
 +
| style="padding-right: 1em;" | {{#if: {{{base|}}}
 
| {{{base}}}
 
| {{{base}}}
 
| ''unknown''
 
| ''unknown''
}}</td></tr>
+
}}{{#if: {{{base2|}}} | <nowiki />
{{#if: {{{primary_role|}}}
+
{{!}}-
| <tr><td colspan="2" style="font-weight: bold; text-align: center;">Primary role</td></tr>
+
{{!}} class="infobox-data-title" {{!}} '''Secondary Base'''
<tr><td colspan="2">{{{primary_role}}}</td></tr>}}{{#if: {{{secondary_role|}}}
+
{{!}} style="padding-right: 1em;" {{!}} {{{base2}}}
| <tr><td colspan="2" style="font-weight: bold; text-align: center;">Secondary role</td></tr>
+
}}{{#if: {{{primaryID|}}} {{{secondaryID|}}} {{{IFF|}}} {{{tag|}}} | <nowiki />
<tr><td colspan="2">{{{secondary_role}}}</td></tr>}}
+
{{!}}-
</table>
+
{{!}}  colspan="2" class="infobox-section" {{!}} '''Identification'''
[[Category: Factions]]{{#if: {{{image|}}} | | [[Category: Pages without profile images]]}}
+
}}{{#if: {{{primaryID|}}} | <nowiki />
 +
{{!}}-
 +
{{!}} class="infobox-data-title" {{!}}  '''Primary ID'''
 +
{{!}} style="padding-right: 1em;" {{!}} [[{{{primaryID}}} ID]]
 +
}}{{#if: {{{secondaryID|}}} | <nowiki />
 +
{{!}}-
 +
{{!}} class="infobox-data-title" {{!}}  '''Secondary ID'''
 +
{{!}} style="padding-right: 1em;" {{!}} [[{{{secondaryID}}} ID]]
 +
}}{{#if: {{{IFF|}}} | <nowiki />
 +
{{!}}-
 +
{{!}} class="infobox-data-title" {{!}} '''IFF'''
 +
{{!}} style="padding-right: 1em;" {{!}} {{{IFF}}}
 +
}}{{#if: {{{tag|}}} | <nowiki />
 +
{{!}}-
 +
{{!}} class="infobox-data-title" {{!}} '''Tag(s)'''
 +
{{!}} style="padding-right: 1em;" {{!}} <nowiki />{{{tag}}}
 +
}}{{#if: {{{primary_role|}}} | <nowiki />
 +
{{!}}-
 +
{{!}} colspan="2" class="infobox-section" {{!}} Primary role
 +
{{!}}-
 +
{{!}} colspan="2" {{!}} ''{{{primary_role}}}''
 +
}}{{#if: {{{secondary_role|}}} | <nowiki />
 +
{{!}}-
 +
{{!}} colspan="2" class="infobox-section" {{!}} Secondary role
 +
{{!}}-
 +
{{!}} colspan="2" {{!}} ''{{{secondary_role}}}''
 +
}}{{#if: {{{toc|}}} | <nowiki />
 +
{{!}}-
 +
{{!}} colspan="2" class="infobox-section" {{!}} Table of contents
 +
{{!}}-
 +
{{!}} colspan="2" class="infoboxtoc" {{!}} __TOC__ }}
 +
|}
 +
[[Category: Factions]]{{#if: {{{image|}}} | | [[Category: Factions without profile images]]}}
 
<noinclude>
 
<noinclude>
 
-->
 
-->
==Usage==
+
=Usage=
<pre><nowiki>{{Faction_Infobox
+
<pre>{{Faction Infobox
|name=Red Hessian Army
+
| name =
|image=Freital.jpg
+
| type =  
|type=Revolutionary Military
+
| affiliation =
|founding_date=''unknown''
+
| image =
|dissolution_date=
+
| imgsz =
|leader=[[Kaspar Meisnerr]]
+
| origin =
|founder=[[Heinrich Kessler]]
+
| alignment =
|primary_role=Liberating Rheinland
+
| founding_date =
|secondary_role=Undermining corrupt Rheinland corporations, containing the Corsair expansion
+
| dissolution_date =
|base=[[Vogtland]], [[Dresden|Dresden system]]}}</nowiki></pre>
+
| leader =
 +
| founder =
 +
| primary_role =
 +
| secondary_role =
 +
| base =
 +
| base2 =
 +
| primaryID =
 +
| secondaryID =
 +
| IFF =
 +
| tag =
 +
| recruitment =
 +
| toc =
 +
}}</pre>
 +
 
 +
'''"Alignment" can be one of these:'''
 +
*LAWFUL
 +
*UNLAWFUL
 +
*QUASI-LEGAL
 +
*CORPORATION
 +
*INDEPENDENT
 +
 
 +
'''"Type" can be'''
 +
* NPC
 +
* OFFICIAL
 +
* GROUP
 +
(Currently does nothing, but mark it as whichever is correct.)
 +
 
 +
'''"Recruitment" can be'''
 +
* CLOSED - will display "<span style="color:#F00;">'''CLOSED'''</span>"
 +
* INVITE - will display "<span style="color:#FF0;">'''By invitation ONLY'''</span>"
 +
* A Discovery GC topic ID - will display "Click to join" linked to the topic provided
 +
* Leave blank - the recruitment line will not appear.
 +
 
 +
'''"Origin" can be:'''
 +
* Use a House Link. example: "<nowiki>{{House Link | Rheinland}}</nowiki>" shows: {{House Link | Rheinland}}
 +
* Just use the house name. example: "Rheinland" shows: {{House Link | Rheinland | long}}
 +
 
 +
'''"PrimaryID" can be:''' and '''"SecondaryID"''' are pretty self explanatory but there is a feature built into the secondaryID variable.
 +
* primaryID - Primary ID used for the faction
 +
* secondaryID - For those factions that use a secondary ID
 +
 
 +
'''"IFF" can be:'''
 +
* Normally you would use a link to the NPC page related to your faction.
 +
* On NPC faction pages you should simply enter what appears on NPC ships.
 +
*: Example: House police factions typically show as simply "Police".
 +
 
 +
'''"toc" can be:''' can be:
 +
* YES - display the Table of Contents for your page at the bottom of the infobox. (Anything in this variable will be seen as "YES".)
 +
* leave blank - The Table of Contents will be displayed (or not) normally.
 +
 
 +
=Example=
 +
<pre><nowiki>{{Faction Infobox
 +
| name = Red Hessians
 +
| type = NPC
 +
| affiliation = [[Red Hessians]]
 +
| image = Freital.jpg
 +
| imgsz =
 +
| origin = {{House Link | Rheinland}}
 +
| alignment = UNLAWFUL
 +
| founding_date = 700
 +
| dissolution_date =  
 +
| leader =  
 +
| founder =  
 +
| primary_role = Liberation of Rheinland
 +
| secondary_role = Undermining corrupt Rheinland corporations, containing the Corsair expansion
 +
| base = [[Vogtland Base]], [[Dresden]]
 +
| base2 = [[Freital Base]], [[Omega-11]]
 +
| primaryID = Red Hessian
 +
| secondaryID = Smuggler
 +
| IFF = Hessians
 +
| tag = [RHA]
 +
| recruitment = http://discoverygc.com/forums/index.php?showtopic=36136
 +
| toc = yes
 +
}}</nowiki></pre>
 +
Note: The imgsz variable allows you to specify the size an image is displayed at (Example: 128px) and is best used to keep an image from being stretched and distorted.  If no value is placed in this field the image will be sized to the default value of 264px.
 +
 
 
==Result==
 
==Result==
 
{{Faction Infobox
 
{{Faction Infobox
 
| name = Red Hessians
 
| name = Red Hessians
 +
| server = GC
 +
| type = NPC
 +
| affiliation = [[Red Hessians]]
 
| image = Freital.jpg
 
| image = Freital.jpg
 +
| imgsz =
 
| origin = {{House Link | Rheinland}}
 
| origin = {{House Link | Rheinland}}
 
| alignment = UNLAWFUL
 
| alignment = UNLAWFUL
Line 77: Line 229:
 
| primary_role = Liberation of Rheinland
 
| primary_role = Liberation of Rheinland
 
| secondary_role = Undermining corrupt Rheinland corporations, containing the Corsair expansion
 
| secondary_role = Undermining corrupt Rheinland corporations, containing the Corsair expansion
| base = [[Vogtland]], [[Dresden]]
+
| base = [[Vogtland Base]], [[Dresden]]
 +
| base2 = [[Freital Base]], [[Omega-11]]
 +
| primaryID = Red Hessian
 +
| secondaryID = Smuggler
 +
| IFF = Hessians
 +
| tag = [RHA]
 +
| recruitment = http://discoverygc.com/forums/index.php?showtopic=36136
 +
| toc = yes
 
}}
 
}}
  
 
[[Category:Templates]]
 
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 11:18, 28 February 2016

Other Templates available to read:

The Basics  • Ships  • Factions  • Bases  • Planets  • Systems  • Commodities


Usage

{{Faction Infobox
| name = 
| type = 
| affiliation = 
| image = 
| imgsz =
| origin = 
| alignment = 
| founding_date = 
| dissolution_date = 
| leader = 
| founder = 
| primary_role = 
| secondary_role = 
| base = 
| base2 = 
| primaryID = 
| secondaryID = 
| IFF = 
| tag = 
| recruitment = 
| toc = 
}}

"Alignment" can be one of these:

  • LAWFUL
  • UNLAWFUL
  • QUASI-LEGAL
  • CORPORATION
  • INDEPENDENT

"Type" can be

  • NPC
  • OFFICIAL
  • GROUP

(Currently does nothing, but mark it as whichever is correct.)

"Recruitment" can be

  • CLOSED - will display "CLOSED"
  • INVITE - will display "By invitation ONLY"
  • A Discovery GC topic ID - will display "Click to join" linked to the topic provided
  • Leave blank - the recruitment line will not appear.

"Origin" can be:

"PrimaryID" can be: and "SecondaryID" are pretty self explanatory but there is a feature built into the secondaryID variable.

  • primaryID - Primary ID used for the faction
  • secondaryID - For those factions that use a secondary ID

"IFF" can be:

  • Normally you would use a link to the NPC page related to your faction.
  • On NPC faction pages you should simply enter what appears on NPC ships.
    Example: House police factions typically show as simply "Police".

"toc" can be: can be:

  • YES - display the Table of Contents for your page at the bottom of the infobox. (Anything in this variable will be seen as "YES".)
  • leave blank - The Table of Contents will be displayed (or not) normally.

Example

{{Faction Infobox
| name = Red Hessians
| type = NPC
| affiliation = [[Red Hessians]]
| image = Freital.jpg
| imgsz =
| origin = {{House Link | Rheinland}}
| alignment = UNLAWFUL
| founding_date = 700
| dissolution_date = 
| leader = 
| founder = 
| primary_role = Liberation of Rheinland
| secondary_role = Undermining corrupt Rheinland corporations, containing the Corsair expansion
| base = [[Vogtland Base]], [[Dresden]]
| base2 = [[Freital Base]], [[Omega-11]]
| primaryID = Red Hessian
| secondaryID = Smuggler
| IFF = Hessians
| tag = [RHA]
| recruitment = http://discoverygc.com/forums/index.php?showtopic=36136
| toc = yes
}}

Note: The imgsz variable allows you to specify the size an image is displayed at (Example: 128px) and is best used to keep an image from being stretched and distorted. If no value is placed in this field the image will be sized to the default value of 264px.

Result

Red Hessians
Origin Flag-rheinland.png Rheinland
Affiliation Red Hessians
Alignment Unlawful
Recruitment http://discoverygc.com/forums/index.php?showtopic=36136
Profile
Date of founding 700 A.S.
Founder(s) unknown
Base of operations Vogtland Base, Dresden
Secondary Base Freital Base, Omega-11
Identification
Primary ID Red Hessian ID
Secondary ID Smuggler ID
IFF Hessians
Tag(s) [RHA]
Primary role
Liberation of Rheinland
Secondary role
Undermining corrupt Rheinland corporations, containing the Corsair expansion
Table of contents