Template talk:Infobox ship

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
WikiProject iconShips Template‑class
WikiProject iconThis template is within the scope of WikiProject Ships, a project to improve all Ship-related articles. If you would like to help improve this and other articles, please join the project, or contribute to the project discussion. All interested editors are welcome. To use this banner, please see the full instructions.WikiProject icon
TemplateThis template does not require a rating on Wikipedia's content assessment scale.

Minor edit request[edit]

Greetings and felicitations. Since the various sub-templates are being merged into this template, it seems to be a good time to ask this: Would someone please be so kind as to eliminate the space between "General characteristics" and the "Header caption" field, as shown in HMS Chichester (1785)'s infobox, and per MOS:CITEPUNCT? —DocWatson42 (talk) 01:14, 29 July 2022 (UTC)[reply]

 Done Prarambh20 (talk) 21:15, 22 May 2023 (UTC)[reply]

Introduction[edit]

Hello editors! please allow me to propose a merged version of following Infoboxes.

Based on the conclusion of the discussion, we have a current version of the {{Infobox ship}} that can able to replace all proposed Infoboxes, on usage pages. This version serves as a singular template, offering several capabilities and meeting the necessary requirements.

Infobox ship begin and ship image are now directly available as parameters, for more then one image this Infobox support upto three image fields ( upto image3 ), but if there is a need for more then three images then we can use Image templates for that. All the "article title customization" parameters of {{Infobox ship begin}} are also available in this version except showerrs because this one is currently not in function.

This Infobox has been designed to incorporate and address most of the suggestions that were presented during the merger discussion (to the best of my ability):

  • It supports embedding (more info below).
  • Supports custom fields.
  • Standardized order of sections, but it also allows for rearranging sections to accommodate specific needs.
  • The parameters for Ship Recommissioned/Decommissioned can use multiple times.
  • No more need for wikitable when using it.
  • The Infobox ship image is now displayed as an image parameters.
  • Lastly, the issue raised by Comrade John can be resolved by embedding (more solutions discussed below, such as subbox and repeating).

Repeating perameters[edit]

In this proposed version, any section (career, class, characteristics) can be repeated or used multiple times to address specific needs. By including the perameters_multi parameter, dual and triple parameters for sections can be utilized (currently up to 3 times). For example, if |parameters_multi=2 then the perameter |name2= can be utilized alongside |name=, and this applies to all parameters in each section. Similarly, if |parameters_multi=3 then |name3= can be used as well.

All of the sections will be displayed in a standardized order, which is Class > career > characteristics > service record.

Here's an example to demonstrate how the multiplication of parameters may work:

Wikitext Display
{{Infobox ship
| parameters_multi = 2 <!-- set to 2 for double repetition  -->
| infobox_caption = Infobox caption
| name  = Name1
| builders  =  Builders1
| operators  =  Operators1
| class_before  = Class before1
| class_after  = Class after1
<!-- with 2  -->
| name2  = Name2
| builders2  =  Builders2
| operators2  =  Operators2
| class_before2  = Class before2
| class_after2  = Class after2
<!-- another section parameters  -->
| ship_namesake = Ship Namesake
| ship_owner = ship_owner
}}
Infobox caption
Class overview
NameName1
BuildersBuilders1
OperatorsOperators1
Preceded byClass before1
Succeeded byClass after1
Class overview
NameName2
BuildersBuilders2
OperatorsOperators2
Preceded byClass before2
Succeeded byClass after2
History
NamesakeShip Namesake
Ownership_owner

Subboxes and embedding[edit]

If there is a specific need to rearrange these sections, it can be done using "section subboxes" These subboxes allow for the reorganization of sections, either separately or as embedded entities.

For example, by duplicating the parameters, the order would be career > career 2 and then service record > service record 2. However, by using subboxes, it is possible to rearrange them as career1 > service record 1 > career2 > service record 2.

These subboxes can be used separately after the main Infobox ship in any order, or they can be used as embedded versions anywhere needed within or after a section. If the subboxes are used separately, they must be mentioned as |subbox=yes and concluded with a footer. If they are used inside the Infobox, there is no need for a footer.

Here are some examples
  • For using the subboxes separetly:
Wikitext Display
{{Infobox ship
| infobox_caption = Infobox caption
| subbox = yes <!-- 'yes' for allowing the usage of subboxes  -->
| name  = Name
| builders  =  Builders
| operators  =  Operators
| class_before  = Class before
| class_after  = Class after}}{{Infobox ship/subbox|section=characteristics
| ship_length = Ship length
| ship_beam  = Ship beam }}{{Infobox ship/subbox|section=career
| ship_namesake = Ship namesake
| ship_owner = ship owner}}
Infobox caption
Class overview
NameName
BuildersBuilders
OperatorsOperators
Preceded byClass before
Succeeded byClass after
General characteristics
LengthShip length
BeamShip beam
History
NamesakeShip namesake
Ownership owner
  • For using the subboxes inside the Infobox:
Wikitext Display
{{Infobox ship
| infobox_caption = Infobox caption
| name  = Name
| builders  =  Builders
| operators  =  Operators
| class_before  = Class before
| class_after  = Class after {{Infobox ship/subbox|section=characteristics
| ship_length = Ship length
| ship_beam  = Ship beam }}{{Infobox ship/subbox|section=career
| ship_namesake = Ship namesake
| ship_owner = ship owner}}
}}
Infobox caption
Class overview
NameName
BuildersBuilders
OperatorsOperators
Preceded byClass before
Succeeded byClass after
General characteristics
LengthShip length
BeamShip beam
History
NamesakeShip namesake
Ownership owner

Coustom fields[edit]

To utilize custom fields, include {{Infobox | child = yes }} under any parameter or field. Please note that wikitable may not be supported.

Parameters[edit]

All parameters have been converted to snack case as per WP:INFOBOXNAME and follow a standardized format (in an ideal situation).

For cases where a ship has been decommissioned or recommissioned multiple times, use |ship_recommissioned_second= or |ship_decommissined_second= (up to the fourth instance). Please note that ship_recommissioned_second and ship_recommissioned2 are not the same. "Second" is used when a ship is recommissioned for the second time after the first, while "2" is used when the ship is recommissioned under a different operator or management and "ship_recommissionned_second2" is for when the ship was again Recommissioned after the first under the second management. Means use "2" when the ship was handoverd to a new operator or military. Prarambh20 (talk) 21:01, 22 May 2023 (UTC)[reply]

Discussion[edit]

Pinging editors from the discussion(s):

Can this work? Prarambh20 (talk) 17:25, 24 May 2023 (UTC)[reply]

@User:Prarambh20I thought you abandoned this work since there's no news since last year. Don't really care what you do, I just hope there's no change or lost any parameters after you merge the infobox ship template , readers feel nothing unless they check the edit page since it is a big deal in Chinese Wikipedia too (we have many translate English ship article using infobox ship xxx template). Can you change these two as example: USS Sailfish (SS-192) and SM UB-155 ?--Comrade John (talk) 18:19, 24 May 2023 (UTC)[reply]
You may need to tell this to community in Chinese wikipedia's Wikipedia:Village pump (technical) , in details. But I will make the thread first to notfiy them. Don't worry about the English though.--Comrade John (talk) 18:29, 24 May 2023 (UTC)[reply]
Just saw you merged Infobox aircraft as well, Hope infobox ship merger will not meet the same fate, otherwise you may need to hold this merger.--Comrade John (talk) 18:48, 24 May 2023 (UTC)[reply]
I like it I like it. Why in {{Infobox ship}} is there a <table>? The |subbox= parameter should be passed directly onto Template:Infobox. SWinxy (talk) 19:13, 24 May 2023 (UTC)[reply]
Hey, first of all, thanks! I actually got the idea of using subboxes from your comment on WP:TFDH and I greatly appreciate your suggestions.
The template Infobox ship uses a <table> because it allows the usage of subboxes separately and enables easy rearrangement as needed. It also supports the current multi-parameter structure of the Infobox and facilitates repeating parameters if necessary. The <table> is not required to use the Infobox, so it won't break. Yes, we can use the parameter subbox to rearrange the sections, but I believe the current approach is less complex. Thank you very much. Prarambh20 (talk) 20:13, 24 May 2023 (UTC)[reply]

Where are the side-by-side comparisons? Do not use contrived examples like those shown on this page. Use real examples from real articles with all of their warts and pimples.

Quite a while ago I hacked Module:Infobox ship which implements ship infoboxen without the external wikitable. A couple of side-by-side comparisons can be seen at my sandbox (permalink). There was a short discussion about that at Wikipedia:Templates for discussion/Holding cell § Infoboxes where it languishes... There wasn't sufficient discussion for me to move forward with that, but, I toss it on the table here as another option. It needs some work to support enumerated parameters but that isn't too onerous. I claimed at WP:TFD/H that the module supported custom parameters but didn't create an example of that and now, all these months later, don't recall how that is implemented (if it is implemented).

I do not like |parameters_multi=; that seems clunky and probably unnecessary. The subboxen solution is much the same sort of idea as my enumerated |section<n>= parameters – there was some pushback against that at WP:TFD/H.

Trappist the monk (talk) 21:49, 24 May 2023 (UTC)[reply]

Development and Improvement discussions[edit]

We welcome your suggestions for improvement or assistance in identifying any errors. If you come across any issues, please feel free to resolve them or inform us here. Some information about the current version might be available on Template talk:Infobox ship#Introduction. Thank you! Prarambh20 (talk) 21:13, 22 May 2023 (UTC)[reply]

Prarambh20: Your first example below "For using the subboxes separetly:" has a missing end tag for <table>. Perhaps it comes from confusion over the meaning of the subbox parameter. The way infoboxes usually work, setting this to "yes" would mean "this is a subbox", not "subboxes are allowed to be here". Usually subboxes are added with something like

|module= 
{{my_subbox
|child=yes
}}

and here you are putting in the subboxes without a parameter. That's not the usual way on Wikipedia. I don't know what's going on, all I know is the lint error is there. —Anomalocaris (talk) 01:59, 12 June 2023 (UTC)[reply]