Template talk:Sclass: Difference between revisions
→Monitor disambiguation: :::Oh there's a disambiguation option, I didn't see that. <nowiki>{{sclass|Abercrombie|monitor||warship}}</nowiki> gives the correct output: {{sclass|Abercrombie|monitor|| |
Ryan Vesey (talk | contribs) →Edit request on 26 August 2012: new section |
||
Line 56: | Line 56: | ||
::Yeah, I fixed that. Copy-paste error. <span style="font-variant:small-caps; whitespace:nowrap;">[[User:Headbomb|Headbomb]] {[[User talk:Headbomb|talk]] / [[Special:Contributions/Headbomb|contribs]] / [[WP:PHYS|physics]] / [[WP:WBOOKS|books]]}</span> 19:01, 2 May 2012 (UTC) |
::Yeah, I fixed that. Copy-paste error. <span style="font-variant:small-caps; whitespace:nowrap;">[[User:Headbomb|Headbomb]] {[[User talk:Headbomb|talk]] / [[Special:Contributions/Headbomb|contribs]] / [[WP:PHYS|physics]] / [[WP:WBOOKS|books]]}</span> 19:01, 2 May 2012 (UTC) |
||
:::Oh there's a disambiguation option, I didn't see that. <nowiki>{{sclass|Abercrombie|monitor||warship}}</nowiki> gives the correct output: {{sclass|Abercrombie|monitor||warship}}. <span style="font-variant:small-caps; whitespace:nowrap;">[[User:Headbomb|Headbomb]] {[[User talk:Headbomb|talk]] / [[Special:Contributions/Headbomb|contribs]] / [[WP:PHYS|physics]] / [[WP:WBOOKS|books]]}</span> 19:05, 2 May 2012 (UTC) |
:::Oh there's a disambiguation option, I didn't see that. <nowiki>{{sclass|Abercrombie|monitor||warship}}</nowiki> gives the correct output: {{sclass|Abercrombie|monitor||warship}}. <span style="font-variant:small-caps; whitespace:nowrap;">[[User:Headbomb|Headbomb]] {[[User talk:Headbomb|talk]] / [[Special:Contributions/Headbomb|contribs]] / [[WP:PHYS|physics]] / [[WP:WBOOKS|books]]}</span> 19:05, 2 May 2012 (UTC) |
||
== Edit request on 26 August 2012 == |
|||
{{edit protected|answered=no}} |
|||
<!-- Begin request --> |
|||
Please replace the content of this with the content of [[Template:Sclass/sandbox]]. It will remove hyphens in the ship class per [[Wikipedia talk:WikiProject Ships#Ship class hyphens]]. |
|||
<!-- End request --> |
|||
[[User:Ryan Vesey|'''''Ryan''''']] [[User talk:Ryan Vesey|'''''Vesey''''']] 13:15, 26 August 2012 (UTC) |
Revision as of 13:15, 26 August 2012
![]() | Ships Template‑class | ||||||
|
Optional parameter value = 4
I modified the template so that it will accept an optional parameter value of 4. This will allow properly punctuated usage of the class when it is to be used as a noun. Grammatically, using parameter value = 0 provides an adjectival form.
For example:
- The last ship of the {{sclass|Haven|hospital ship|4}} is still afloat in [[Baltimore, Maryland]].
Gives this:
- The last ship of the Haven class is still afloat in Baltimore, Maryland.
I tested this at {{User:Bellhalla/Sandbox}} prior to implementing the change, so I am hopeful that it will work correctly.— Bellhalla 11:41, 6 November 2007 (UTC)
Disambiguation parameter
I have added a disambiguation parameter to {{sclass}} to help avoid generating links to disambiguation pages. This is what occurred previously when the "ship type" parameter was "minesweeper". The template linked to minesweeper, a disambiguation page, rather than minesweeper (ship).
I tested the functionality of my changes at {{sclass/sandbox}} and User:Bellhalla/Sandbox before implementing them. — Bellhalla (talk) 19:03, 24 December 2007 (UTC)
hyphen use
what if you don't like using a hyphen in the class name? GraemeLeggett (talk) 08:54, 25 December 2007 (UTC)
- As of right now, you can generate the form "Name class" — with no hyphen (but also no ship type) — by using format option 4, like this
{{sclass | Shipname | Classtype | 4 }}
- which would produce
Shipname class
. — Bellhalla (talk) 11:58, 25 December 2007 (UTC)
Edit request
{{editprotected}}
Please change the first line of this template from this:
<includeonly>[[{{{1}}} class {{{2}}}| ''{{{1}}}''<!-- remove \n
to this:
<includeonly>[[{{{1}}} class {{{2}}}|''{{{1}}}''<!-- remove \n
This edit will remove one extra space character that is generated in front of the link, noticeable when this template is used right after punctuation. This should be a pretty straightforward edit, but nevertheless, I have tested this change at the testcases page. — Bellhalla (talk) 16:24, 4 June 2009 (UTC)
Done. — Kralizec! (talk) 17:42, 4 June 2009 (UTC)
Optional Type
Is there a possible way to have a code similar to this template, and having the shiptype be optional? Like, perhaps you don't have a ship type to use, or it's known (For instance, Enterprise-class) (a random named I picked, by the way) That way, you could use this template with and without a type, I've tried to figure this out, but I just...can't seem to get going in the right direction.--Terran Officer (talk) 10:11, 16 April 2010 (UTC)
Hyphenated article
I'm unable to get this template to output a link without a redirect on an article that hyphenates in the name (i.e. Derfflinger-class battlecruiser). Nothing I can come up with will output a link with the hyphen, necessitating a redirect (i.e. Derfflinger class battlecruiser). Can we establish a parameter to change this without screwing up the parser? For the list I'm generating, I can't use a greenlink, I need the actual target instead of a redirect (and really don't want to have to manually type piped links with italics). bahamut0013wordsdeeds 17:25, 16 December 2010 (UTC)
French wiki
Hello,
Could you add fr:Modèle:Classe to interwiki links ? Thanks, Gonzolito Pwet 21:30, 19 January 2012 (UTC)
Done, see here, but you didn't need to use
{{editprotected}}
- Template:Sclass/doc is not protected. --Redrose64 (talk) 18:44, 2 May 2012 (UTC)
Avoiding Class Disambig
Is there some parameter to distinguish between different classes of the same name? For instance there are two South Dakota-class battleships, so that link just leads to the disambig. Is there a way to write it so that it will lead to one or the other? --Grahamdubya (talk) 15:33, 17 February 2012 (UTC)
Monitor disambiguation
Using {{sclass|Abercrombie|monitor}} gives Abercrombie-class monitor ([[Abercrombie class monitor|''Abercrombie''-class]] [[monitor]]). It should instead give Abercrombie-class monitor ([[Abercrombie class monitor|''Abercrombie''-class]] [[monitor (warship)|monitor]]). Headbomb {talk / contribs / physics / books} 16:43, 2 May 2012 (UTC)
- Two things: (i) my understanding is that it's only the ship's name which should be italicised, the word "class" is written upright; (ii) you don't seem to have sufficient apostrophes in your
<nowiki>...</nowiki>
examples. --Redrose64 (talk) 18:47, 2 May 2012 (UTC)- Yeah, I fixed that. Copy-paste error. Headbomb {talk / contribs / physics / books} 19:01, 2 May 2012 (UTC)
- Oh there's a disambiguation option, I didn't see that. {{sclass|Abercrombie|monitor||warship}} gives the correct output: Abercrombie-class monitor. Headbomb {talk / contribs / physics / books} 19:05, 2 May 2012 (UTC)
- Yeah, I fixed that. Copy-paste error. Headbomb {talk / contribs / physics / books} 19:01, 2 May 2012 (UTC)
Edit request on 26 August 2012
Please replace the content of this with the content of Template:Sclass/sandbox. It will remove hyphens in the ship class per Wikipedia talk:WikiProject Ships#Ship class hyphens.