Template:Infobox ship begin: Difference between revisions

Jump to navigation Jump to search
old>Varnia
(Undo revision 555475 by Varnia (talk))
 
m (Changed protection level for "Template:Infobox ship begin": high-risk template with 4000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)))
Line 1: Line 1:
<includeonly>{{WPMILHIST Infobox style|main_box}}
<includeonly>{{WPMILHIST Infobox style|main_box}}
{{#if:{{{infobox caption|}}}|{{!}}+}}{{#switch: {{#if:{{{infobox caption|}}}|1|0}}{{#ifeq:{{{infobox caption}}}|yes|1|{{#ifeq:{{{infobox caption}}}|nodab|2|0}}}}{{#ifexpr:0<{{Ship prefix | {{PAGENAME}} }}|1|0}}{{#ifexpr:0<{{str find|{{PAGENAME}} |(}} |1|0}}
{{#if:{{{infobox caption|}}}|{{!}}+{{#switch:{{{infobox caption}}}
|1000
|yes={{#invoke:WPSHIPS_utilities|ship_name_format|name={{PAGENAME}} |adj=off |showerrs={{{showerrs|}}} |sclass={{{sclass|}}}}}<!-- set to 2 for non-italicized class name -->
|1001
|nodab={{#invoke:WPSHIPS_utilities|ship_name_format|name={{PAGENAME}}|dab=none |showerrs={{{showerrs|}}} }}
|1010
|#default={{{infobox caption}}}}}<!-- end switch -->}}{{#if:{{{display title|}}}|{{#switch:{{{display title}}}|
|1011={{{infobox caption}}}
|none=<!-- do nothing -->
<!-- infobox caption=yes -->
|ital={{italic title}}
|1200=''{{PAGENAME}}''
|#default={{DISPLAYTITLE:{{{display title}}}}}}}|{{DISPLAYTITLE:{{#invoke:WPSHIPS_utilities|ship_name_format|sclass={{{sclass|}}}|name={{FULLPAGENAME}}}}}}}}</includeonly><noinclude>{{documentation}}</noinclude>
<!-- infobox caption=yes -->
|1101=''{{#invoke:String|match|s={{PAGENAME}} |pattern=([^(]-)%s%(}}'' {{#invoke:String|match|s={{PAGENAME}} |pattern=%b()}}
<!-- infobox caption=nodab -->
|1201=''{{#invoke:String|match|s={{PAGENAME}} |pattern=([^(]-)%s%(}}''
 
|1110
|1210={{Italics after | {{PAGENAME}} | {{Ship prefix | {{PAGENAME}} }} }}
 
|1111={{Italics after | {{str left| {{PAGENAME}} | {{#expr:{{str find|{{PAGENAME}} |(}}-1}} }} <!-- end str left --> | {{Ship prefix | {{PAGENAME}} }} }} {{str sub| {{PAGENAME}} | {{#expr: {{str find|{{PAGENAME}}|(}} - 1}} | {{#expr: {{str len|{{PAGENAME}} }} - {{str find|{{PAGENAME}}|(}} + 1}} }}
|1211={{Italics after | {{str left| {{PAGENAME}} | {{#expr:{{str find|{{PAGENAME}} |(}}-1}} }} <!-- end str left --> | {{Ship prefix | {{PAGENAME}} }} }}
|#default=
}}<!-- end switch -->{{#if:{{Yesno|{{#if:{{{italic title|}}}|{{{italic title}}}|yes}}}}|{{#ifexpr:{{Ship prefix|{{PAGENAME}}}}>0|{{Italic title prefixed|{{Ship prefix|{{PAGENAME}}}}}}}}}}</includeonly><noinclude>{{documentation}}</noinclude>

Revision as of 16:30, 23 February 2018