Template:Shipinfo

From AndroWiki
(Difference between revisions)
Jump to: navigation, search
 
(new algorithm, hopefully to fix the pax "bug")
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{|cellpadding="2" style="float: right; width: 262px; background: #e3e3e3; margin-left: 1em; border-spacing: 1px;"
+
{|cellpadding="2" style="float: right; width: 280px; background: #e3e3e3; margin-left: 1em; border-spacing: 1px;"
|----- bgcolor="#FFFFFF"
+
{{ #if: {{{image_name|}}} |
! colspan="2"   | <center>[[Image:{{{image_name}}}.jpg|260px]]</center>
+
{{!-}} bgcolor="#FFFFFF"  
|-----
+
! colspan="2" {{!}} <center>[[Image:{{{image_name}}}|center|280px]]</center>
 +
}}
 +
|-
 
! colspan="2"  | <center>Facts</center>
 
! colspan="2"  | <center>Facts</center>
|----- bgcolor="#FFFFFF"
+
|- bgcolor="#FFFFFF"
| Class || {{{class}}}
+
| Class || {{#if: {{{class|}}} | {{ #ifexist: {{{class}}} | [[{{{class}}}]] | {{{class}}} }} | unknown shipclass }}
|----- bgcolor="#FFFFFF"
+
|- bgcolor="#FFFFFF"
| Serial Number || {{{serial}}}
+
| Serial Number || {{#if: {{{serial|}}} | {{{serial}}} | unknown }}
|----- bgcolor="#FFFFFF"
+
|- bgcolor="#FFFFFF"
| Commander || {{{commander}}}
+
| Commander || {{#if: {{{commander|}}} | {{ #ifexist: {{{commander}}} | [[{{{commander}}}]] | {{{commander}}} }} | unknown }}
|----- bgcolor="#FFFFFF"
+
|- bgcolor="#FFFFFF"
| Belonging || {{{owner}}}
+
| Faction || {{#if: {{{faction|}}} | {{ #ifexist: {{{faction}}} | [[{{{faction}}}]] | {{{faction}}} }} | {{#if: {{{owner|}}} | {{ #ifexist: {{{owner}}} | [[{{{owner}}}]] | {{{owner}}} }} | unknown }} }}
|----- bgcolor="#FFFFFF"
+
|- bgcolor="#FFFFFF"
| Construction Facility || {{{constructor}}}
+
| Construction Facility || {{#if: {{{constructor|}}} | {{ #ifexist: {{{constructor}}} | [[{{{constructor}}}]] | {{{constructor}}} }} | unknown }}
|----- bgcolor="#FFFFFF"
+
|- bgcolor="#FFFFFF"
| Home Planet || {{{home_system}}}
+
| Home Planet || {{#if: {{{home_system|}}} | {{ #ifexist: {{{home_system}}} | [[{{{home_system}}}]] | {{{home_system}}} }} | unknown }}
|----- bgcolor="#FFFFFF"
+
|- bgcolor="#FFFFFF"
| Technical Data || {{{techdata}}}
+
| Status || {{#if: {{{status|}}} | {{{status}}} | unknown }}
|----- bgcolor="#FFFFFF"
+
| Armament || {{{armament}}}
+
|----- bgcolor="#FFFFFF"
+
| Weapon Systems || {{{weaponsystem}}}
+
|----- bgcolor="#FFFFFF"
+
| Status || {{{status}}}
+
 
|}
 
|}
 
+
<includeonly>[[Category:Ship]]
<includeonly>
+
[[de:{{#ifexpr: {{#expr: {{#rpos:{{{1}}}|remove}} }} >= 0 | {{#replace:{{PAGENAME}}|(Ship)}} |{{PAGENAME}}}}{{#ifexpr: {{#expr: {{#rpos:{{{1}}}|add}} }} >= 0 | _(Schiff) }}]]</includeonly><noinclude>
[[Category:Ships]]
+
[[de:{{PAGENAME}}]]
+
</includeonly>
+
 
+
<noinclude>
+
 
+
 
+
  
  
Line 39: Line 28:
 
'''Universal'''
 
'''Universal'''
 
<pre>
 
<pre>
{{Planetinfo
+
{{Shipinfo
 
|image_name  ="name of the image"
 
|image_name  ="name of the image"
 
|class      ="class of the ship"
 
|class      ="class of the ship"
 
|serial      ="serial Number the ship"
 
|serial      ="serial Number the ship"
 
|commander  ="name of the commander"
 
|commander  ="name of the commander"
|owner      ="the race / group it belongs to"
+
|faction    ="the race / group it belongs to"
 
|constructor ="the race/shipyard/person who constructed the ship"
 
|constructor ="the race/shipyard/person who constructed the ship"
 
|home_system ="the system/planet it mainly belongs to"
 
|home_system ="the system/planet it mainly belongs to"
|techdata    ="the technical data of the ship"
 
|armament    ="the armament of the ship"
 
|weaponsystem="the weapon systems installed onboard"
 
 
|status      ="status of the Ship (active,inactive,stolen,destroyed,etc)"
 
|status      ="status of the Ship (active,inactive,stolen,destroyed,etc)"
 
}}
 
}}
 
</pre>
 
</pre>
  
'''Example (Resolution of Hector)'''
+
'''Example ([[Resolution of Hector]])'''
 
<pre>
 
<pre>
{{Planetinfo
+
{{Shipinfo
 
|image_name  =Resolution.jpg
 
|image_name  =Resolution.jpg
|class      =unknown
+
|class      =Wrath of Achilles Class
|serial      =unknown
+
|serial      =DSX 91-369
|commander  =[[Balance of Judgement]]
+
|commander  =Balance of Judgment
|owner      =[[Commonwealth]]/[[Restorians]]
+
|faction    =[[Systems_Commonwealth|Commonwealth]]/[[Restorian_Movement|Restorians]]
|constructor =[[Sinti]]
+
|constructor =Sinti
|home_system =[[Sinti]]
+
|home_system =Sinti
|techdata    =unknown
+
|armament    =unknown
+
|weaponsystem=unknown
+
 
|status      =destroyed
 
|status      =destroyed
 
}}
 
}}
 
</pre>
 
</pre>
 +
 +
'''Special case ([[Pax Magellanic]])'''
 +
<pre>
 +
{{Shipinfo|add
 +
|image_name  =Pax_Magellanic.jpg
 +
|class      =Glorious Heritage Class
 +
|serial      =XMC-1-913
 +
|commander  =Captain Warrick/Lieutenant Jill Pearce
 +
|owner      =Commonwealth
 +
|constructor =
 +
|home_system =Herotodus
 +
|status      =Destroyed
 +
}}
 +
</pre>
 +
''To remove the string "Ship" (in case existing) out of the interwiki link, the variable {{{1}}} has to contain the string "remove". In the other way round (to add the german string "Schiff"), the variable has to contain the string "add". It is also possible to combine both terms (eg. removeadd).''
 +
 
[[Category:Templates]]
 
[[Category:Templates]]
 +
[[de:Vorlage:Schiffsinfo]]
 
</noinclude>
 
</noinclude>

Latest revision as of 18:33, 17 May 2007

Facts
Class unknown shipclass
Serial Number unknown
Commander unknown
Faction unknown
Construction Facility unknown
Home Planet unknown
Status unknown


Usage

Universal

{{Shipinfo
|image_name  ="name of the image"
|class       ="class of the ship"
|serial      ="serial Number the ship"
|commander   ="name of the commander"
|faction     ="the race / group it belongs to"
|constructor ="the race/shipyard/person who constructed the ship"
|home_system ="the system/planet it mainly belongs to"
|status      ="status of the Ship (active,inactive,stolen,destroyed,etc)"
}}

Example (Resolution of Hector)

{{Shipinfo
|image_name  =Resolution.jpg
|class       =Wrath of Achilles Class
|serial      =DSX 91-369
|commander   =Balance of Judgment
|faction     =[[Systems_Commonwealth|Commonwealth]]/[[Restorian_Movement|Restorians]]
|constructor =Sinti
|home_system =Sinti
|status      =destroyed
}}

Special case (Pax Magellanic)

{{Shipinfo|add
|image_name  =Pax_Magellanic.jpg
|class       =Glorious Heritage Class
|serial      =XMC-1-913
|commander   =Captain Warrick/Lieutenant Jill Pearce
|owner       =Commonwealth
|constructor =
|home_system =Herotodus
|status      =Destroyed
}}

To remove the string "Ship" (in case existing) out of the interwiki link, the variable {{{1}}} has to contain the string "remove". In the other way round (to add the german string "Schiff"), the variable has to contain the string "add". It is also possible to combine both terms (eg. removeadd).

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
In other languages