→Imagesize: link to prev thread; shorten diff link (don't assume everybody uses the same server) |
|||
Line 117: | Line 117: | ||
::::Well seeing as the documentation for this page says 300 is default I assumed it once was - I'll have a look at the history and see if that was ever true.[[User:Sf5xeplus|Sf5xeplus]] ([[User talk:Sf5xeplus|talk]]) 20:02, 23 August 2010 (UTC) |
::::Well seeing as the documentation for this page says 300 is default I assumed it once was - I'll have a look at the history and see if that was ever true.[[User:Sf5xeplus|Sf5xeplus]] ([[User talk:Sf5xeplus|talk]]) 20:02, 23 August 2010 (UTC) |
||
::::.. ah someone did it back in |
::::.. ah someone did it back in {{diff|Template:Infobox_locomotive|347477749|332254705|March}} (I knew I wasn't imagining it) - they also added what seems to be an unnecessary "frameless" modifier - I think it's frameless by default unless it's a thumb. [[User:Sf5xeplus|Sf5xeplus]] ([[User talk:Sf5xeplus|talk]]) 20:06, 23 August 2010 (UTC) |
||
::::: I think you are confused about what the keyword frameless means. You can think of it as the "default thumbnail size without a frame", which is basically the analog of "thumb" without the frame. This allows the user to specify the default thumbnail image size in his or her preferences. Without a size parameter, the default is to show the unscaled image, which is certainly not frameless by default. It is frameless by default now, but that is because it is specified as such. [[User:Plastikspork|Plastikspork]] [[User talk:Plastikspork|<sub style="font-size: 60%">―Œ</sub><sup style="margin-left:-3ex">(talk)</sup>]] 20:16, 23 August 2010 (UTC) |
::::: I think you are confused about what the keyword frameless means. You can think of it as the "default thumbnail size without a frame", which is basically the analog of "thumb" without the frame. This allows the user to specify the default thumbnail image size in his or her preferences. Without a size parameter, the default is to show the unscaled image, which is certainly not frameless by default. It is frameless by default now, but that is because it is specified as such. [[User:Plastikspork|Plastikspork]] [[User talk:Plastikspork|<sub style="font-size: 60%">―Œ</sub><sup style="margin-left:-3ex">(talk)</sup>]] 20:16, 23 August 2010 (UTC) |
||
:::::: Any particular reason for changing it while we are in the middle of a discussion? [[User:Plastikspork|Plastikspork]] [[User talk:Plastikspork|<sub style="font-size: 60%">―Œ</sub><sup style="margin-left:-3ex">(talk)</sup>]] 20:22, 23 August 2010 (UTC) |
:::::: Any particular reason for changing it while we are in the middle of a discussion? [[User:Plastikspork|Plastikspork]] [[User talk:Plastikspork|<sub style="font-size: 60%">―Œ</sub><sup style="margin-left:-3ex">(talk)</sup>]] 20:22, 23 August 2010 (UTC) |
||
:::::::Where was the discussion to change it in the first place from the default. Don't be odd.[[User:Sf5xeplus|Sf5xeplus]] ([[User talk:Sf5xeplus|talk]]) 20:24, 23 August 2010 (UTC) |
:::::::Where was the discussion to change it in the first place from the default. Don't be odd.[[User:Sf5xeplus|Sf5xeplus]] ([[User talk:Sf5xeplus|talk]]) 20:24, 23 August 2010 (UTC) |
||
::::::::See [#Confused|here]]. --[[User:Redrose64|<span style="color:#d30000; background:#ffeeee">Red</span>rose64]] ([[User talk:Redrose64|talk]]) 21:30, 23 August 2010 (UTC) |
|||
:I changed it back to the way it was. I wasn't aware of any discussion when it was changed from the default of 300px. I used the original version instead of my own since that definately worked.[[User:Sf5xeplus|Sf5xeplus]] ([[User talk:Sf5xeplus|talk]]) 20:24, 23 August 2010 (UTC) |
:I changed it back to the way it was. I wasn't aware of any discussion when it was changed from the default of 300px. I used the original version instead of my own since that definately worked.[[User:Sf5xeplus|Sf5xeplus]] ([[User talk:Sf5xeplus|talk]]) 20:24, 23 August 2010 (UTC) |
||
::Or not, thanks for changing it to the more modern File: version. [[User:Sf5xeplus|Sf5xeplus]] ([[User talk:Sf5xeplus|talk]]) 20:26, 23 August 2010 (UTC) |
::Or not, thanks for changing it to the more modern File: version. [[User:Sf5xeplus|Sf5xeplus]] ([[User talk:Sf5xeplus|talk]]) 20:26, 23 August 2010 (UTC) |
Revision as of 21:30, 23 August 2010
Trains: Locomotives Template‑class | |||||||||||||||||||
|
This template currently uses the hiddenStructure technique of hiding rows for data that has not been declared in the template usage call. However, using hiddenStructure does not hide the rows when pages using the template are viewed in text mode with lynx or with a screen reader for the blind. I've seen comments elsewhere that {{qif}} (which was itself survived a deletion vote in January) does not have this problem, but it runs afoul of users who wave the WP:AUM banner. Personally, I have no strong preference for either as the arguments are quite convincing on both sides. This template was written with hiddenStructure because it's easier to read and code. Until we have a formal policy in favor of one method over the other, it seems easiest and best for the moment to keep using hiddenStructure here. Slambo (Speak) 19:09, 14 March 2006 (UTC)
- While I would like to eliminate hiddenStructure entirely, due to its many flaws (it also causes templates to fail when ported to other language Wikipedias), I've been hoping that built-in conditionals will be introduced in a timely fashion and all other methods ('qif', 'hiddenStructure', 'weeble', et cetera) can then be moved to that. In the mean-time, please consider using QIF for new templates because spreading 'hiddenStructure' really does dis-enfranchise the users for whom it doesn't work. You can actually structure QIF to work with virtually identical layout as hiddenStructure;
|- {{qif|test={{{param|}}}|then= ! Header | {{{param}}} }}
- Thus there is really little difference between the two methods except that qif works for more people.--CBDunkerson 19:48, 14 March 2006 (UTC)
- Thanks for the simpler explanation than I've seen elsewhere. I was thinking a migration to qif would be beneficial, you've just made it a lot easier. B-) With this syntax, is there anyone who would object to the switch? I don't think I'll be able to perform the transition for another day or two, but maybe someone else would like to have a go at it? Slambo (Speak) 20:16, 14 March 2006 (UTC)
- I tried making the conversion, but must have missed something. Probably forgot a }} somewhere... More investigation and I'll get it working (hopefully) tonight. Slambo (Speak) 00:58, 23 March 2006 (UTC)
- Looks like I wasn't missing anything, but qif itself is getting confused with all of the | characters for rows in wiki markup and misinterpreting them as the end of parameter markers for itself. Hmmm... Slambo (Speak) 01:56, 23 March 2006 (UTC)
- Thanks for the simpler explanation than I've seen elsewhere. I was thinking a migration to qif would be beneficial, you've just made it a lot easier. B-) With this syntax, is there anyone who would object to the switch? I don't think I'll be able to perform the transition for another day or two, but maybe someone else would like to have a go at it? Slambo (Speak) 20:16, 14 March 2006 (UTC)
After a little more experimentation, I have a working test template that matches this template's functionality but using m:ParserFunctions instead of hiddenStructure or {{qif}} (which is now the subject of an MFD in order to deprecate it). When I tried looking at my template usage test page in lynx, it still showed the parameters that were unused. Slambo (Speak) 20:17, 18 April 2006 (UTC)
- Doh! Pasting my test code into the template produced a page of blank space above the infobox. Back to testing... Slambo (Speak) 18:09, 19 April 2006 (UTC)
- The problem is that the #if: was around the text of each line, but not the line breaks themselves... you had each #if: on a separate line and all of those line breaks appear in the finished product whether the stuff 'inside' the #if: does or not. There are a few ways around that:
- Put all the #if: in a long stream with no line breaks. In most cases this is messy and confusing and thus not used.
- Put comment markers (i.e. <!-- COMMENTED OUT TEXT -->) around the line breaks to suppress them. Thus you'd see <!-- at the end of each #if: line and --> at the start of each... causing the line break in between to be commented out.
- Put the closing brackets of one #if: on the same line as the opening brackets of the next like, }}{{#if:. This puts the line breaks inside the #if: code... where standard wiki-markup ignores line breaks if there is just one.
- Build the #if: around wiki table markup by replacing any '|' characters inside the #if: text with {{!}}. That evaluates to a '|', but does not interfere with the #if: '|' characters... then the wiki table markup takes care of line spacing.
- --CBDunkerson 18:40, 19 April 2006 (UTC)
- The problem is that the #if: was around the text of each line, but not the line breaks themselves... you had each #if: on a separate line and all of those line breaks appear in the finished product whether the stuff 'inside' the #if: does or not. There are a few ways around that:
Locomotive Class
Could someone who knows what they're doing link "Class" to class (locomotive)? Mangoe 18:19, 30 June 2006 (UTC)
Any chance of an extra column for imperial vs metric measure?
Hi there,
I quite like using this infobox template, but the only limitation I find is that to provide both imperial and metric measurements can get a little messy. I'm not greatly fussed by imperial vs metric (I come from one of those countries where both systems are still in common use and we're pretty good at converting!) however, I understand that the Wikipedia manual of style suggests "give the metric equivalent as a courtesy". Furthermore, even if I choose to leave my articles with imperial measures only, a number of editors will seek out articles with imperial measures and insert metric equivalents as happened to the Victorian Railways H class and Victorian Railways N class articles I originally authored.
I see no point to providing metric measures only, given that I'm writing about locomotives where all design parameters were quoted in imperial units, as this makes the article much harder for someone to use when comparing other historical sources quoting imperial measures.
I find the imperial/metric thing particularly messy if you are trying to also include details of a design change to a locomotive, eg "total weight: X lbs (XX kg) as built, Y lbs (YY kg) after superheater installation".
I'm not sure how to best handle this. Could we consider modifying the infobox so that it splits the cells for those fields which require a measurement such as lbs, ft etc into two columns, with the second column for metric measurements an optional extra? Zzrbiker 05:56, 26 April 2007 (UTC)
Weight Loco
I find in some steam locomotive articles that the definition of "weight" as "The locomotive's total weight" is a source of confusion. In some cases this has been taken to mean the total weight of the locomotive and tender (already covered by the rubric "locotenderweight" - the combined locomotive and tender total weight). If I have understood right, "weight" stands for the weight of the locomotive (power unit) alone, presumably in working order. This is a far more useful criterion if we remember that a steam locomotive can be attached to several different tenders in the course of its career. For instance giving the loco+tender weight for French locomotives would be particularly meaningless as locomotives and tenders were maintained by separate services and had more or less independent careers.--John of Paris 17:38, 3 September 2007 (UTC)
Strange nobody has taken up this issue. Not being very IT literate I hesitate to mess with the template, but suggest it is really urgent to change the mark-up to "weight loco" instead of "total weight" which should avoid confusion for the steam folk whilst not disturbing the others.--John of Paris 08:58, 4 December 2007 (UTC)
Well thanks pals! - for nothing. I've held my breath, modified the template and it seems to work all right. Someone should check all the same.--John of Paris (talk) 11:05, 20 January 2008 (UTC)
Field required for 'ALT' text
There is a growing move towards the provision of 'ALT' text for images within WP (WP:ALT). This is text that will be displayed if the image cannot be loaded or, more importantly, if a visually-impaired user is making use of a screen-reader: the ALT text will be read out loud, before the caption, to describe what the picture shows. (Incidentally, for validated HTML code, ALL images must have alt text defined.)
In SR Merchant Navy class I have managed to fool the infobox into including the alt text (by using the {{!}}
template, which sneaks-in a pipe symbol) by effectively adding it to the end of the filename. (See the alt text for each image using the 'toolbox' on the article's talk page.) A side-effect is that it shows as 'title' text, which would not normally be the case.
It would be much better if there were an 'alt = ' field provided to apply the text to the image correctly. My Parser function knowledge is rusty, so I'd rather someone else attempted this!
EdJogg (talk) 02:21, 17 December 2009 (UTC)
- Done Chris Cunningham (not at work) - talk 09:48, 17 December 2009 (UTC)
- Thank you. SR Merchant Navy class now modified to suit. -- EdJogg (talk) 10:04, 17 December 2009 (UTC)
Confused
The first line of the documentation on the main page reads:
- This template has a large number of parameters, all of which are optional:
The first line above reads:
- This template has a large number of parameters, but only two are required:
Neither appears to be the whole story. I have just noticed that if you leave the image size blank, as in
| imagesize =
you don't get an image. If you remove the line, you get the default size.
What I'd really cheer for is a change to the template to produce the default if it's left blank. In general, I'm reluctant to remove blank parameter lines, as the parameter might be needed in the future. This is particularly true of images, which often come after the article. If that's hard, then I'll change the documentation. . . . . Jim . . . . Jameslwoodward (talk • contribs) 00:06, 5 February 2010 (UTC)
- Done I've also adjusted the default size if none is given to "frameless", which matches the user's default thumbnail size. Chris Cunningham (not at work) - talk 09:13, 3 March 2010 (UTC)
Borders
So we've got one of those tiresome situations where someone is demanding "consensus" before changes are made. I suppose that means leaving a comment here, seeing nobody oppose it (because it's a trivial change to make the infobox look better) and reinstating it. I removed the "bordered" CSS class from the template, so as to better fit with almost all other automotive infobox templates on the encyclopedia. There is no particular reason for having borders here other than that this template has maintained its design since before infobox templates had a standard look and feel (and of course the possibility that people who use the undo button as a veto have discouraged editors from working on it). As such, they should be removed again unless there's some genuinely pressing reason to keep them. Chris Cunningham (not at work) - talk 13:26, 4 March 2010 (UTC)
- This isn't an "Automotive" info box, and some people like the fact that borders separate the infobox text from the article text. Id like to see more opinions. Your comments ("tiresome situation", "people who use the undo button as a veto", etc,) appear to violate the good faith of my edits, please apply WP:AGF more thoroughly in the future. WuhWuzDat 15:54, 4 March 2010 (UTC)
- This is the second time that I've been reverted over a minor styling change without any attempt to discuss the matter; that is indeed tiresome. While "some people" may indeed like the borders, these people are in a minority; WP has been gradually trending towards the borderless style for several years. An examination of Wikipedia:WikiProject Trains/Article templates indicates that this is the only infobox under the Trains project's purview which uses the bordered style. Chris Cunningham (not at work) - talk 09:46, 5 March 2010 (UTC)
Deprecated parameters
There are five parameters which place the transcluding article into Category:Unusual parameters of Infobox locomotive template. Four of these are shown as deprecated near the bottom of the documentation; however |framesize=
is not so listed, but instead is shown in the blank templates and the examples. If |framesize=
is deprecated, the documentation should be fixed; if not, the category should be removed. --Redrose64 (talk) 20:58, 17 March 2010 (UTC)
Notes section
Can there be a 'notes' section - in some cases there is needed some disambugation between near types using *†‡ symbols and no place to put the info eg in MaK_/_Vossloh_G1206 they are in the career section.
I've made a version here Template:Infobox_locomotive/sandbox - if ok can implement and add to documentation. (I know there is 'hatnote' but that's not at the bottom? what's that for?) Sf5xeplus (talk) 10:52, 17 August 2010 (UTC)
Imagesize
The notes say the default imagesize is 300, but it appears to be thumbnail sized which is about 200 (and a bit small)
Can it be changed to 300? I don't know how.
Would this work:?
{{#if:{{{image|}}}|{{!}} colspan=2 style="text-align: center" {{!}} [[File:{{{image}}}| {{#if:{{{imagesize|}}}|{{{imagesize}}}|300}} }}px|frameless}}|alt={{{alt|}}}]]}}
Sf5xeplus (talk) 15:50, 23 August 2010 (UTC)
- Template:Infobox locomotive/test seems to work after correcting errors. Any problems with implementing it. (what happened to the original?)Sf5xeplus (talk) 16:38, 23 August 2010 (UTC)
- I don't see any reason for making the default larger. One can always override the default if there is a particular reason, but frameless seems to be a sensible default. Plastikspork ―Œ(talk) 18:52, 23 August 2010 (UTC)
- (edit conflict) The policy Wikipedia:Manual of Style (infoboxes) does indeed suggest that 300px is the preferred width. But, what do you mean by "what happened to the original"? --Redrose64 (talk) 18:55, 23 August 2010 (UTC)
- .. ah someone did it back in March (I knew I wasn't imagining it) - they also added what seems to be an unnecessary "frameless" modifier - I think it's frameless by default unless it's a thumb. Sf5xeplus (talk) 20:06, 23 August 2010 (UTC)
- I think you are confused about what the keyword frameless means. You can think of it as the "default thumbnail size without a frame", which is basically the analog of "thumb" without the frame. This allows the user to specify the default thumbnail image size in his or her preferences. Without a size parameter, the default is to show the unscaled image, which is certainly not frameless by default. It is frameless by default now, but that is because it is specified as such. Plastikspork ―Œ(talk) 20:16, 23 August 2010 (UTC)
- Any particular reason for changing it while we are in the middle of a discussion? Plastikspork ―Œ(talk) 20:22, 23 August 2010 (UTC)
- I think you are confused about what the keyword frameless means. You can think of it as the "default thumbnail size without a frame", which is basically the analog of "thumb" without the frame. This allows the user to specify the default thumbnail image size in his or her preferences. Without a size parameter, the default is to show the unscaled image, which is certainly not frameless by default. It is frameless by default now, but that is because it is specified as such. Plastikspork ―Œ(talk) 20:16, 23 August 2010 (UTC)
- .. ah someone did it back in March (I knew I wasn't imagining it) - they also added what seems to be an unnecessary "frameless" modifier - I think it's frameless by default unless it's a thumb. Sf5xeplus (talk) 20:06, 23 August 2010 (UTC)
- I changed it back to the way it was. I wasn't aware of any discussion when it was changed from the default of 300px. I used the original version instead of my own since that definately worked.Sf5xeplus (talk) 20:24, 23 August 2010 (UTC)