Template:Shipinfo
From AndroWiki
(Difference between revisions)
(new algorithm, hopefully to fix the pax "bug") |
|||
(One intermediate revision by one user not shown) | |||
Line 13: | Line 13: | ||
| Commander || {{#if: {{{commander|}}} | {{ #ifexist: {{{commander}}} | [[{{{commander}}}]] | {{{commander}}} }} | unknown }} | | Commander || {{#if: {{{commander|}}} | {{ #ifexist: {{{commander}}} | [[{{{commander}}}]] | {{{commander}}} }} | unknown }} | ||
|- bgcolor="#FFFFFF" | |- bgcolor="#FFFFFF" | ||
− | | Faction || {{#if: {{{owner|}}} | {{ #ifexist: {{{owner}}} | [[{{{owner}}}]] | {{{owner}}} }} | unknown }} | + | | Faction || {{#if: {{{faction|}}} | {{ #ifexist: {{{faction}}} | [[{{{faction}}}]] | {{{faction}}} }} | {{#if: {{{owner|}}} | {{ #ifexist: {{{owner}}} | [[{{{owner}}}]] | {{{owner}}} }} | unknown }} }} |
|- bgcolor="#FFFFFF" | |- bgcolor="#FFFFFF" | ||
| Construction Facility || {{#if: {{{constructor|}}} | {{ #ifexist: {{{constructor}}} | [[{{{constructor}}}]] | {{{constructor}}} }} | unknown }} | | Construction Facility || {{#if: {{{constructor|}}} | {{ #ifexist: {{{constructor}}} | [[{{{constructor}}}]] | {{{constructor}}} }} | unknown }} | ||
Line 21: | Line 21: | ||
| Status || {{#if: {{{status|}}} | {{{status}}} | unknown }} | | Status || {{#if: {{{status|}}} | {{{status}}} | unknown }} | ||
|} | |} | ||
− | + | <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:{{#ifexpr: {{#expr: {{#rpos:{{ | + | |
− | </includeonly> | + | |
− | + | ||
− | <noinclude> | + | |
− | + | ||
− | + | ||
Line 60: | Line 53: | ||
}} | }} | ||
</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]] | [[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).