Template talk:Infobox/Archive 4

Archive 1Archive 2Archive 3Archive 4Archive 5Archive 6Archive 10

Support for multiple images?

Any thoughts on adding support for a second (or more) image? I've prepared some code at {{Infobox/sandbox}}, and an example can be seen at {{Infobox/testcases}}. This would be beneficial for infoboxes that allow for more than one image, a photo and a logo for example, or a photo and a map. Specifically this would facilitate the conversion of {{Infobox Korean name}}, but I can think of a few others off the top of my head—{{Chinese}} and {{Infobox School}}—where this would be potentially useful. PC78 (talk) 18:23, 17 May 2009 (UTC)

This was one of the requests above. I agree that an additional field should be provided for this. Maybe we should continue up there? — Martin (MSGJ · talk) 14:32, 20 May 2009 (UTC)
Clearly I'm editing with my eyes closed these days. The extra code in {{Infobox2}} looks similar to what I had in the sandbox, i.e. a duplication of the existing image field. I think it would be preferable to have the additional fields as opposed to the workarounds suggested above. PC78 (talk) 22:44, 20 May 2009 (UTC)
Sorry, I cleared your work in the sandbox because I was trying something else and hadn't noticed you were working there too! — Martin (MSGJ · talk) 07:31, 21 May 2009 (UTC)
Got a version on the sandbox which supports two images, also a second subheader that Droll needed (see above). I've also tidied the code significantly by using a subtemplate for each row of the table. Got a few other ideas as well, on how we can improve this template. But one step at a time ... any comments/concerns about the sandbox version? — Martin (MSGJ · talk) 13:13, 1 June 2009 (UTC)
Looks good to me. :) PC78 (talk) 17:56, 1 June 2009 (UTC)
I did some more testing and it looks OK. Added the belowstyle as discussed above. ---— Gadget850 (Ed) talk 23:54, 16 June 2009 (UTC)
I think you forgot to add the belowstyle because you haven't edited the template! — Martin (MSGJ · talk) 07:36, 17 June 2009 (UTC)
In the sandbox. And I meant belowclass.[1] ---— Gadget850 (Ed) talk 10:48, 17 June 2009 (UTC)

{{edit protected}}

I have added a couple of extra "small" images just above the first image. See the sandbox, just sync the two versions. Locos epraix ~ Beastepraix 00:26, 22 June 2009 (UTC) It also include the "belowclass" discussed above.
I also though in adding a image just in the bottom of the infobox, but nobody has asked for it, perhaps it could be included too. Locos epraix ~ Beastepraix 00:28, 22 June 2009 (UTC)
Please discuss this before making an editprotected request. I don't see any testcases to show your updates. You increased the font size on some headers— I would like to see that before passing on this. 106% font size in IE7 is not the same size in FireFox 3. See User:Edokter/fonttest and the linked screenshots.—Preceding unsigned comment added by Gadget850 (talkcontribs) 00:57, Jun 22, 2009 (UTC)
I have reverted the subheaders font size change, see the testcases to see the use of the new parameters. Locos epraix ~ Beastepraix 01:23, 22 June 2009 (UTC)

Summary of my changes:

  1. minor code tweaks.
  2. Changed font-size of subheaders to 106%.
  3. Added a couple of "small" images (like the flag and seal of {{Infobox settlement}}).
  4. Changed total width to these style settings: width:25%; min-width:22em; max-width:25em; I already noted that these style settings don't work for older browsers, but I don't know if the MediaWiki software already fixes this with some JavaScript, if it doesn't then revert to width:22em. At least it works in Firefox 3.011, Firefox 3.5 RC2, and IE8 (also in compatibility mode). Any suggestions? Locos epraix ~ Beastepraix 04:58, 22 June 2009 (UTC)
A few comments:
  1. Can't really see any big differences in the code, so no problem there. Whitespace is generally a good idea if it makes the code more readable.
  2. Support increasing the text size of the subheaders. Why would 100% not be good? (It seems that most of the text is 88% so 100% should be larger.)
  3. I would question whether there is a need for these additional images. (We already support two, and this seems rather obscure and perhaps not worth adding ...)
  4. No comment, although I note that the manual of style recommends 25 ems.
— Martin (MSGJ · talk) 13:27, 22 June 2009 (UTC)
Ok:
  1. Just it was minor code tweak
  2. 100% for font-size is still too small, note that subheaders are just below a caption that has a 125% fontsized text.
  3. I'm also questioning it to myself, but I think they will prove be useful.
  4. The MOS recommends 25em, but I can't find any discussion, how was it decided? That's odd, most infoboxes have a width 22em to 24em. Just waiting for somebody with IE6, IE7 and other browsers to test how it looks (related to the width). Locos epraix ~ Beastepraix 07:17, 23 June 2009 (UTC)
  1. placeholder
  2. Okay 108 then, pending testing on other browsers, and Gadget's approval.
  3. I think there should be a proved need for features before adding. The second image was only added after several people came here requesting it. I don't think we should be adding features because they might be useful.
  4. No idea. Which do you think looks better? Maybe start a discussion at Wikipedia talk:Manual of Style (infoboxes)?
— Martin (MSGJ · talk) 10:17, 23 June 2009 (UTC)
Please, discuss the suggested infobox width. Any other comment about the other changes? Locos epraix ~ Beastepraix 23:27, 23 June 2009 (UTC)

Long time with no comments, so I have made a couple of extra edits:

line-height isn't in common.css. I think it should be defined there Locos epraix ~ Beastepraix 20:00, 11 August 2009 (UTC)
Comment

Please make the font size bigger; its difficult to read and looks silly when compared to the article text. Dan56 (talk) 22:10, 18 July 2009 (UTC)

Perhaps font-size:90% instead of 88%? Locos epraix ~ Beastepraix 19:48, 11 August 2009 (UTC)

Template:Infobox building - auto categorization

See my offer in the discussion there: Oashi (talk) 00:47, 18 June 2009 (UTC)

automatic adding to Categories: if Baroque & Germany > add to the Cateory:Baroque architecture in Germany

Template:Infobox/row

{{#ifeq:{{{name|}}}|{{#titleparts:{{PAGENAME}}|1}}|example}}, I'm wondering what does this line of code do in the subtemplate {{Infobox/row}}? Locos epraix ~ Beastepraix 03:03, 19 June 2009 (UTC)

The answer is ... nothing - yet! It is for a new feature I have been planning but have not implemented yet. It is designed to show all the fields on the template itself (currently, the template is usually blank and you have to look in the documentation to see what it does). Of course, the name parameter would need to be passed to the subtemplate for it to work and it is not yet. — Martin (MSGJ · talk) 13:14, 22 June 2009 (UTC)
Is it really necessary, all the template parameters are well-known. Locos epraix ~ Beastepraix 17:39, 13 July 2009 (UTC)
Sorry, I meant the infobox templates which call this metatemplate, not actually this template! — Martin (MSGJ · talk) 17:46, 13 July 2009 (UTC)
O_o, but which would it be its purpose?, the templates calling this one can use {{{foo<includeonly>|</includeonly>}}} to show an specific parameter in the template itself. Locos epraix ~ Beastepraix 17:56, 13 July 2009 (UTC)
Yes, it is possible, but it does make the code rather messy and I was trying to make this template more user-friendly. — Martin (MSGJ · talk) 07:52, 28 July 2009 (UTC)
If it isn't working right now, shouldn't it be deleted? Locos epraix ~ Beastepraix 19:52, 11 August 2009 (UTC)

Top for the box

{{editprotected}} Somebody asked this before a while back but nobody got round to getiing it done. Can we have a top put on the box please to make it look tidy? Something like this should do it, thanks.

  • {| class="infobox bordered" width=300 style="float: right; font-size: 90%; margin: 0 0 3em 1em; border: 1px solid #aaa; border-collapse: collapse;" |-

- Yorkshirian (talk) 07:46, 28 July 2009 (UTC)

Would you mind putting your proposed code in the /sandbox and posting some /testcases so people can comment? — Martin (MSGJ · talk) 07:51, 28 July 2009 (UTC)
Gah, I gave it a go but for some reason it isn't working. Could somebody more experienced with code give it a look? I basically want to put a border ontop/around the title, rather than it floating in the middle of knowhere. - Yorkshirian (talk) 08:14, 28 July 2009 (UTC)
Ah, I think I've cracked it now. There it is. - Yorkshirian (talk) 08:17, 28 July 2009 (UTC)
The comment requested a top margin, not a "top". The current look is deliberate. Chris Cunningham (not at work) - talk 10:40, 28 July 2009 (UTC)
Yes, I know. It currently looks messy, a "margin" without the title floating around looks more professional and tidy IMO. - Yorkshirian (talk) 12:24, 28 July 2009 (UTC)
As stated in the template documentation itself, the use of a floating title is optional. Whether it looks "messy" or not is a matter of opinion, and opinions are pretty divided AFAIK. Chris Cunningham (not at work) - talk 13:06, 28 July 2009 (UTC)

Merge Template:Infobox2

For a long time I have wished that I could merge {{Infobox2}} with this template. The origninal reason for the fork was because of the lack of a second image field. That has now changed and I have now received a certain amount of encouragement. It would require few changes to this template. I realize that any modifications will have to be fully backward compatible and transparent. Are there folks here how are willing to work with me. –droll [chat]

Why are the work-arounds suggested in March (above) not adequate? Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 22:58, 15 August 2009 (UTC)
Lets not strart out with adversarial relationship. See Template:Infobox Protected area/testcases for for a quick look at the most significant compatibility problems. The sandbox is currently set up to use {{infobox}}
  1. I need a third subheader field.
  2. To avoid div blocks just for style elements it would be nice to have an optional subheaderstyle field for each subheader. For example:
{{{subheaderstyle1|{{{subheaderstyle|}}}}}}
This would be a start. There are also a few other issues but they also would be transparent. –droll [chat]
Can you tell me whcch part of my question you mistook as being adversarial? Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 00:07, 16 August 2009 (UTC)
I didn't say your question was adversarial. Read what I wrote. –droll [chat]
In that case, can you tell me why you thought it necessary to write what you did? Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 08:30, 16 August 2009 (UTC)
I have to agree with Andy. Your response to a simple question was unnecessarily defensive. wjematherbigissue 09:09, 16 August 2009 (UTC)

(unintent) The reason I feared that this might become adversarial was because Andy had posted Infobox2 for deletion. He didn't post a notice about that on my user page. I overreacted thinking this was not a civil way to go about it since WP:TFD recommends it. I'm sorry I reacted this way. I should have presumed good faith. As to Andy' question both of my suggestions in #Request for new fields where eventually implemented. I can't see any of creating a third sub-header workaround that is in keeping with the spirit of this template. –droll [chat]

To be totally up front there are additional changes that would help but I thought it best to address them in order of importance. –droll [chat]
You can find a sandbox with my suggested changes at User:Droll/sandbox. It is missing the noinclude code at the bottom. I can move it to the template infobox–droll [chat]

{{edit protected}} I request that the code segment:

 Subheader 1
-->{{#if:{{{subheader|{{{subheader1|}}}}}}|<tr><td colspan="2" class="{{{subheaderclass|}}}" style="text-align:center; {{{subheaderstyle|}}}">{{{subheader|{{{subheader1|}}}}}}</td></tr>}}<!--
 Subheader 2
-->{{#if:{{{subheader2|}}}|<tr><td colspan="2" class="{{{subheaderclass|}}}" style="text-align:center; {{{subheaderstyle|}}}">{{{subheader2}}}</td></tr>}}<!--

Be replaced by:

 Subheader 1
-->{{#if:{{{subheader|{{{subheader1|}}}}}}|<tr><td colspan="2" class="{{{subheaderclass|}}}" style="text-align:center; {{{subheaderstyle1|{{{subheaderstyle|}}}}}}">{{{subheader|{{{subheader1|}}}}}}</td></tr>}}<!--
 Subheader 2
-->{{#if:{{{subheader2|}}}|<tr><td colspan="2" class="{{{subheaderclass|}}}" style="text-align:center; {{{subheaderstyle2|{{{subheaderstyle|}}}}}}">{{{subheader2}}}</td></tr>}}<!--
<!--
 Subheader 3
-->{{#if:{{{subheader3|}}}|<tr><td colspan="2" class="{{{subheaderclass|}}}" style="text-align:center; {{{subheaderstyle3|{{{subheaderstyle|}}}}}}">{{{subheader3}}}</td></tr>}}<!--

droll [chat]

Deactivated this request for now, as it will need further scrutiny. It is probably not a good idea to have two separate templates doing the same job and merging them is the best way forward. I would lend my support to any extra features which would be significantly used; however at the same time, a metatemplate cannot support every possible variation and adding features which are used by relatively few infobox templates is not generally a good idea. For some complicated and individual templates, conversion to {{infobox}} may just not be possible. — Martin (MSGJ · talk) 20:17, 16 August 2009 (UTC)
I'm will be more than happy with that so long as infobox2 is not deleted. Thanks for the input. –droll [chat]

I'm not convinced that there is any great compatability issue here, but do you really need all of these subheaders in {{Infobox Protected area}} anyway? I added a tracking category to the template earlier today, and so far as I can tell (given that it's still empty) the |designation=, |alt_name= and |native_name= parameters are not being used anywhere. PC78 (talk) 02:56, 19 August 2009 (UTC)

Having looked at it a bit more, the most I see you needing here is the third subheader. You're already using a lot of div blocks for these subheaders, so I don't see how a few more could hurt, especially if it gets the job done. PC78 (talk) 03:19, 19 August 2009 (UTC)
This entire discussion is now moot since a substitution was done. –droll [chat] 06:30, 19 August 2009 (UTC)
Well that's not true. It still seems perfectly feasibile for {{Infobox Protected area}} to use {{Infobox}}. PC78 (talk) 09:20, 19 August 2009 (UTC)

Hide the bottom line

How do I hide the "This box: view • talk" line at the bottom? —MJBurrage(TC) 05:39, 17 August 2009 (UTC)

Don't pass the name parameter to this template. — Martin (MSGJ · talk) 06:56, 17 August 2009 (UTC)

Row-class

How easy would it be to add a "rowclass" property, such that rowclassN applies an HTML class to an entire row, in the same way that classN applies the class to a singe cell? This would aid the addition of nested microformat properties to infoboxes, for example:

<code>
|rowclass8  = adr
|title8     = Town
|data8      = {{{town|}}}
|class8     = locality
</code>

would render as:

<tr class="adr"><td>Town</td><td class="locality">{{{town}}}</td></tr>

Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 17:43, 14 August 2009 (UTC)

Trivial. The per-row code now lives in {{infobox/row}} - I'm sure you can see from there what would need to be added. Chris Cunningham (not at work) - talk 11:21, 15 August 2009 (UTC)
Thank you - that's much easier than I expected. Please will you/someone check Template:Infobox/row/sandbox? Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 12:04, 15 August 2009 (UTC)
Looks fine to me. Might try pinging our helpful maintainers to get it synced. Chris Cunningham (not at work) - talk 21:45, 28 August 2009 (UTC)
  Done Enjoy. - Jarry1250 [ In the UK? Sign the petition! ] 19:19, 5 September 2009 (UTC)
\Thank you, too. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 20:21, 5 September 2009 (UTC)

Also

{{editprotected}}

Also update {{Infobox}} from its sandbox (wrong link) sandbox. Locos epraix ~ Beastepraix 19:36, 5 September 2009 (UTC)

Is that the right link? Methinks probably not. - Jarry1250 [ In the UK? Sign the petition! ] 19:40, 5 September 2009 (UTC)
Locos, could you give some background/explanation to the changes you are proposing here? Thanks — Martin (MSGJ · talk) 19:57, 5 September 2009 (UTC)
The new parameter in {{Infobox/row}} won't work unless you use those parameters in {{Infobox}}, so in the sandbox I have added those "classes". There are also another other minor change: Use of <th> tag instead of <td> in "above" parameter and some whitespace removal. No output changes. Locos epraix ~ Beastepraix 00:21, 6 September 2009 (UTC)
Ups, I forgot to say that this sandbox version also includes "belowclass". Locos epraix ~ Beastepraix 02:24, 6 September 2009 (UTC)
  Not done:. I can see at least two things wrong with this at first glance. One, /row uses rowclass but you're using classrow. Two, you're passing classrow1 on every line when presumably, each row should have its unique number! I'll fix it up now... — Martin (MSGJ · talk) 07:41, 6 September 2009 (UTC)
Ups, damn confusing ("classrow" → "rowclass"). Any way, each row had its own number but all of them were changed to 1. --Locos epraix ~ Beastepraix 13:50, 6 September 2009 (UTC)
I have no idea how all those became 1, and I apologise for accusing you of that :) All implemented now. Please let me know of any problems. — Martin (MSGJ · talk) 16:24, 6 September 2009 (UTC)

Below: Left, centre, right align question

Hi, couple you help me with a couple of things please?

I've replaced several templates used in international rugby league articles with one that uses Template:Infobox: Template:Infobox rugby league international tournament but one thing I have been unable to replicate is having, all on one line, the links to the previous tournament (left aligned), link to main article or list of seasons (centre aligned) and next tournament (right aligned).

The best I can manage is fitting it on two lines (see the code I used below):

  • First line: Tournaments (centred)
  • Second line: Last(left), Next (right)
| below  =  {{#if:{{{tournaments|}}}|{{align|center|[[{{{tournaments|}}}|Tournaments]]}} }}<!--
  -->{{#if:{{{last|}}}|{{align|left|  <  {{{last|}}} }}}}<!--
  -->{{#if:{{{next|}}}|{{align|right|{{{next|}}} > }} }}

Is there a way to have them all on one line currently? If there isn't, would you consider adding an ability to do this to the template? LunarLander // talk // 22:49, 18 September 2009 (UTC)

Layout problem with IE8

{{editprotected}} All templates using this template render the left-half "label" column centered on Internet Explorer 8. It should be left-aligned. Can someone fix this? It's affecting a lot of pages. Warren -talk- 19:30, 12 April 2009 (UTC)

No suprise, as all the table headers have "font-align:center" hardcoded. I'll see if these are safe to remove (in the andbox). EdokterTalk 21:05, 12 April 2009 (UTC)

{{editprotected}} This is a straightforward fix which merely requires forcing left text alignment for the label fields. Please update {{Infobox/row}} with {{Infobox/row/sandbox}}. PC78 (talk) 15:58, 19 September 2009 (UTC)

Done. In future, it would help if you put the edit request on the talkpage of the page you want edited. Cheers,  Skomorokh  17:31, 19 September 2009 (UTC)
The talk page of the page I wanted editing redirects here. I don't see how placing my request there would help; I think I was pretty specific about what wanted doing. Thanks anyway, though. PC78 (talk) 19:20, 19 September 2009 (UTC)

Border question

Headings can be added now but how about borders, or lines? My reasoning is that headings can be quite redundant in some cases, especially in a fairly short infobox, where each piece of data is already labelled. Being able to put a line across would neatly divide the information without taking up the room a heading would. I imaging this would be reasonably simple to implement. LunarLander // talk // 22:49, 18 September 2009 (UTC)

You just need a bit of CSS and HTML. ---— Gadget850 (Ed) talk 18:58, 19 September 2009 (UTC)
header1
label2data2
label3data3

label5data5
Great! Thank you. LunarLander // talk // 13:53, 21 September 2009 (UTC)

Numbering

It's a pain, especially on large templates, to have to renumber subsequent rows, when adding rows near the start. Is there any reason that new templates cannot have rows numbered in, say, tens, allowing subsequent row to be inserted, thus:

label10 = foo
data10  = {{{bar}}}
label15 = NEW ROW HERE
data15  = {{{new}}}
label20 = foo
data20  = {{{bar}}}
label30 = foo
data30  = {{{bar}}}
Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 12:37, 21 September 2009 (UTC)
I'm pretty sure you can. There's only 80 rows in this template, though. PC78 (talk) 15:26, 21 September 2009 (UTC)
So it might be better to go in twos or threes? Thanks. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 16:22, 21 September 2009 (UTC)
Of course. Why not. The only problem would be reaching the 80 limit too easily. Locos epraix ~ Beastepraix 16:32, 21 September 2009 (UTC)
Anyway, I always try to keep parameter number well organized, having irregular parameter numbers (label1, label4, label10, label12) would very confusing. Locos epraix ~ Beastepraix 16:35, 21 September 2009 (UTC)

Emitting categories

What's the correct way to make a template, which uses this one, emit a (hidden) category? Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 08:07, 23 September 2009 (UTC)

I think it would be preferable to have the category emitted from here. I've already left a comment at Template talk:Infobox person. PC78 (talk) 13:46, 23 September 2009 (UTC)
Not all infoboxes emit the hCard microformat referred to in that discussion. Some emit other microformats and some - rightly - none. My question here is deliberately more general, as I also want to include other categories (such as those used temporarily, for tracking) in other Infoboxes. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 14:55, 23 September 2009 (UTC)
I've replied to you on the other page; let's keep discussion in one place. PC78 (talk) 15:01, 23 September 2009 (UTC)
Sure; but I'd still like an answer to my more general query, here. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 15:20, 23 September 2009 (UTC)
Update: Discussion, which is generic, moved below. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 18:58, 23 September 2009 (UTC)
To answer your more general query, I think what you asked to be added at {{Infobox person}} is perfectly fine. PC78 (talk) 16:19, 23 September 2009 (UTC)
Thank you; but since that Infobox doesn't (yet) use this template, that doesn't answer that question. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 17:02, 23 September 2009 (UTC)
Erm, yes it does. It has done since April 2008. PC78 (talk) 17:15, 23 September 2009 (UTC)
So it does; sorry. I was thinking of another template, which I'm also currently working on. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 18:29, 23 September 2009 (UTC)
The following moved from Template talk:Infobox person
It would be preferable (and certainly easier) to have the category added by {{Infobox}} rather than on an infobox-by-infobox basis like this. I assume the "class" parameters are not used for anything else other than hCards? PC78 (talk) 13:43, 23 September 2009 (UTC)
Not all infoboxes emit hCards. Some emit other microformats and some - rightly - none. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 14:53, 23 September 2009 (UTC)
Sure, but that can be accounted for. Can you also clarify something for me: the text at Category:Articles with hCards states "articles using infoboxes or taxoboxes which generate an hCard microformat will not be listed here" -- is that not contrary to this request? PC78 (talk) 14:57, 23 September 2009 (UTC)
Accounted for how? This request resolves that issue; coincidentally, I've just updated that wording. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 15:19, 23 September 2009 (UTC)

←For example, if you included the following at {{Infobox}}:

{{#ifeq:{{{bodyclass|}}}|biography vcard|[[Category:Articles with hCards]]}}

then any pages using an {{Infobox}}-based infobox where |bodyclass=biography vcard would be added to the category. PC78 (talk) 15:38, 23 September 2009 (UTC)

Thank you. That would be a far better solution, if it were not for the fact that i) there are too many possible variations ("biography vcard", "vcard biography", "geography vcard", "vcard geography", "foo hproduct", etc) and ii) that some templates meeting that condition need adding to that category, and some do not (because they also have coordinates, so need to go in a different category. Do you think we can solve these issues? I'd certainly like to try. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 17:07, 23 September 2009 (UTC)
How many variations? Can you provide me with/point me in the direction of a list? Would any value for |bodyclass= be acceptable, or are some undesirable? Would an infobox with coordinates not also have other non-geographical hCards? PC78 (talk) 17:21, 23 September 2009 (UTC)
I could provide you with a list of relevant, top-level microformat classes, if that's what you mean (from the top of my head, we currently use vcard, vevent, geo, adr, biota, hproduct & hrecipe; with potential to use haudio, hmedia, hresume, hreview & hfeed, plus of course any new ones); but I can't tell you how many other kinds of infoboxes and permutations of the above with other classes (biography, geography etc.) there are (some have three classes, others possibly more). A simpler solution would be to detect the presence of the class name in the string - is that possible? if it is, I think I can arrange the categories a little differently, and we're good to go. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 17:39, 23 September 2009 (UTC)

←You can certainly add the category wherever |bodyclass= is given a value, regardless of what it is (if that's what you meant). That would require:

{{#if:{{{bodyclass|}}}|[[Category:Articles with hCards]]}}

PC78 (talk) 17:47, 23 September 2009 (UTC)

←No, that won't work - suppose a template simply has the bodyclass "geography", but no microformat installed; or suppose the bodyclass is just vevent. What I mean, to use pseudocode, is:

If bodyclass includes "vcard", then emit Category:Articles with hCards
If bodyclass includes "vevent", then emit Category:Articles with hCalendars
If bodyclass includes "biota", then emit Category:Articles with species microformats

and so on. But I don't know if we can do "ifincludes" in wiki code. (We'd also have to watch for false positives; "geography" includes "geo", for instance). Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 17:58, 23 September 2009 (UTC)

I don't know if that's possible. My ignorance of microformats is starting to show through again. :) Going back to [{{Infobox person}}], the microformats I see there are (and correct me if any of them aren't or if I've missed any):
  • |bodyclass=biography vcard
  • |aboveclass=fn
  • |imageclass={{image class names|{{{image}}}}} (not sure about this one)
  • |class5=label
  • |class6=label
  • |class7=category
  • |class8=nickname
  • |class9=category
  • |class10=category
  • |class13=role
Where are the hCards coming from in this template? Are they always present because of |bodyclass=biography vcard, or do they come from elsewhere? PC78 (talk) 18:14, 23 September 2009 (UTC)
Those are all parts of one microformat. biogprahy has nothing to do with microformats (neither, as you correctly surmise, does the image stuff). vcard is the parent class of the hCard microformat, and should thus generate the respective category. The other classes are child properties on the microformat, and are not relevant to this particular issue. But as I listed above, there are a dozen real or potential alternatives to vcard, each of which should cause a different category to be used; and which could occur in multiple (e.g. bodyclass=vcard vevent) Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 19:01, 23 September 2009 (UTC)
OK, I guess I'm barking up the wrong tree there. So even something as basic as {{Infobox person}} with no parameters specified will emit an hCard? Ideally what you'd want is a parser function that could pick out "vcard" (or whatever) from a text string, but I don't believe one exists, and the number of permutations for |bodyclass= will probably make a switch statement unfeasible. All of which leaves me stumped. Sorry. On a related note though, I assume from the name of Category:Articles with hCards that you only want to categorise pages in the article namespace (which is where infoboxes generally should be) and not, say, demonstration infoboxes in other namespaces? If that's the case, it may be as well to do a namespace check before adding the category. PC78 (talk) 20:58, 23 September 2009 (UTC)
No worries on the former; thanks for trying. You're right about the purpose of the category; how are such checks coded (a link to an example would suffice; or please feel free to do that on Ibox person). Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 21:07, 23 September 2009 (UTC)
{{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Articles with hCards]]}} will do the trick. PC78 (talk) 21:16, 23 September 2009 (UTC)
Great; thanks. I'm drafting a BOTREQ to add categories to all the involved infoboxes, so I'll include that. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 21:20, 23 September 2009 (UTC)

view/talk/edit

You know the `view * talk * edit' thingmajig at the bottom that shows up if you specify name? I propose:

  1. `edit' show up by default. Right now it is hidden unless you specify |noedit=
  2. It be centered. Seriously, it looks ugly right now.

I've done this in the /sandbox (w/ oldid=321320132)
~ 10nitro (talk) 03:41, 22 October 2009 (UTC)

This isn't a good idea. Most infoboxes are filled in inline on the pages they're used on - having an edit link makes users think that clicking it will let them fill in more details on that article's infobox, but instead the link goes to the template code page. Having V/T/E links as an option is okay for special cases, but in general it's just confusing. Chris Cunningham (not at work) - talk 10:20, 22 October 2009 (UTC)
↑ What he said. I thought it was triggered by the |name= parameter, though. No opinion on a change of alignment. PC78 (talk) 16:10, 22 October 2009 (UTC)

Implement above / subheader / image in terms of {{infobox/row}}

{{editprotected}}

The sandbox contains a further tweak to implement most of the header lines as instances of {{infobox/row}}. I've also added a smattering of parameters which allow those rows to have HTML classes just like data rows do. Shouldn't be any fallout, as this is pretty trivial. Chris Cunningham (not at work) - talk 13:27, 4 December 2009 (UTC)

  DoneTheDJ (talkcontribs) 15:31, 4 December 2009 (UTC)

Dynamic width

In this sandbox edit, I have changed the width to use a percentage (26%) and added two CSS values: min-width:22em and max-width:300px (or max-width:25em). I have already tested the output code and it seems pretty fine. Thoughts? Locos epraix ~ Beastepraix 03:00, 9 December 2009 (UTC)

26% is arbitrairy and does not display well on screen with high resolutions, and min-width and max-width are not supported by IE, making the results unpredictable. So I'm afraid we can't use those. EdokterTalk 13:03, 9 December 2009 (UTC)
I know 26% is arbitrary, I just took that value based in my screen (1360x1024). I mean, since the beggining I know there were few probabilities for this to be deployed, I just want some feedback. Locos epraix ~ Beastepraix 15:38, 9 December 2009 (UTC)
And for the record, this had been implemented in eswikipedia for a few months and there hadn't been issues with IE users. Locos epraix ~ Beastepraix 15:42, 9 December 2009 (UTC)
I do see issues, min-max are not working, allowing to grow/shrink the infobox beyong it's parameters. Plus I do not like the general idea of a dynamic-sized infobox. EdokterTalk 23:28, 9 December 2009 (UTC)

Broken

Something - possibly this edit; but I haven't checked - has broken the microformats in many infoboxes. It seems that "aboveclass" is no longer being applied correctly. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 22:22, 15 December 2009 (UTC)

You are correct. I have fixed it. EdokterTalk 13:32, 16 December 2009 (UTC)
Thank you. I wonder why no-one else noticed, or at least commented? Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 00:06, 18 December 2009 (UTC)
It's not a often-used parameter. EdokterTalk 18:16, 19 December 2009 (UTC)

Infobox spacecraft

Might someone take a look at {{Infobox spacecraft}} and figure out why the Refs section is not functioning? The header displays normally, but no data is actually displayed below the header. I've tried and tried to figure this out with no luck. I figure there are more knowledgeable eyes here than at the template itself. Huntster (t @ c) 00:25, 21 December 2009 (UTC)

{{editprotected}}

ugh. well, it looks like this is a problem with the sub-template template:Infobox/row. it should read (I think):
{{#if:{{{header|}}}
 |<tr><th colspan="2" class="{{{class|}}}" style="text-align:center; {{{headerstyle|}}}">{{{header}}}</th></tr>}}
{{#if:{{{data|}}}
 |<tr class="{{{rowclass|}}}">{{#if:{{{label|}}}
  |<th style="text-align:left; {{{labelstyle|}}}">{{{label}}}</th>
   <td class="{{{class|}}}" style="{{{datastyle|}}}">
  |<td colspan="2" class="{{{class|}}}" style="text-align:center; {{{datastyle|}}}">
 }}{{{data}}}</td></tr>
}}
basically the way it is currently will only print labels and data if a header is not defined. the changed version makes the headers independent of the label and data.
I'm concerned about unintended consequences here, though. I'll add the editprotected flag, but can someone more familiar with this template double-check to make sure it's not going to throw all sorts of pages into a tizzy? --Ludwigs2 01:06, 21 December 2009 (UTC)
To my eyes, the code looks good, but again, I'll let someone more familiar with this template system triple check. Thanks for the possible solution Ludwigs! I knew coming here was the right answer ;) Huntster (t @ c) 01:21, 21 December 2009 (UTC)

I'm looking at the history of Template:Infobox and its doc - it looks to me like this behavior is intentional. I think it would be a better idea to change Template:Infobox spacecraft instead of Template:Infobox/row. — RockMFR 23:41, 22 December 2009 (UTC)

I've made the change at Infobox spacecraft. Seems to have fixed the problem, as seen at AMC-6. — RockMFR 23:47, 22 December 2009 (UTC)
do you have any idea what the intention behind it was? it seems odd to have headers which overtly exclude labels/data at the same level. might be a historical issue (a necessary step when merging or revising the template, or something), but if I know why it's done like this I might be able to craft a permanent fix. Either way, the docs need to be revised because they are misleading as given. I'll do that now.--Ludwigs2 00:22, 23 December 2009 (UTC)
RockMFR, I see the change you made to Infobox spacecraft, and it makes complete sense. Odd though...I know it worked previously, as in only a month or so ago, so I suppose the sudden change in behaviour is what caught me off guard. Thanks to all for your prompt assistance! Huntster (t @ c) 06:48, 23 December 2009 (UTC)
really... let me check the template histories to see if any obvious changes were made that would affect that. --Ludwigs2 07:21, 23 December 2009 (UTC)
well, as far as I can tell the infobox spaceship template should never have worked. can you specify a date range when you're sure it did? --Ludwigs2 07:38, 23 December 2009 (UTC)

Forms of English

WP:ENGVAR gives guidance on the use of American English vs British English. Where infoboxes use labels that have different AE and BE spellings, most commonly the American spelling is used. If the body of the article uses BE, then the infobox introduces an inconsistency with the manual of style.

To me, it would appear to be sensible that where infoboxes use labels with a distinct form of English, the users should be able to specify whether AE or BE is to be used. For example, where an infobox has a label 'Organization', 'Organisation' should be an alternative option.

I'm not a programmer, but maybe this could be done the following way (note that this only applies where labels with a distinct form of English occur):

  • provide a non-displaying field where editors can specify 'American English' or 'British English'
  • if the field is empty, the infobox continues to use the type of EnglIsh with which it was set up
  • if the field is specified, then use that language variant accordingly

What do others think? Is this a sensible suggestion? Schwede66 (talk) 17:31, 3 January 2010 (UTC)

I support this idea. The case in point is {{infobox organization}}, where there is a field for "parent_organization" which displays as "Parent organization". I'm not at all fussed about what the field is called, but it should have the option to display as "Parent organisation" for use in Australian and New Zealand articles. The simplest solution would be to provide both "parent_organization" and "parent_organisation" fields with appropriate labels. It's probably unnecessary to have a complicated mechanism to prevent someone from filling out both fields.-gadfium 17:57, 3 January 2010 (UTC)
granting that I think it's an interesting idea, implementation might be difficult. The differences between American and British English are largely irregularities, and so not all that accessible to programming solutions. for any particular template, it would be easy enough to set up a B/A switch for words that are defined in the template, but if you want it to account for user-added text, that would require each user of the template to provide B/A alternates and a built-in set of switches for each and every field that might potentially have alternate spellings. it would almost be easier to program the template with one big switch that chooses between predefined B&A versions. --Ludwigs2 18:24, 3 January 2010 (UTC)
"program the template with one big switch" - that's what I had in mind, but as I say, I'm not a programmer and thus can't help beyond providing the idea. Schwede66 (talk) 22:33, 3 January 2010 (UTC)
Having another switch means that templates which only have one problematic parameter (i.e. "Organization") aren't made any simpler code-wise. It also complicates the actual use of the template, and can make it confusing (British editors would have to set BrE=yes but then use the American spelling for the attribute, rather than just using the English spelling). Regardless, there's no way to centralise this type of thing in the {{infobox}} logic: it has to be worked out on every individual sub-classed template. Chris Cunningham (not at work) - talk 12:10, 4 January 2010 (UTC)
I've come across a way of dealing with alternate spellings in the infobox ship. Schwede66 (talk) 21:56, 4 January 2010 (UTC)
That's the way I usually implement it. Chris Cunningham (not at work) - talk 11:39, 5 January 2010 (UTC)

Intermodal freight transport

I have been searching (without luck) for an intermodal template to cover topics like Inland port/Transport hubs (freight) and Ports. I would construct one myself but i do not have the knowledge needed to create one. I would expect the template to ask for things such as, operator/owner, year constructed/opened, berths, Railway lines, Railway platforms, Railway gauge, locale, picture and caption, types of trucks served (eg B-Double), Cargo (type and quantity) as well as Roads and Highways accessing the site. (There may be other stats I'm not thinking of)

samples of articles fit for such a template (but not limited to):


If anyone knows of such a template or could create one, that would be excellent. Cheers Wiki ian 08:22, 8 January 2010 (UTC)

wow. the things people write articles about.   if you can specify the various variable that would be needed for such a template, what kind of data would go into them, and give an idea of which piece of data goes with which (because I don't have a clue about this material) it should be possible to whip up a quick {{infobox}} template that does what you want. --Ludwigs2 08:51, 8 January 2010 (UTC)


Cool, as i said, I'm not too sure of what exactly should go in such a template, but i think i can give you a starting point that others may be able to build on, as follows:
  • Name/Heading: Name of Transport Hub/freight terminal
  • picture: Image Of Hub/Terminal
  • Caption: Caption for image
  • locale: city/town in which the terminal exists
  • Built: Year Constructed and/or opened
  • owner and/or operator: self explanatory
  • freight: Types of freight handled
  • Quanity: How much freight the terminal handles
  • Berths: how many places where ships dock
  • ships: Types of ships able to dock at berths
  • Railway Platforms: number of trains that load/unload in the terminal at once
  • Railway Lines: The name of the railway line servicing the terminal
  • Railway Gauge: Width of railway lines
  • Road Access: name of streets/highways that have access to the terminal
  • Trucks: type of trucks servicing the terminal


this is a start and things like types of trucks and ships accessing the terminal are not needed but are informative. as i said before I'm sure there are things i'm not thinking of here, but its a start. thankyou Wiki ian 09:10, 8 January 2010 (UTC)

also not all the variables should have to be filled in.... not all freight terminals have berths or railways etc, so if these entries aren't filled in, they should not appear in the infobox.....if that makes sense. cheers Wiki ian 09:22, 8 January 2010 (UTC)
Gates of hell
 
some damned text
Location
Locationdeep in the underworld
Details
Builtbefore time itself
Operated bySatan
k, here's a first draft: {{Intermodal freight transport}} looks like what's at right. comments?


awesome   I'll apply it to some articles and let you know how it works. Thankee Wiki ian 10:55, 8 January 2010 (UTC)

After attempting to apply it to Brighton Transport Hub i noticed that Shipping Info Still appears. This represents a problem as this transport Hub is Road to Rail only. Is it possible to make it so Shiiping info, road access and rail information only appear if you fill that info in?


Is it also possible to change operated by to just operator and freight types to Amount or Quantity of freight handled
Wiki ian 11:04, 8 January 2010 (UTC)

sure, no problem. hang on a bit. --Ludwigs2 11:21, 8 January 2010 (UTC)
I've made the changes you ask, but I'm not sure it's completely clear. You be the judge, though. also, before you apply this template too much, tell me whether the parameter names are good - it's easy to change the parameter names at this point (since the template is unused) but the more you use it, the more the parameter names get set in stone. best to have parameter names that reallt reflect what they are about as early as possible.
will do and thanks again. is it also possible to have a parameter saying land area:how ever many hectares below locale? Wiki ian 11:33, 8 January 2010 (UTC)
p.s. - the current set up is that if any of the subheadings are set (e.g. line, gauge, or platforms for the rail section) the major heading will show - else not. is that correct?
I'll add the land area thing now. --Ludwigs2 11:36, 8 January 2010 (UTC)   Done
that is correct. basically if rail gauge, platforms aren't filled in, the 'rail info sub heading should not be visable. is it possible to have local: preceeding the location name? Wiki ian 11:45, 8 January 2010 (UTC)
'local', 'location', or 'locale'? whichever you like. think about it (and other things). I don't know what time it is down under, but it is way late here in California and I need to sleep. I'll fix whatever you like tomorrow. --Ludwigs2 11:54, 8 January 2010 (UTC)


I think location would be the best option. also is it possible to get coordinates in the infobox? and i'm not sure if you realise this but rail info no longer shows on the info box (see Kewdale Freight Terminal). I still wanted the sub-headings you put in place, but i only wanted them to be visable if the relevent information is filled in. As the Kewdale Freight Terminal specifies rail gauge it would be good to have the rail info sub heading. Talk about it tomorrow anyway. Thankyou very much for all your hard work Wiki ian 12:07, 8 January 2010 (UTC)
  Done new coord parameter for coordinates, I've grouped coordinates, location, and operator in their own section, and I fixed the Rail Info header (I misspelled 'gauge' in the if statement - hate that word!) --Ludwigs2 17:54, 8 January 2010 (UTC)
Amount and quantity of freight seem redundant - what content are they really trying to get across? --Ludwigs2 18:18, 8 January 2010 (UTC)
  • now that you mention it, the freight paramters are not needed, i was trying to look up the types of freight the terminals handle last night with no success. I suggested those at the start while i was brainstorming.....maybe we could cull those 2? The infobox look great, well done and thankyou. Wiki ian 23:23, 8 January 2010 (UTC)
i think the types of freight handled can go but i can obtain stats on the amount of freight handled in TEU. is it some how possible to ask how much TEU is handled in a year? eg Freight Handled (TEU) or freight per year (TEU) all the stats i have are on a per annum basis. ideas? I believe this "amount of freight handled should go up the top with the facility info. Is it also possible to get rid of the railway lines parameter? i can't find the names of any lines leading to the Hubs, and think i was just wishfully thinking at the time.Wiki ian 23:33, 8 January 2010 (UTC)
alright, I'll strip out those two and add a parameter for annual TEU, though I think that should probably go in the information section (since containers are moving through the facility and not specific to any mode of transfer). --Ludwigs2 01:06, 9 January 2010 (UTC)
agreed, you are correct the TEU can go thru any means of transport so putting it in the general info makes sense. I've also just thought of categorys for this template....however i cant find anything quite right. Category:Rail transport templates and Category:Water transport templates are the best matches i can find, but they don't really sit well with me. any ideas on that topic? I think we must just about be there, if you would like to make improvements to this infobox and are tired of taking my word for everything please feel free to look at this info I've been studying to see if i've missed anything for this infobox.... however it is a very long pdf file and its Australia related only. Cheers Wiki ian 01:34, 9 January 2010 (UTC)
ah, I hadn't thought about categories. the two that jump out at me are Category:Transportation templates and Category:Infrastructure templates. I'll add those two for now, and we can put in more later. also, at this point you can probably edit the template and its docs yourself without worry (to change wordings and such). when you edit the template, just be careful not to add or remove curly quotes or vertical pipes - '{', '|', '}' - which are functional programming symbols. add template categories in the Docs - there's a space near the end of the docs for categories that apply to the template (you'll see where I put these two). --Ludwigs2 01:50, 9 January 2010 (UTC)