Difference between revisions of "Template:Factioninfobox"

From Space Engineers Wiki
Jump to: navigation, search
(Attempting fix for excess formatting on faction image)
 
(37 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{#if: {{{hide|}}} | | <div style="position:relative;float:right;width:300px;">
+
{{Factionheader}}{{#if: {{{hide|}}} | | <div style="position:relative;float:right;width:300px;">
 
<!--header-->
 
<!--header-->
 
<div style="background:#486d82;position:relative;width:300px;">
 
<div style="background:#486d82;position:relative;width:300px;">
 
<div style="background:#486d82;padding:5px;text-align:center;"><span style="color:white;font-size:2em;text-shadow:0px 0px 0.40em rgba(0,0,0,1);font-family:Gotham;position:relative;">{{{Name|Faction Name}}}</span></div>
 
<div style="background:#486d82;padding:5px;text-align:center;"><span style="color:white;font-size:2em;text-shadow:0px 0px 0.40em rgba(0,0,0,1);font-family:Gotham;position:relative;">{{{Name|Faction Name}}}</span></div>
 
<!--header divider--->
 
<!--header divider--->
 +
{{#if: {{{Image|}}} | {{{Image|}}} |}}
 
<div style="background:#9c0c0c;width:290px;margin-left:5px;height:2px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div></div>
 
<div style="background:#9c0c0c;width:290px;margin-left:5px;height:2px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div></div>
 
<div style="background:#b2d5e8;">
 
<div style="background:#b2d5e8;">
 
<!--leader-->
 
<!--leader-->
<div style="width:300px"><div style="padding:2px;position:left;width:96px;text-align:right;display:inline-block;">Leader:</div><div style="padding:2px;display:inline-block;width=196px;position:right;">{{{Leaders|Leaders}}}</div></div>
+
<div style="width:300px"><div style="padding:2px;width:116px;text-align:right;display:inline-block;position:absolute;">Leaders:</div><div style="padding:2px;display:inline-block;width=176px;position:relative;left:120px;">{{{Leaders|Leader 1<br />Leader 2}}}</div></div>
 
<!--section divider--->
 
<!--section divider--->
 
<div style="background:#659bb7;width:290px;height:1px;text-align:center;margin-left:5px;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
 
<div style="background:#659bb7;width:290px;height:1px;text-align:center;margin-left:5px;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
 
<!--Faction Type-->
 
<!--Faction Type-->
<div style="width:300px"><div style="padding:2px;float:left;width:96px;text-align:right;display:inline-block;">Faction Type:</div><div style="padding:2px;display:inline-block;width=196px;position:right;">{{{Type|All}}}</div></div>
+
<div style="width:300px"><div style="padding:2px;width:116px;text-align:right;display:inline-block;position:absolute;">Faction Type:</div><div style="padding:2px;display:inline-block;width=176px;position:relative;left:120px;">{{{Type|All}}}</div></div>
 
<!--section divider--->
 
<!--section divider--->
 
<div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
 
<div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
 
<!--Recruiting-->
 
<!--Recruiting-->
<div style="width:300px"><div style="padding:2px;float:left;width:96px;text-align:right;display:inline-block;">Recruiting:</div><div style="padding:2px;display:inline-block;width=196px;position:right;">{{ucfirst: {{lc: {{{RecruitingStatus|no}}} }} }}</div></div>
+
<div style="width:300px"><div style="padding:2px;float:left;width:116px;text-align:right;display:inline-block;">Recruiting:</div><div style="padding:2px;display:inline-block;width=176px;position:right;">{{ucfirst: {{lc: {{{RecruitingStatus|no}}} }} }}</div></div>
 
<!--section divider--->
 
<!--section divider--->
 
<div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
 
<div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
 
<!--Members-->
 
<!--Members-->
<div style="width:300px"><div style="padding:2px;float:left;width:96px;text-align:right;display:inline-block;">Members:</div><div style="padding:2px;display:inline-block;width=196px;position:right;">{{{Members|0}}}</div></div>
+
<div style="width:300px"><div style="padding:2px;float:left;width:116px;text-align:right;display:inline-block;">Members:</div><div style="padding:2px;display:inline-block;width=176px;position:right;">{{{Members|0}}}</div></div>
 
<!--Custom fields-->
 
<!--Custom fields-->
 
{{#if: {{{CustomRow1|}}}|
 
{{#if: {{{CustomRow1|}}}|
 
<!--section divider--->
 
<!--section divider--->
 
<div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
 
<div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
<div style="width:300px"><div style="padding:2px;position:left;width:96px;text-align:right;display:inline-block;">{{{CustomRow1|}}}:</div><div style="padding:2px;display:inline-block;width:196px;position:right;">{{{CustomData1|}}}</div></div>
+
<div style="width:300px"><div style="padding:2px;position:left;width:116px;text-align:right;display:inline-block;">{{{CustomRow1|}}}:</div><div style="padding:2px;display:inline-block;width:176px;position:right;">{{{CustomData1|}}}</div></div>
 
|}}{{#if: {{{CustomRow2|}}}|
 
|}}{{#if: {{{CustomRow2|}}}|
 
<!--section divider--->
 
<!--section divider--->
 
<div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
 
<div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
<div style="width:300px"><div style="padding:2px;position:left;width:96px;text-align:right;display:inline-block;">{{{CustomRow2|}}}:</div><div style="padding:2px;display:inline-block;width:196px;position:right;">{{{CustomData2|0}}}</div></div>
+
<div style="width:300px"><div style="padding:2px;position:left;width:116px;text-align:right;display:inline-block;">{{{CustomRow2|}}}:</div><div style="padding:2px;display:inline-block;width:176px;position:right;">{{{CustomData2|0}}}</div></div>
 
|}}{{#if: {{{CustomRow3|}}}|
 
|}}{{#if: {{{CustomRow3|}}}|
 
<!--section divider--->
 
<!--section divider--->
 
<div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
 
<div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
<div style="width:300px"><div style="padding:2px;position:left;width:96px;text-align:right;display:inline-block;">{{{CustomRow3|}}}:</div><div style="padding:2px;display:inline-block;width:196px;position:right;">{{{CustomData3|0}}}</div></div>
+
<div style="width:300px"><div style="padding:2px;position:left;width:116px;text-align:right;display:inline-block;">{{{CustomRow3|}}}:</div><div style="padding:2px;display:inline-block;width:176px;position:right;">{{{CustomData3|0}}}</div></div>
 
|}}{{#if: {{{CustomRow4|}}}|
 
|}}{{#if: {{{CustomRow4|}}}|
 
<!--section divider--->
 
<!--section divider--->
 
<div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
 
<div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
<div style="width:300px"><div style="padding:2px;position:left;width:96px;text-align:right;display:inline-block;">{{{CustomRow4|}}}:</div><div style="padding:2px;display:inline-block;width:196px;position:right;">{{{CustomData4|0}}}</div></div>
+
<div style="width:300px"><div style="padding:2px;position:left;width:116px;text-align:right;display:inline-block;">{{{CustomRow4|}}}:</div><div style="padding:2px;display:inline-block;width:176px;position:right;">{{{CustomData4|0}}}</div></div>
 
|}}{{#if: {{{CustomRow5|}}}|
 
|}}{{#if: {{{CustomRow5|}}}|
 
<!--section divider--->
 
<!--section divider--->
 
<div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
 
<div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
<div style="width:300px"><div style="padding:2px;position:left;width:96px;text-align:right;display:inline-block;">{{{CustomRow5|}}}:</div><div style="padding:2px;display:inline-block;width:196px;position:right;">{{{CustomData5|0}}}</div></div>
+
<div style="width:300px"><div style="padding:2px;position:left;width:116px;text-align:right;display:inline-block;">{{{CustomRow5|}}}:</div><div style="padding:2px;display:inline-block;width:176px;position:right;">{{{CustomData5|0}}}</div></div>
 
|}}
 
|}}
 
<!--section divider---><div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
 
<!--section divider---><div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>
 
{{#if: {{{Website|}}}|
 
{{#if: {{{Website|}}}|
 
<!--Faction Website-->
 
<!--Faction Website-->
<div style="padding:2px;position:left;width:96px;text-align:right;display:inline-block;">Website:</div><div style="padding:2px;display:inline-block;width:196px;position:right;">[{{{Website|http://www.spaceengineersgame.com}}} {{{Name|Faction Name}}}]</div><!--section divider---><div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>|}}{{#if: {{{Steamgroup|}}}|
+
<div style="padding:2px;position:left;width:116px;text-align:right;display:inline-block;">Website:</div><div style="padding:2px;display:inline-block;width:176px;position:right;">[{{{Website|http://www.spaceengineersgame.com}}} {{{Name|Faction Name}}}]</div><!--section divider---><div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>|}}{{#if: {{{Steamgroup|}}}|
 
<!--Steam Group-->
 
<!--Steam Group-->
<div style="padding:2px;position:left;width:96px;text-align:right;display:inline-block;">Steam Group:</div><div style="padding:2px;display:inline-block;width:196px;position:right;">{{{Steamgroup|http://www.spaceengineersgame.com}}}</div><!--section divider---><div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>|}}{{#if: {{{Forums|}}}|
+
<div style="padding:2px;position:left;width:116px;text-align:right;display:inline-block;">Steam Group:</div><div style="padding:2px;display:inline-block;width:176px;position:right;">{{{Steamgroup|http://www.spaceengineersgame.com}}}</div><!--section divider---><div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>|}}{{#if: {{{Forums|}}}|
 
<!--Steam Group-->
 
<!--Steam Group-->
<div style="padding:2px;position:left;width:96px;text-align:right;display:inline-block;">Forums:</div><div style="padding:2px;display:inline-block;width:196px;position:right;">{{{Forums|http://www.spaceengineersgame.com}}}</div><!--section divider---><div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>|}}
+
<div style="padding:2px;position:left;width:116px;text-align:right;display:inline-block;">Forums:</div><div style="padding:2px;display:inline-block;width:176px;position:right;">{{{Forums|http://www.spaceengineersgame.com}}}</div><!--section divider---><div style="background:#659bb7;width:290px;margin-left:5px;height:1px;text-align:center;margin-top:5px;margin-bot:5px;position:relative;">&nbsp;</div>|}}
</div></div><!--hide endtag-->}}<includeonly>{{#if: {{{nocat|}}} | |  
+
</div></div><!--hide endtag-->}}<includeonly>
{{#ifeq: {{NAMESPACE}} | Faction | [[Category:Player Factions]]
+
{{#vardefine:pgurl|{{fullurl:{{FULLPAGENAME}}}}}}
{{#if: {{#pos:{{lc: {{{Type}}} }} | all }} | [[Category: Faction Type - All]] | }}
+
{{#ifexpr: {{#time: U | now - 9 months}} > {{#time: U | {{#show: {{FULLPAGENAME}} | ?Modification date}} }} | {{Notice | Page has gone over 9 months without an edit and has been removed from categorization. Editing this page will restore this page in the automatic listings. If you edited this page recently you can click refresh following this message  }} [{{#var:pgurl}}?action=purge Refresh Page] | {{#if: {{{nocat|}}} | |  
{{#if: {{#pos:{{lc: {{{Type}}} }} | commercial }} | [[Category: Faction Type - Commercial]] | }}
+
{{#ifeq: {{NAMESPACE}} | Faction | [[Category:Faction List]]
{{#if: {{#pos:{{lc: {{{Type}}} }} | pirate }} | [[Category: Faction Type - Pirate]] | }}
+
{{#vardefine:other|true}}
{{#if: {{#pos:{{lc: {{{Type}}} }} | industrial }} | [[Category: Faction Type - Industrial]] | }}
+
{{#if: {{#pos:{{lc: {{{Type}}} }} | all }} | [[Category: Faction Type - All]]{{#vardefine:other|false}} | }}
{{#if: {{#pos:{{lc: {{{Type}}} }} | military }} | [[Category: Faction Type - Military]] | }}
+
{{#if: {{#pos:{{lc: {{{Type}}} }} | commercial }} | [[Category: Faction Type - Commercial]]{{#vardefine:other|false}} | }}
{{#if: {{#pos:{{lc: {{{Type}}} }} | civilian }} | [[Category: Faction Type - Civilian]] | }}
+
{{#if: {{#pos:{{lc: {{{Type}}} }} | commerce}} | [[Category: Faction Type - Commercial]]{{#vardefine:other|false}} | }}
{{#if: {{#pos:{{lc: {{{Type}}} }} | science }} | [[Category: Faction Type - Science]] | }}
+
{{#if: {{#pos:{{lc: {{{Type}}} }} | pirate }} | [[Category: Faction Type - Pirate]]{{#vardefine:other|false}} | }}
{{#if: {{#pos:{{lc: {{{Type}}} }} | mercenary }} | [[Category: Faction Type - Mercenary]] | }}
+
{{#if: {{#pos:{{lc: {{{Type}}} }} | industrial }} | [[Category: Faction Type - Industrial]]{{#vardefine:other|false}} | }}
 +
{{#if: {{#pos:{{lc: {{{Type}}} }} | industry}} | [[Category: Faction Type - Industrial]]{{#vardefine:other|false}} | }}
 +
{{#if: {{#pos:{{lc: {{{Type}}} }} | military }} | [[Category: Faction Type - Military]]{{#vardefine:other|false}} | }}
 +
{{#if: {{#pos:{{lc: {{{Type}}} }} | civilian }} | [[Category: Faction Type - Civilian]]{{#vardefine:other|false}} | }}
 +
{{#if: {{#pos:{{lc: {{{Type}}} }} | science }} | [[Category: Faction Type - Science]]{{#vardefine:other|false}} | }}
 +
{{#if: {{#pos:{{lc: {{{Type}}} }} | scientific}} | [[Category: Faction Type - Science]]{{#vardefine:other|false}} | }}
 +
{{#if: {{#pos:{{lc: {{{Type}}} }} | mercenary }} | [[Category: Faction Type - Mercenary]]{{#vardefine:other|false}} | }}
 +
{{#ifeq: {{#var:other}} | true | [[Category: Faction Type - Other]] | }}
 
{{#set:Recruiting={{ucfirst: {{lc: {{{RecruitingStatus|no}}} }} }} }}
 
{{#set:Recruiting={{ucfirst: {{lc: {{{RecruitingStatus|no}}} }} }} }}
 
{{#set:Factionmembers={{{Members|0}}} }}
 
{{#set:Factionmembers={{{Members|0}}} }}
 +
{{#set:Factionname={{{Name|}}} }}
 
{{#ifeq: {{ucfirst: {{lc: {{{RecruitingStatus|no}}} }} }} | Yes | [[Category:Faction Recruiting]] |}}
 
{{#ifeq: {{ucfirst: {{lc: {{{RecruitingStatus|no}}} }} }} | Yes | [[Category:Faction Recruiting]] |}}
|}} }}</includeonly>  
+
|}} }}
 +
{{#ifexpr: {{#time: U | now - 6 months}} > {{#time: U | {{#show: {{FULLPAGENAME}} | ?Modification date}} }} | {{Notice | Page has gone over 6 months without an edit - please edit this page to automatically remove this notice. If you have edited this page within the last 6 months hit the refresh link below.  }} [{{#var:pgurl}}?action=purge Refresh Page] | }} }}
 +
 
 +
</includeonly>  
 
<noinclude>
 
<noinclude>
  
Line 71: Line 83:
 
{{Factioninfobox
 
{{Factioninfobox
 
| Name = Name of your faction
 
| Name = Name of your faction
 +
| Image = Image to insert underneath your faction name (OPTIONAL) note please keep image width to less than 300px.
 
| Leaders = leaders in your faction
 
| Leaders = leaders in your faction
 
| Website = website for your faction, must start with http:// or https:// (OPTIONAL)
 
| Website = website for your faction, must start with http:// or https:// (OPTIONAL)
Line 97: Line 110:
 
| hide = Hide this template and only use the autocategory features, do not include this if you want the template to show
 
| hide = Hide this template and only use the autocategory features, do not include this if you want the template to show
 
}}
 
}}
 +
 +
This template also inserts the Factionheader template into your faction page to provide links back to the main factions page as well as diplomacy pages.
 
</pre>[[Category:Templates]]</noinclude>
 
</pre>[[Category:Templates]]</noinclude>

Latest revision as of 19:27, 15 April 2016

Faction Name
 
Leaders:
Leader 1
Leader 2
 
Faction Type:
All
 
Recruiting:
No
 
Members:
0
 


Below is a description of the variables used by this template:

{{Factioninfobox
| Name = Name of your faction
| Image = Image to insert underneath your faction name (OPTIONAL) note please keep image width to less than 300px. 
| Leaders = leaders in your faction
| Website = website for your faction, must start with http:// or https:// (OPTIONAL)
| Steamgroup = steam group page  (OPTIONAL)
| Forums = Faction's Forums  (OPTIONAL)
| Type = Type of your alliance (Valid values, All, Commercial, Pirate, Industrial, Military, Civilian, Science, and Mercenary ) other values are allowed but 
			will not categorize your faction on the main factions page. More than one type is allowed. 
| RecruitingStatus = Yes/No
| Members = # number of members
| Forumcontact = Forum account name of your faction's contact

<!--Optional-->
| CustomRow1 = Title of custom row
| CustomData1 = Data of custom row
| CustomRow2 = Title of custom row
| CustomData2 = Data of custom row
| CustomRow3 = Title of custom row
| CustomData3 = Data of custom row
| CustomRow4 = Title of custom row
| CustomData4 = Data of custom row
| CustomRow5 = Title of custom row
| CustomData5 = Data of custom row

| nocat = disable automatic templates and properties. 

| hide = Hide this template and only use the autocategory features, do not include this if you want the template to show
}}

This template also inserts the Factionheader template into your faction page to provide links back to the main factions page as well as diplomacy pages.