Template:Shipinfo
From AndroWiki
(Difference between revisions)
m |
(new algorithm, hopefully to fix the pax "bug") |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {|cellpadding="2" style="float: right; width: | + | {|cellpadding="2" style="float: right; width: 280px; background: #e3e3e3; margin-left: 1em; border-spacing: 1px;" |
− | |- | + | {{ #if: {{{image_name|}}} | |
− | ! colspan="2" | + | {{!-}} bgcolor="#FFFFFF" |
− | | | + | ! colspan="2" {{!}} <center>[[Image:{{{image_name}}}|center|280px]]</center> |
+ | }} | ||
+ | |- | ||
! colspan="2" | <center>Facts</center> | ! colspan="2" | <center>Facts</center> | ||
− | | | + | |- bgcolor="#FFFFFF" |
− | | Class || {{{class}}} | + | | Class || {{#if: {{{class|}}} | {{ #ifexist: {{{class}}} | [[{{{class}}}]] | {{{class}}} }} | unknown shipclass }} |
− | | | + | |- bgcolor="#FFFFFF" |
− | | Serial Number || {{{serial}}} | + | | Serial Number || {{#if: {{{serial|}}} | {{{serial}}} | unknown }} |
− | | | + | |- bgcolor="#FFFFFF" |
− | | Commander || {{{commander}}} | + | | Commander || {{#if: {{{commander|}}} | {{ #ifexist: {{{commander}}} | [[{{{commander}}}]] | {{{commander}}} }} | unknown }} |
− | | | + | |- bgcolor="#FFFFFF" |
− | + | | Faction || {{#if: {{{faction|}}} | {{ #ifexist: {{{faction}}} | [[{{{faction}}}]] | {{{faction}}} }} | {{#if: {{{owner|}}} | {{ #ifexist: {{{owner}}} | [[{{{owner}}}]] | {{{owner}}} }} | unknown }} }} | |
− | | | + | |- bgcolor="#FFFFFF" |
− | | | + | | Construction Facility || {{#if: {{{constructor|}}} | {{ #ifexist: {{{constructor}}} | [[{{{constructor}}}]] | {{{constructor}}} }} | unknown }} |
− | | | + | |- bgcolor="#FFFFFF" |
− | + | | Home Planet || {{#if: {{{home_system|}}} | {{ #ifexist: {{{home_system}}} | [[{{{home_system}}}]] | {{{home_system}}} }} | unknown }} | |
− | | | + | |- bgcolor="#FFFFFF" |
− | | | + | | Status || {{#if: {{{status|}}} | {{{status}}} | unknown }} |
− | | | + | |
− | | | + | |
− | | | + | |
− | | | + | |
− | | | + | |
− | | 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:Ship]] | + | |
− | [[de:{{PAGENAME}}]] | + | |
− | </includeonly> | + | |
− | + | ||
− | <noinclude> | + | |
− | + | ||
− | + | ||
Line 44: | Line 33: | ||
|serial ="serial Number the ship" | |serial ="serial Number the ship" | ||
|commander ="name of the commander" | |commander ="name of the commander" | ||
− | | | + | |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" | ||
− | |||
− | |||
− | |||
|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> | ||
{{Shipinfo | {{Shipinfo | ||
|image_name =Resolution.jpg | |image_name =Resolution.jpg | ||
− | |class = | + | |class =Wrath of Achilles Class |
− | |serial = | + | |serial =DSX 91-369 |
− | |commander = | + | |commander =Balance of Judgment |
− | | | + | |faction =[[Systems_Commonwealth|Commonwealth]]/[[Restorian_Movement|Restorians]] |
− | |constructor = | + | |constructor =Sinti |
− | |home_system = | + | |home_system =Sinti |
− | + | ||
− | + | ||
− | + | ||
|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
| |
---|---|
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).