Template_talk:Infobox ship
| This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
| ||||||||
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)
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
}}
|
|||
Subboxes and embedding
[edit]- Subbox page: Template:Infobox ship/subbox
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}}
|
|||
| General characteristics | |||
| Length | Ship length | ||
| Beam | Ship beam | ||
| History | |||
| Namesake | Ship namesake | ||
| Owner | ship 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}}
}}
|
|||
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)
Discussion
[edit]Pinging editors from the discussion(s):
Can this work? Prarambh20 (talk) 17:25, 24 May 2023 (UTC)
- @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)
- 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)
- 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)
- 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)- 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
subboxto rearrange the sections, but I believe the current approach is less complex. Thank you very much. Prarambh20 (talk) 20:13, 24 May 2023 (UTC)
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)
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)
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)
Wikidata
[edit]Is the template connected with WD? If so (or if planned to do so), please be aware that the WD item could reference the hull only (and the fixed IMO number), all names, call signs, images, etc. (if different) should be retrieved for a specified period. Pl71 (talk) 01:17, 4 September 2024 (UTC)
- A long time ago, shortly after wikidata was introduced if I remember rightly, there was an attempt to do something with wikidata. The community rejected wikidata shortly thereafter so, no, the ship infoboxen do not utilize wikidata and, so far as I know, there is no move afoot to do so. You can trawl the archives of this page, and WT:SHIPS, to find the relevant discussions.
- —Trappist the monk (talk) 02:54, 4 September 2024 (UTC)
Proposal for a new merged version
[edit]Hello everyone, building upon User:Prarambh20's earlier work, I've developed a new version of the merged {{Infobox ship}} template, now available in Template:Infobox ship/sandbox. You can review its usage and rendering in Template:Infobox ship/testcases. This draft reflects my proposed approach to merging the templates, though further refinements may be needed. Please share your suggestions, thank you! Kcx36 (talk) 11:20, 10 April 2025 (UTC)
Update
[edit]@Prarambh20, SWinxy, and Trappist the monk: What is the latest on this merge? It has been ongoing since April of 2022. Can anyone provide me some sort of status report? Trappist the monk what is going on with Module:Infobox ship? Would be great to know what still needs to be done. I know this is a daunting conversion. If someone can take some time to give me a comprehensive status report of where we stand and what still needs to be done, I'd beee happy to take this on... Zackmann (Talk to me/What I been doing) 20:34, 8 October 2025 (UTC)
- There is no
latest on this merge
. It is stalled. For me its stalled because there was objection to the way I implemented Module:Infobox ship. Also, stalled because I claimed thatcustom fields are supported
(link); I don't remember how I thought to implement that but it is a must-keep-functionality for these infoboxen. Also stalled because I started on a bot task to convert existing table-based infoboxen to use an{{infobox ship}}template wrapped around Module:Infobox ship. I remember immediately encountering problems that the module didn't cleanly support; alas, I neglected to keep any notes – likely because of the initial objection to my Module:Infobox ship implementation. - —Trappist the monk (talk) 19:28, 9 October 2025 (UTC)
- @Trappist the monk: do you have thoughts on a way forward? I know this is a big one but as I said I would like to be helpful. If you've moved on to other projects that totally fine but any input you can give or information you can convey on how to move forward would be super helpful. -- Zackmann (Talk to me/What I been doing) 20:32, 9 October 2025 (UTC)
- I suppose that the first thing to do is to usurp Template:Infobox ship since Editor Prarambh20 is no longer with us to maintain (or defend) that template. There are ~30 mainspace articles that use the Prarambh20 infobox. So to usurp, I suppose that we must:
- create the subtemplates listed in holding cell
- replace the Prarambh20 infoboxen in mainspace with direct
#invokes of Module:Infobox ship; this will serve as a way to test the new module - once all Prarambh20 infoboxen have been replaced, rewrite
{{Infobox ship}}to call Module:Infobox ship - replace the direct
#invokes with the new version of{{Infobox ship}} - template documentation because the parameter names are different and the basic structure of the infobox is slightly different
- After that, I suppose it is time to work out how to code a bot to do the grunt work of replacing the bulk of the existing table-based ship infoboxen.
- Or, because this seems so much like an its-not-broken-so-lets-fix-it exercise, we might just do nothing; its often best.
- —Trappist the monk (talk) 22:48, 11 October 2025 (UTC)
- I suppose that the first thing to do is to usurp Template:Infobox ship since Editor Prarambh20 is no longer with us to maintain (or defend) that template. There are ~30 mainspace articles that use the Prarambh20 infobox. So to usurp, I suppose that we must:
- @Trappist the monk: do you have thoughts on a way forward? I know this is a big one but as I said I would like to be helpful. If you've moved on to other projects that totally fine but any input you can give or information you can convey on how to move forward would be super helpful. -- Zackmann (Talk to me/What I been doing) 20:32, 9 October 2025 (UTC)
- I have remembered how to handle custom infobox fields. In the adjacent infobox using Module:Infobox ship, the 'Sunk' and 'Raised' fields are custom. Compare to the example infobox at Template:Infobox ship begin § Custom fields.
- —Trappist the monk (talk) 22:48, 11 October 2025 (UTC)
- @Trappist the monk: Really appreciate you taking the time to explain. I've gotten caught up in a couple other projects at the moment, but once I have some time I will read through this. Hopefully I can pick this up as my next project. Thanks again! -- Zackmann (Talk to me/What I been doing) 00:11, 12 October 2025 (UTC)