Template:Infobox ship begin/doc
File:Edit-copy green.svg | This is a documentation subpage for Template:Terminate sentence It may contain usage information, categories and other content that is not part of the original template page. |
Warning | This template is used on approximately 41,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
File:Information icon4.svg | This template should italicize the article title automatically. If this is not required, add |display title=none to the list of parameters. |
File:Lua-Logo.svg | This template uses Lua: |
- N.B.: {{Infobox ship begin}} contains code that can automatically style a variety of ship and ship-class article titles. It adds a DISPLAYTITLE with italics unless
|display title=none
is specified. For details see: the infobox usage guide § Title styling.
This ship infobox supports a very large number of fields, including some specialty fields that will rarely be used. Some fields simply don't make sense in some cases. Some different sets of code have been prepared using only the most common fields. Select the most appropriate set below and copy and paste the entire code to the top of a ship article, then fill in as many fields as possible. Empty fields should generally be kept so that a future editor can fill them in unless they make no sense for the ship in question.
The "Full" code contains every field the template supports. If you want, you can copy one of the simplified sets of code and add a few fields from the "Full" code.
If you have ideas for improvements or would like to add brand new fields to these templates, please post on Template talk:Infobox ship begin to discuss the changes and how they should be implemented.
Usage
Code for individual ships
For infoboxes of individual ships, please copy the appropriate example for the type of ship:
Warships (except submarines). Select show to expand.
| ||||||
---|---|---|---|---|---|---|
<syntaxhighlight lang="wikitext">
</syntaxhighlight> |
Submarines. Select show to expand.
| ||||||
---|---|---|---|---|---|---|
<syntaxhighlight lang="wikitext">
|
Age of sail. Select show to expand.
| ||||||
---|---|---|---|---|---|---|
<syntaxhighlight lang="wikitext">
|
Commercial vessels. Select show to expand.
| ||||||
---|---|---|---|---|---|---|
<syntaxhighlight lang="wikitext">
|
If none of the above fit, you may use this full setup:
Full code for individual ships. Select show to expand.
| ||||||
---|---|---|---|---|---|---|
<syntaxhighlight lang="wikitext">
|
Code for ship classes
For infoboxes of ship classes, please copy the appropriate example for the type of ship class:
Warship classes (except submarines). Select show to expand.
| ||||||
---|---|---|---|---|---|---|
<syntaxhighlight lang="wikitext">
|
Submarine classes. Select show to expand.
| ||||||
---|---|---|---|---|---|---|
<syntaxhighlight lang="wikitext">
|
Age of sail classes. Select show to expand.
| ||||||
---|---|---|---|---|---|---|
<syntaxhighlight lang="wikitext">
|
Commercial vessel classes. Select show to expand.
| ||||||
---|---|---|---|---|---|---|
<syntaxhighlight lang="wikitext">
|
If none of the above fit, you may use this full setup:
Full code for ship classes. Select show to expand.
| ||||||
---|---|---|---|---|---|---|
<syntaxhighlight lang="wikitext">
|
Parameters
Most fields are self-explanatory, but here are some tips (see the usage guide for a complete explanation of all parameter fields):
- Ship image If your article does not have an image in this field, the ship will automatically be listed at the hidden category Category:Ship infoboxes without an image. Editors can use the category to easily see a list of infoboxes where no image is attached and work to find pictures.
- Ship caption and image alt, the caption and alt for the ship's picture, should be left blank if no extra information about the picture is available; don't just fill in the ship's name.
- Ship country is necessary when a ship served under multiple countries, but not really necessary otherwise.
- Ship class should include both the class and the type of ship. For example, Balao-class diesel-electric submarine provides complete information. It can be replaced with Ship type, which displays as "Type:", for ships that aren't members of a class.
- Ship name is necessary when a ship served under multiple names, but not really necessary otherwise.
- Ship fate and Ship status generally shouldn't both be filled in. Whichever one sounds most appropriate for the situation should be filled in. Use Ship fate when the ship sank or was scrapped, and use Ship status when the ship is active, kept in reserve, or currently a museum.
- Ship displacement and Ship tonnage are not the same thing. Displacement is the mass of a ship in a particular condition, like when it's fully loaded for battle. It is generally used for military vessels. Tonnage is a measurement of the cargo capacity of a vessel and isn't exactly correlated with weight: a ship of a particular tonnage will have a different mass depending on whether it's full of grain or iron. Entries in either parameter need to specifically identify the units in which they are being measured, such as long tons, metric tons or tonnes (unacceptable in articles using American English, use metric tons) or gross register tons or whatever. If possible, use templates such as {{GT}}, {{NetT}} and {{DWT}}.
Alternative spellings
Some fields provide alternative spellings and should never both be filled in:
- "Ship honors" and "Ship honours"
- "Ship draft" and "Ship draught"
- "Ship armor" and "Ship armour"
Removing extra fields
It's generally a good idea not to remove fields, because another editor might be able to provide the information later. However, in the case of mutually exclusive fields, like "Ship armor" and "Ship armour", the unused field can be removed if desired. Also, if a section is repeated (to show multiple periods in commission, for example), fields that are inappropriate to duplicate can be removed if desired. Keep in mind that a ship from the Age of Sail would not need the fields for aircraft or electronic warfare instruments and conversely an aircraft carrier would not need the fields for a sail plan. A surface ship would not require fields for submarines etc.
Special capabilities
Repeating sections
This infobox allows you to repeat sections. To repeat, just make a copy of the section to be repeated. You can repeat the Image, Career, or Characteristics sections. Here is an example, with extra fields removed for clarity:
File:Uss bang.jpg | |
History | |
---|---|
File:Flag of the United States.svgU.S. | |
Name | USS Bang (SS-385) |
Laid down | 30 April 1943 |
Launched | 30 August 1943 |
Commissioned | 4 December 1943 |
Decommissioned | 1 October 1972 |
Stricken | 18 November 1974 |
Fate | Transferred to Spain, 1 October 1972 |
History | |
File:Flag of Spain.svgSpain | |
Name | SPS Cosme Garcia (S34) |
Acquired | 1 October 1972 |
Fate | scrapped 1983 |
General characteristics | |
Displacement |
|
Length | 311 ft 8 in (95.00 m) |
Beam | 27 ft 3 in (8.31 m) |
Complement | 66 |
<syntaxhighlight lang="wikitext" style="overflow:auto">
File:Uss bang.jpg | |
History | |
---|---|
File:Flag of the United States.svgUS | |
Name | USS Bang (SS-385) |
Laid down | 30 April 1943 |
Launched | 30 August 1943 |
Commissioned | 4 December 1943 |
Decommissioned | 1 October 1972 |
Stricken | 18 November 1974 |
Fate | Transferred to Spain, 1 October 1972 |
History | |
File:Flag of Spain.svgSpain | |
Name | SPS Cosme Garcia (S34) |
Acquired | 1 October 1972 |
Fate | scrapped 1983 |
General characteristics | |
Displacement |
|
Length | 311 ft 8 in (95 m) |
Beam | 27 ft 3 in (8.3 m) |
Complement | 66 |
</syntaxhighlight>
Hiding section headers
It is possible to hide the headers for the Career and General Characteristics sections, in order to repeat fields. For example, a ship might have been commissioned, decommissioned, recommissioned, and decommissioned again. To have the second commission and decommission dates, use additional a second Infobox ship career template with its header hidden, like this:
USS Wisconsin at sea, circa 1990 USS Wisconsin at sea, circa 1990
| |
History | |
---|---|
File:Flag of the United States.svg | |
Laid down | 25 January 1941 |
Launched | 7 December 1943 |
Commissioned | 16 April 1944 |
Decommissioned | 1 July 1948 |
Recommissioned | 3 March 1951 |
Decommissioned | 8 March 1958 |
Recommissioned | 1 August 1986 |
Decommissioned | 30 September 1991 |
Stricken | 17 March 2006 |
Fate | Museum ship |
General characteristics (1943) | |
Displacement | 45,000 tons |
Length | 887.2 ft (270 m) |
Beam | 108.2 ft (33 m) |
Draft | 28.9 ft (8.8 m) |
Speed | 33 knots (61 km/h) |
Complement | 1,921 officers and men |
Armament | big guns |
<syntaxhighlight lang="wikitext" style="overflow:auto">
USS Wisconsin at sea, circa 1990 USS Wisconsin at sea, circa 1990
| |
History | |
---|---|
File:Flag of the United States.svg | |
Laid down | 25 January 1941 |
Launched | 7 December 1943 |
Commissioned | 16 April 1944 |
Decommissioned | 1 July 1948 |
Recommissioned | 3 March 1951 |
Decommissioned | 8 March 1958 |
Recommissioned | 1 August 1986 |
Decommissioned | 30 September 1991 |
Stricken | 17 March 2006 |
Fate | Museum ship |
General characteristics (1943) | |
Displacement | 45,000 tons |
Length | 887.2 ft (270 m) |
Beam | 108.2 ft (33 m) |
Draft | 28.9 ft (8.8 m) |
Speed | 33 knots (61 km/h) |
Complement | 1,921 officers and men |
Armament | big guns |
</syntaxhighlight>
The General Characteristics section can be given a caption using the Header caption field. See the USS Wisconsin example above, which has a header caption of (1943) to indicate that the characteristics provided are as of 1943.
Custom fields
West Virginia in San Francisco Bay, circa 1934. West Virginia in San Francisco Bay, circa 1934.
| |
History | |
---|---|
File:US flag 48 stars.svg | |
Ordered | 5 December 1916 |
Laid down | 12 April 1920 |
Launched | 17 November 1921 |
Commissioned | 1 December 1923 |
Sunk: | 7 December 1941 |
Raised: | 17 May 1942 |
Decommissioned | 9 January 1947 |
Stricken | 1 March 1959 |
Nickname(s) | "Wee Vee" |
Fate | sold for scrap |
General characteristics | |
Displacement | 33,590 tons |
Length | 624 ft (190 m) |
Beam | 97.3 ft (29.6 m) |
Draft | 30.5 ft (9.3 m) |
Speed | 21.0 knots (39 km/h) |
Complement | 1,407 officers and men |
Armament | big guns |
It is possible to add custom fields to the infobox using standard Wiki table syntax. This is not encouraged, because infoboxes are intended to standardize the appearance of ship articles, but it can be done if needed. See the below example, where "Sunk:" and "Raised:" fields are added to the ship's career: <syntaxhighlight lang="wikitext" style="overflow:auto">
West Virginia in San Francisco Bay, circa 1934. West Virginia in San Francisco Bay, circa 1934.
| |
History | |
---|---|
File:US flag 48 stars.svg | |
Ordered | 5 December 1916 |
Laid down | 12 April 1920 |
Launched | 17 November 1921 |
Commissioned | 1 December 1923 |
Sunk: | 7 December 1941 |
Raised: | 17 May 1942 |
Decommissioned | 9 January 1947 |
Stricken | 1 March 1959 |
Nickname(s) | "Wee Vee" |
Fate | sold for scrap |
General characteristics | |
Displacement | 33,590 tons |
Length | 624 ft (190 m) |
Beam | 97.3 ft (29.6 m) |
Draft | 30.5 ft (9.3 m) |
Speed | 21.0 knots (39 km/h) |
Complement | 1,407 officers and men |
Armament | big guns |
</syntaxhighlight>
TemplateData
TemplateData for Infobox ship begin
Start template for Infobox ship (see template documentation), includes optional caption for the infobox
Parameter | Description | Type | Status | |
---|---|---|---|---|
infobox caption | Infobox caption | Caption for the infobox. Set to yes to use formatted article title; set to nodab to use formatted article title without parenthetical disambiguator; all other values become infobox caption. | String | optional |
showerrs | showerrs | no description | Unknown | optional |
sclass | sclass | no description | Unknown | optional |
display title | display title | no description | Unknown | optional |
See also
{{WikiProject Ships|needs-infobox=y}}