Template talk:Ship#Proposed template changes
{{WikiProject banner shell|
{{WikiProject Ships}}
}}
Initial documentation
This template easily formats wikilinks to warship articles so as to synchronize Wikipedia's article titling policy with common body-text usage. It cuts the amount of piping to a minimum, inserts italics in the appropriate place, and (arguably) makes deciphering the markup somewhat easier.
To insert a wikilink to warship, insert the below string:
For example, to create {{Ship|HMS|Vanguard|S28}} (which is automatically linked to HMS Vanguard (S28)), insert
Or, to create {{Ship|USS|Nimitz|CVN-68}} (linked to USS Nimitz (CVN-68)), insert
The Tom 17:14, 25 August 2005 (UTC)
[[Main page]] usage
Shouldn't this template be protected, since it is transcluded onto the main page? A•N•N•Afoxlover hello! 20:42, 29 March 2007 (UTC)
Alternatives
You may want to use {{tl|USS}} or {{tl|HMS}}. They are a bit shorter to type, and now offer some (optional) flexibilty about what to display.
It really gets shorter if you want to display the hull number, such as {{HMS|Repulse|1916}} from.
More reasoning on Template talk:USS. --J Clear 23:20, 22 April 2007 (UTC)
Apparently Meaningless Terminal 6
Feature request
The question above from {{User|Toddy1}} got me thinking. Could someone with a better understanding of template parser functions add some of the functionality of {{tl|HMS}} and {{tl|USS}} into this template? Specifically I feel the following optional display control parameters would be very useful (note that #6 below works as the default on HMS/USS, while option #6 on HMS/USS works as the default on {{tl|warship}}):
style="border-style:solid;border-width:1px;border-color:#000000;background-color:#EFEFEF" cellspacing="2" cellpadding="2" width="100%" |
style="background-color:#FCFCFC" align="left"
! Template usage ! Equivalent wikicode ! Final result |
| | H75 |
Thoughts? Suggestions? Volunteers? 15px --Kralizec! (talk) 01:35, 28 September 2007 (UTC)
Transclusion cost/benefit?
I recently edited the Tribal class destroyer (1936) page to replace many confusing links to vessels with this template, however these were reverted shortly afterward and the editor pointed me toward the :Wikipedia:Transclusion costs and benefits while noting on my talk page that this template is too taxing for server processing. Does anyone have any thoughts about this? I would argue that the benefits of standardizing and simplifying links to articles on vessels, not to mention the kilobytes saved, would trump any minuscule increase in server effort....Thanks! Plasma east 15:29, 16 November 2007 (UTC)
:If I may make a suggestion ... bring this up at the WP:SHIPS talk page. That ways it will be seen by heaps more eyes! --Kralizec! (talk) 15:38, 16 November 2007 (UTC)
Standardization
I've asked TomTheHand to modify this template's syntax to include the optional display parameters used in {{tl|HMS}}, {{tl|USS}}, and {{tl|USNS}}. To bring this template in agreement with the others, after the change, the default output will display the prefix, name, and pennant/hull number. (This change of default output will not adversely affect existing articles, as the syntax of preexisting transclusions will be modified to produce the same output as before.) More important, of course, is that you'll be able to control display using parameters that are familiar from our other templates. Maralia (talk) 15:20, 17 December 2007 (UTC)
:I posted the following to Maralia's talk, but figured I'd post it here too to get better exposure. Please give feedback! Once we're all satisfied I'll copy it from my user space to here.
I've done a little work on the {{tl|warship}} issue, but I've run into some problems. First, the good news:
cellpadding=5
!Template usage !Equivalent wikicode !Final result |
|{{User:TomTheHand/warship|USS|Enterprise|CVN-65}} |
|{{User:TomTheHand/warship|HMCS|Kootenay|H75|6}} |
|{{User:TomTheHand/warship|HMCS|Ottawa|H60|2}} |
colspan=3|Essentially, if you supply it with a prefix, ship name, and classification symbol, you can then use the same spiffy output configuration options as in {{tl|USS}}. |
colspan=3|Now, the bad news: |
Template usage
!Equivalent wikicode !Final result |
---|
| |{{User:TomTheHand/warship|Japanese battleship|Yamato|2}} |
|{{User:TomTheHand/warship|Japanese battleship|Yamato|4=2}} |
colspan=3|You can't just supply it with a prefix, a ship name, and an output type. The third parameter you pass in is interpreted as the classification symbol. You've got to specifically set the fourth parameter (output type). I'd like for it to accept something more intuitive, like disp=2, but I'm not sure how to do that while still making it automatically understand four parameters if you supply it that way. TomTheHand (talk) 01:56, 18 December 2007 (UTC) |
:I think this is more intuitive:
::
:It's less characters than '4=2' or 'disp=2' also. Maralia (talk) 06:07, 19 December 2007 (UTC)
::Oooh... I didn't realize you could do that. Spiffy. Ok, I'll copy the updated template from my user space tonight. TomTheHand (talk) 21:56, 19 December 2007 (UTC)
Change request for parameter audit
{{tlx|editprotected}}
Request that the line
be changed to read
This modification would make no visible change to the template's operation, but helps generate a list of occurrences of
:Actually, please use [http://en.wikipedia.org/w/index.php?title=Template:Ship/sandbox&oldid=255269218 this version] of the sandbox template (less the sandbox notice). It incorporates Haus' request plus additional code for tracking the parameters USS, HMS, HMAS, and HMNZS. I have tested the code on the testcases page. This version also eliminates the text that displays on the template page that is now superfluous with the current template documentaion. — Bellhalla (talk) 20:34, 1 December 2008 (UTC)
::File:Yes check.svg Done. --Kralizec! (talk) 22:46, 1 December 2008 (UTC)
= Links for parameter audits =
- [http://en.wikipedia.org/wiki/Special:WhatLinksHere/Template:WP_Ships_HMAS_instances HMAS]
- [http://en.wikipedia.org/wiki/Special:WhatLinksHere/Template:WP_Ships_HMCS_instances HMCS]
- [http://en.wikipedia.org/wiki/Special:WhatLinksHere/Template:WP_Ships_HMNZS_instances HMNZS]
- [http://en.wikipedia.org/wiki/Special:WhatLinksHere/Template:WP_Ships_HMS_instances HMS]
- [http://en.wikipedia.org/wiki/Special:WhatLinksHere/Template:WP_Ships_USS_instances USS]
Edit request
{{tlx|editprotected}}
Please update the template to [http://en.wikipedia.org/w/index.php?title=Template:Ship/sandbox&oldid=266556927 this version] in the sandbox (less the sandbox template notice at the top). This eliminates the code snippet:
:
that was intended to track usage of this template with certain prefixes. Example: when USS is used as a prefix, the redlinked template {{tlx|WP Ships USS instances}} is transcluded, which, in theory, allows one to determine usage (by looking at "What links here" for use {{tlx|WP Ships USS instances}}). Then the specific {{tlx|USS}} could be used instead of this, the more generic template. However, since {{tlx|USS}} and others of the same functionality already themselves call {{tlx|Ship}}, the redlinked template is called for all uses of the prefix whether through {{tlx|Ship}} or {{tlx|USS}} making it impossible to determine which template was invoked, and making this bit of code unnecessary and needlessly complicating many pages. — Bellhalla (talk) 17:35, 26 January 2009 (UTC)
:Done, though if you look at [http://en.wikipedia.org/w/index.php?title=Template:Ship&action=edit the source code], does the sandbox notice need to be removed as well? Thanks, Woody (talk) 17:52, 26 January 2009 (UTC)
::Yes, it should. :) — Bellhalla (talk) 17:58, 26 January 2009 (UTC)
Another edit request
{{tlx|editprotected}}
Please replace this second line of the template code:
-->[[{{{1}}} {{#if:{{{up|}}}|{{{1}}} }}[[{{{1}}} --Ahecht (TALK
PAGE) 13:40, 30 July 2018 (UTC):This template must always be substed when used in section headings because links from watchlists and article histories to section headings that contain templates do not work.
:—Trappist the monk (talk) 13:50, 30 July 2018 (UTC)
::OK. {{para|wl|no}} can also be used in inline, when a ship's name is repeatedly used. - DePiep (talk) 14:08, 30 July 2018 (UTC)
:::{{U|Ahecht}} Is safesubst working correct now? I have added some code (in the sandbox),
(twice). If I understand{{Yesno|...}} #safesubst:
well, these {{tlf|yesno}} additions need some#safesubst
code too. I refer to your edit [https://en.wikipedia.org/w/index.php?title=Template:Ship/sandbox&diff=837921636&oldid=834073136&diffmode=source]. - DePiep (talk) 14:08, 30 July 2018 (UTC)::::{{ping|DePiep}} {{tl|Square bracket open}}, {{tl|Square bracket close}}, and {{tl|main other}} aren't substable, so I didn't bother fixing it. One of the dependent templates isn't substable. I will work on it a bit and see if I can figure it out. --Ahecht (TALK
PAGE) 14:18, 30 July 2018 (UTC)::::
{{ping|DePiep}} I got it mostly working, but {{tl|main other}} will still show up when substed. --Ahecht (TALK
PAGE) 14:22, 30 July 2018 (UTC)::::{{ping|DePiep}} I did one final update, and it should subst cleanly now. Let me know if you see any other issues. --Ahecht (TALK
PAGE) 15:47, 30 July 2018 (UTC):::::Thanks for cleaning this up. - DePiep (talk) 10:38, 31 July 2018 (UTC)
Template making all subsequent text small
{{edit template protected|answered=yes}}
All pages invoking this template appear to be causing the rest of the text on the page to appear as small. Look on any page (including this talk page) to see that all of the text that follows an invocation of the template becomes small. I doubt this behavior is intended; any chance it can be fixed? Sheahunter1 (talk) 04:56, 18 August 2018 (UTC)
:Try purging your browser and see if that helps. I had the same problem, and it seems to have solved the issue for me. See Wikipedia:Purge for more information. However, I don't know if purging is a permanent solution or not. - BilCat (talk) 05:33, 18 August 2018 (UTC)
:The problem has been resolved. It appears to be an issue with the "Close Square Bracket" template (https://en.wikipedia.org/w/index.php?title=Template:Square_bracket_close&diff=855421939&oldid=855419715). 2601:601:1001:E120:4C16:D71C:9F09:C2DB (talk) 06:16, 18 August 2018 (UTC)
:File:Red information icon with gradient background.svg Not done: No changes necessary. Enterprisey (talk!) 07:53, 18 August 2018 (UTC)
Template-protected edit request on 2 August 2019
{{edit template-protected|Template:Ship|answered=yes}}
Please amend the template to {{tl|nowrap}} the ID parameter in the link text output. This is particularly necessary for hull numbers of American ships, in cases such as {{tnull|ship|USS|Maddox|DD-731}}, in which a line break may be unsuitably placed immediately before "731". — RAVENPVFF · talk · 15:36, 2 August 2019 (UTC)
Redirects to sections
{{Edit template-protected|answered=yes}}
If an invocation of {{tl|ship}} results in a redirect which redirects to a section of an article, then clicking the link takes the reader to the top of the article, not the specified section. For example:
- ISS Enterprise (NCC-1701) is a redirect to Starship Enterprise#Mirror universe.
- But if you click the link produced by
{{ship|ISS|Enterprise|NCC-1701}} (= {{ship|ISS|Enterprise|NCC-1701}}), it takes you to the top of Starship Enterprise, not the nominated section. Can this be remedied?
DH85868993 (talk) 03:26, 24 June 2024 (UTC)
:{{done}} (by {{u|Trappist the monk}}) DH85868993 (talk) 13:58, 24 June 2024 (UTC)