Template talk:Infobox Ship Example

From Wikipedia, the free encyclopedia

Contents

[edit] Usage

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.

Generally, the "Simplified" code will work for most warships. Specialized code is available for some other situations. The "Full" code contains every field the template supports. If you want, you can copy the "Simplified" code and add a few fields from the "Full" code. If you develop your own set of fields, please add them to Template:Infobox Ship Example so that other people can use them.


If you develop your own optimized code for a ship type, or if you have ideas for improvements, please edit the above.

[edit] Usage of fields

Most fields are self-explanatory, but here are some tips:

  1. Ship caption, the caption 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.
  2. Ship country is necessary when a ship served under multiple countries, but not really necessary otherwise.
  3. Ship class should include both the class and the type of ship. For example, Balao-class diesel-electric submarine provides complete information.
  4. Ship name is necessary when a ship served under multiple names, but not really necessary otherwise.
  5. 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.
  6. 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.

[edit] Alternate spellings

Some fields provide alternate spellings and should never both be filled in:

  1. "Ship draft" and "Ship draught"
  2. "Ship armor" and "Ship armour"

[edit] 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.

[edit] Special capabilities

[edit] 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:

USS Bang
Career (US) United States Navy Jack
Name: USS Bang (SS-385)
Laid down: 30 April 1943
Launched: 30 August 1943
Commissioned: 4 December 1943
Decommissioned: 1 October 1972
Struck: 18 November 1974
Career (Spain)
Name: SPS Cosme Garcia (S34)
Fate: scrapped 1983
General Characteristics
Displacement: 1,526 tons surfaced
2,391 tons
Length: 311 ft 8 in (95 m)
Beam: 27 ft 3 in (8.3 m)
Complement: 66
{|{{Infobox Ship Begin}}
{{Infobox Ship Image
|Ship image=[[Image:Uss bang.jpg|center|300px|USS Bang]]
|Ship caption=
}}
{{Infobox Ship Career
|Hide header=
|Ship country=US
|Ship flag={{USN flag|1972}}
|Ship name=USS ''Bang'' (SS-385)
|Ship laid down=[[30 April]] [[1943]]
|Ship launched=[[30 August]] [[1943]]
|Ship commissioned=[[4 December]] [[1943]]
|Ship decommissioned=[[1 October]] [[1972]]
|Ship struck=[[18 November]] [[1974]]
}}
{{Infobox Ship Career
|Hide header=
|Ship country=Spain
|Ship flag=[[Image:Flag of Spain.svg|60px]]
|Ship name=SPS ''Cosme Garcia'' (S34)
|Ship fate=scrapped 1983
}}
{{Infobox Ship Characteristics
|Hide header=
|Header caption=
|Ship displacement=1,526 tons surfaced<br>2,391 tons
|Ship length=311 ft 8 in (95 m)
|Ship beam=27 ft 3 in (8.3 m)
|Ship complement=66
}}
|}


[edit] 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 (BB-64)
USS Wisconsin at sea, circa 1990
Career (US) United States Navy Jack
Laid down: 25 January 1941
Launched: 7 December 1943
Commissioned: 16 April 1944
Decommissioned: July 1, 1948
Recommissioned: March 3, 1951
Decommissioned: March 8, 1958
Recommissioned: August 1, 1986
Decommissioned: 30 September 1991
Struck: 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
{|{{Infobox Ship Begin}}
{{Infobox Ship Image
|Ship image=
|Ship caption=USS ''Wisconsin'' at sea, circa 1990
}}
{{Infobox Ship Career
|Hide header=
|Ship country=(US)
|Ship flag={{USN flag|1992}}
|Ship laid down=[[25 January]] [[1941]]
|Ship launched=[[7 December]] [[1943]]
|Ship commissioned=[[16 April]] [[1944]]
|Ship decommissioned=[[July 1]], [[1948]]
}}
{{Infobox Ship Career
|Hide header=yes
|Ship recommissioned=[[March 3]], [[1951]]
|Ship decommissioned=[[March 8]], [[1958]]
}}
{{Infobox Ship Career
|Hide header=yes
|Ship recommissioned=[[August 1]], [[1986]]
|Ship decommissioned=[[30 September]] [[1991]]
|Ship struck=[[17 March]] [[2006]]
|Ship fate=[[Museum ship]]
}}
{{Infobox Ship Characteristics
|Hide header=
|Header caption=(1943)
|Ship displacement=45,000 tons
|Ship length=887.2 ft (270 m)
|Ship beam=108.2 ft (33 m)
|Ship draft=28.9 ft (8.8 m)
|Ship speed=33 knots (61 km/h)
|Ship complement=1,921 officers and men
|Ship armament=big guns
}}
|}

[edit] Header captions

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.


[edit] Custom fields

USS West Virginia (BB-48) in San Francisco Bay, circa 1934.
USS West Virginia (BB-48) in San Francisco Bay, circa 1934.
Career (US) United States Navy Jack
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
Struck: 1 March 1959
Fate: sold for scrap
Nickname: "Wee Vee"
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:

{|{{Infobox Ship Begin}}
{{Infobox Ship Image
|Ship image=
|Ship caption=USS West Virginia (BB-48) in San Francisco Bay, circa 1934.
}}
{{Infobox Ship Career
|Hide header=
|Ship country=US
|Ship flag={{USN flag|1947}}
|Ship ordered=[[5 December]] [[1916]]
|Ship laid down=[[12 April]] [[1920]]
|Ship launched=[[17 November]] [[1921]]
|Ship commissioned=[[1 December]] [[1923]]
}}
|-
|Sunk:
|[[7 December]] [[1941]]
|-
|Raised:
|[[17 May]] [[1942]]
{{Infobox Ship Career
|Hide header=yes
|Ship decommissioned=[[9 January]] [[1947]]
|Ship fate=sold for scrap
|Ship struck=[[1 March]] [[1959]]
|Ship nickname="Wee Vee"
}}
{{Infobox Ship Characteristics
|Hide header=
|Ship displacement=33,590 tons
|Ship length=624 ft (190 m)
|Ship beam=97.3 ft (29.6 m)
|Ship draft=30.5 ft (9.3 m)
|Ship speed=21.0 knots (39 km/h)
|Ship complement=1,407 officers and men
|Ship armament=big guns
}}
|}


That's very clever. I like it. Demonstrates the value of the "Hide header" field, too. Additional fields can also be added after {{Infobox Ship Characteristics ...}} and before the "|}".
One little thing, "Ship nickname" is no longer documented in "Characteristics" though it's still in the template.
Where does one find out about things like {{-}}? Cheesh! Talk about esoteric. I know it's documented, but where did you find it? I need to run a cable drop to the bedroom so I can read myself to sleep scoping out templates. --Saintrain 01:10, 28 February 2007 (UTC)
Thanks for noticing the "Ship nickname" thing. As far as {{-}} goes, when I was developing this infobox, I came up with some examples and put them at User:TomTheHand/test. Everything sort of ran together instead of getting divided how I expected by the section headers, and Dual Freq (talk contribs) came by and inserted some {{-}}'s to clean it up. That's how I learned about it. TomTheHand 01:15, 28 February 2007 (UTC)
I LIKE WP! --Saintrain 01:46, 28 February 2007 (UTC)


[edit] Duplicated fields

I'm interpreting "Characteristics" as generic to the class of ship and "Career" as specific to a ship. I've copied "motto, nickname, honours, honors, notes and badge" from {{Infobox Ship Characteristics}} to {{Infobox Ship Career}}, and added "sponsor".

I've copied "class" from {{Infobox_Ship_Career}} to {{Infobox Ship Characteristics}}. I haven't removed or reordered anything. To my way of thinking, "class" is a characteristic and "honors" belong to a career.

In addition, where appropriate, a "class" page, e.g. Gilliam class attack transport can include an already-filled-in {{Infobox Ship Characteristics Gilliam ...}} and the articles on individual ships of this class can include the same template in place of the a blank {{Infobox Ship Characteristics}}.

I hope this is acceptable,

--Saintrain 05:59, 20 February 2007 (UTC)
Unfortunately you can't do it that way. This page is just a way of putting all documentation for the templates into a centralized location; you've changed the instructions for the templates without changing the templates themselves.
Now, I see what you're saying, but the changes you've suggested will not be simple. Let's discuss it at Wikipedia talk:WikiProject Ships, because more people will see the discussion and so it'll be easier to get input. TomTheHand 17:07, 20 February 2007 (UTC)
Hi Tom. I changed the templates AND this page all at once so that they would be in agreement. Now they aren't.
Did you mean I "can't do it that way" = "I didn't ask?" or that you didn't notice the changes to the templates?
--Saintrain 19:03, 20 February 2007 (UTC)
I managed to miss the changes to the template, and thought you had only changed this page. Sorry about that! However, it would be preferable to discuss this kind of change before making it, because these templates are used in many different articles so it affects a lot of people at once. TomTheHand 19:38, 20 February 2007 (UTC)
(We're gonna run out of colons pretty soon!) Re: your edit "if we're going to move these things, we should only document the way we want them to be used, not the backwards-compatibility-only way"; Speaking as a WP user not just a Ship user, I have no problem leaving those attributes in both templates, it's like way more inclusive and stuff. Somebody might want them and now this page doesn't agree with tha current templates. Howsabout leaving everything in "Full" and simplifying "Simplified"? Maybe put Simplified first? --Saintrain 20:32, 20 February 2007 (UTC)
Frankly, if someone wants to do it the old way, I say "tough" ;-) Part of the reason for using a template is so that every ship's infobox looks the same, so I really don't think we should document the old way. I don't think people should be able to choose different ways to order fields. I'm still tempted to edit all uses of the infobox to conform to the new arrangement of fields, and then remove the backwards compatibility. TomTheHand 14:46, 21 February 2007 (UTC)

[edit] Civilian Ship fields

Hello, the template works quite well; I think it's a very noble effort to try to build a robust and diverse enough template for all ships, naval and civilian. Whoever is very good at the code, I was wondering if my inclusion shown on the template page could be added to the actual template. I'm not quite sure how to make the changes without making big problems. You can see what I'm trying to do on my Sandbox. Thanks. -- Pesco 02:41, 20 March 2007 (UTC)

I'd be happy to add them. I do have a few suggestions, though. First, the horsepower of the ship's engines is usually put into the "Propulsion" field. For example, USS Essex (CV-9) has the following in its propulsion field:

As designed:
8 × boilers (565 psi., 850ºF)
4 × Westinghouse geared steam turbines
4 × shafts
150,000 shp

Please put horsepower there right after noting what kind of engine the ship has. Second, what do you plan to put into "cargo capacity". If it's the ship's capacity in gross or net tonnage, it should go in the tonnage field, but if you're running into situations where you need other kinds of capacity, I'll be happy to add the field. TomTheHand 13:39, 20 March 2007 (UTC)
Thanks, I'll use the propulsion field as you suggest and use gross and net tonnage. I do think cargo capacity would be of use to describe capacity in a way other than in tons. For example, container ships measure ship capacity by TEU. Some ro-ro ships measure capacity by square feet or square meters of useful cargo deck space, or in approximate number of vehicles they can carry. For passenger ships, number of passengers should go under "compliment", correct? Thanks again. -- Pesco 22:49, 20 March 2007 (UTC)