Difference between revisions of "Template:WoWs ShipsList"
Revision as of 09:45, 19 February 2016 Protected "Template:WoWs ShipsList": Global template ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) | Revision as of 09:02, 13 May 2016 | |||
Line 1: | Line 1: | |||
? | <includeonly>{{#vardefine:s_list|{{#shiplist:ships|{{#if:{{{1|}}}|nation={{{1}}}}};{{#if:{{{2|}}}|class={{{2}}}}};{{#if:{{{3|}}}|level={{{3}}}}}|level}}}}{{#vardefine:s_i|0}}{{#vardefine:img_size|{{{6|235}}}}}{{#vardefine:r_list|{{#while:|{{#if:{{#explode:{{#var:s_list}}|;|{{#var:s_i}}}}|true}}|{{#vardefine:s_name|{{#shipstr:{{#shipchars:{{#explode:{{#var:s_list}}|;|{{#var:s_i}}}}|mark}}}}}}{{#ifeq:{{#if:{{{4|}}}|{{#ifeq:{{{4}}}|0|{{#if:{{#shipattr:gold}}|0|1}}|{{#ifeq:{{{4}}}|1|{{#if:{{#shipattr:gold}}|1|0}}|0}}}}|1}}|1|{{#switch:{{{5| | + | <includeonly>{{#vardefine:s_list|{{#shiplist:ships|{{#if:{{{1|}}}|nation={{{1}}}}};{{#if:{{{2|}}}|class={{{2}}}}};{{#if:{{{3|}}}|level={{{3}}}}}|level}}}}{{#vardefine:s_i|0}}{{#vardefine:img_size|{{{6|235}}}}}{{#vardefine:r_list|{{#while:|{{#if:{{#explode:{{#var:s_list}}|;|{{#var:s_i}}}}|true}}|{{#vardefine:s_name|{{#shipstr:{{#shipchars:{{#explode:{{#var:s_list}}|;|{{#var:s_i}}}}|mark}}}}}}{{#ifeq:{{#if:{{{4|}}}|{{#ifeq:{{{4}}}|0|{{#if:{{#shipattr:gold}}|0|1}}|{{#ifeq:{{{4}}}|1|{{#if:{{#shipattr:gold}}|1|0}}|0}}}}|1}}|1|{{#switch:{{{5|text}}} | |
? | | | + | |icons=<div class="tleft" style="clear:none;">[[File:Ship_{{#explode:{{#var:s_list}}|;|{{#var:s_i}}}}.png|{{{6|214}}}px|link=Ship:{{#var:s_name}}]]<br/><center><span style="color:#AD7A07;"><b>{{Level|{{#shipattr:level}}}}</b></span> [[Ship:{{#var:s_name}}|{{#var:s_name}}]]{{#if:{{#shipattr:gold}}| {{Gold}}}}</center></div> | |
? | | | + | |tiles=<div class="b-description-img b-description-img__indent b-description-img__single"><div class="b-description-img_flag b-description-img_flag__{{lc:{{#shipattr:nation}}}}"></div><div class="l-description-img_class"><span class="b-description-img_type b-description-img_type__{{lc:{{#shipattr:class}}}}{{#if:{{#shipattr:gold}}|-premium}}"></span><span class="b-description-img_class">{{Level|{{#shipattr:level}}}}</span></div><div class="b-description-img_vehicle">[[File:Ship_{{#explode:{{#var:s_list}}|;|{{#var:s_i}}}}.png|160px|link=Ship:{{#var:s_name}}|left]]</div><div class="l-description-img_price"><span class="b-description-img_price{{#ifexpr:{{#shipattr:gold}}|<nowiki> </nowiki>b-description-img_price__gold}}">{{#var:s_name}}</span></div>{{#if:{{{rotator|}}}|<a href="#" class="b-description-img_360"></a>}}</div> | |
? | | | + | |gallery=<li class="gallerybox" style="width: {{#var:img_size}}px"><div style="width: {{#var:img_size}}px"><div class="thumb" style="width: {{#expr:{{#var:img_size}}-5}}px; height:{{#expr:({{#var:img_size}}-5)*0.625}}px;"><div style="margin:13px auto;">[[File:{{#var:s_name}}_wows_main.jpg|{{#expr:{{#var:img_size}}-5}}px]]</div></div><div class="gallerytext"><center><span class="b-tech-nav_icon b-tech-nav_icon__{{lc:{{#shipattr:class}}}}"></span><span style="color:#AD7A07;"><b>{{Level|{{#shipattr:level}}}}</b></span> [[Ship:{{#var:s_name}}|{{#var:s_name}}]]{{#if:{{#shipattr:gold}}| {{Gold}}}}</center></div></div></li> | |
? | |#default=<nowiki> </nowiki><span>{{#ifexpr:{{#var:s_i}}>0|{{{6|•}}}}} <b>{{Level|{{#shipattr:level}}}}</b> [[Ship:{{#var:s_name}}|{{#var:s_name}}]]{{#if:{{#shipattr:gold}}|{{Gold}}}}</span>}}}}{{#vardefine:s_i|{{#expr:{{#var:s_i}}+1}}}}}}}}{{#switch:{{{5| | + | |#default=<nowiki> </nowiki><span>{{#ifexpr:{{#var:s_i}}>0|{{{6|•}}}}} <b>{{Level|{{#shipattr:level}}}}</b> [[Ship:{{#var:s_name}}|{{#var:s_name}}]]{{#if:{{#shipattr:gold}}|{{Gold}}}}</span>}}}}{{#vardefine:s_i|{{#expr:{{#var:s_i}}+1}}}}}}}}{{#switch:{{{5|text}}}|gallery=<ul class="gallery">{{#var:r_list}}</ul>|#default={{#var:r_list}}}}</includeonly><noinclude>{{Doc}}[[Category:WoWs templates]]<noinclude> |
Revision as of 09:02, 13 May 2016
The template shows ship lists in different forms of representation.
Parameter
- 1
- The nation of ships from the list (separated by commas if there are several)
Possible values: japan;uk;france;ussr;usa;germany;pan_asia;spain;europe;netherlands;italy;commonwealth;pan_america - 2
- Class of ships from the list (separated by commas if there are several)
Possible values: Destroyer;Cruiser;Battleship;AirCarrier
Note: Submarines are currently not supported. - 3
- The level of the ships in Arabic numerals (separated by commas if there are several)
- 4
- Type of ships by purchase method: 0 - research tree ships or 1 - premium ships. All are displayed by default.
- 5
- Format - Possible values: text, icons, gallery, tiles. Default is text.
- 6
- Additional parameter
- Separator for the text list. Default is ‘•’. Can be empty (list without delimiters).
- Width of the images in pixels for icons and gallery format.
- 7
- A list of ship codes separated by semicolons without spaces. When this parameter is specified, the ships pf this list are displayed, and the parameters 1,2 and 3 (Nation, Class and Level) are ignored.
Examples
{{WoWs_ShipsList|usa|Cruiser}}
I Erie • II Chester • II Albany • III St. Louis • III Charleston • IV Phoenix • V Omaha • V Marblehead • V Marblehead Lima • V Rattlehead • VI Pensacola • VI Dallas • VII Atlanta • VII New Orleans • VII Helena • VII Indianapolis • VII Atlanta B • VII Boise • VII Flint • VIII Baltimore • VIII Cleveland • VIII Wichita • VIII Anchorage • VIII Congress • VIII Rochester • VIII San Diego • VIII AL Montpelier • IX Buffalo • IX Seattle • IX Vallejo • IX Alaska • IX Tulsa • IX Alaska B • X Des Moines • X Worcester • X Puerto Rico • X Salem • X Austin • ★ Annapolis
{{WoWs_ShipsList|usa,japan||5|||}}
V New York V Oklahoma V Texas V Omaha V Marblehead V Marblehead Lima V Rattlehead V Nicholas V Hill
{{WoWs_ShipsList|usa,japan||5|||>>>}}
V New York >>> V Oklahoma >>> V Texas >>> V Omaha >>> V Marblehead >>> V Marblehead Lima >>> V Rattlehead >>> V Nicholas >>> V Hill
{{WoWs_ShipsList|usa,japan||7|1}}
• VII Florida • VII West Virginia '44 • VII California • VII Atlanta • VII Indianapolis • VII Atlanta B • VII Boise • VII Flint • VII Sims • VII Sims B • VII Ashitaka • VII Hyūga • VII Tokachi • VII Maya • VII ARP Myōkō • VII ARP Ashigara • VII ARP Haguro • VII Southern Dragon • VII Eastern Dragon • VII ARP Nachi • VII Yūdachi
<div class="wot-frame-1">{{WoWs_ShipsList|usa||7||icons}}</div>
<div class="wot-frame-1">{{WoWs_ShipsList|usa||7||icons|107}}</div>
<div class="wot-frame-1">{{WoWs_ShipsList|usa||7||tiles}}</div>
{{WoWs_ShipsList|usa||7|0|gallery}}
VII Colorado VII New Orleans VII Helena VII Mahan
{{WoWs_ShipsList|usa||7|1|gallery|200}}
VII Florida VII California VII Atlanta VII Indianapolis VII Atlanta B VII Boise VII Flint VII Sims VII Sims B