Wikipedia talk:Manual of Style/Article message boxes

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Shortcut:

Archives
Archive 1 Archive 2 Archive 3
Archive 4 Archive 5 Archive 6
Archive 7 Archive 8 Archive 9

Contents

[edit] Raw option

I've been thinking about a better way to code the {{multiple issues}} template. The current problems are

  • Two separate copies of the message being maintained, so that if one is updated the other one may not be;
  • Performance concerns of a large #switch mean that only the most used templates are added.

The best way to tackle both of these concerns may be to introduce a |raw= parameter to Template:Ambox which, if activated, would output the raw text of the message. This could be used by other templates (i.e. Template:Multiple issues) and keeps one central copy of the message. — Martin (MSGJ · talk) 14:23, 27 June 2011 (UTC)

But would add overhead to every call to Ambox. Rich Farmbrough, 20:50, 6 July 2011 (UTC).
Can you think of a better way to achieve the same outcome? — Martin (MSGJ · talk) 11:10, 12 July 2011 (UTC)
Yes. Rich Farmbrough, 01:11, 11 December 2011 (UTC).

[edit] Adding HTML IDs to article maintenance tags

I am proposing to add a unique HTML ID to all article maintenance tags. Please see Wikipedia:Village pump (proposals)#Add HTML IDs to article maintenance tags for discussion. — This, that, and the other (talk) 04:16, 13 August 2011 (UTC)

There has been no opposition to the above proposal. Hence, I have implemented this proposal in Template:Ambox/sandbox and Template:Ambox/core/sandbox. Could an admin please synchronise the sandboxes to the main template pages? (Note that some other changes have been made to the core sandbox. This request is only for merging this change.) — This, that, and the other (talk) 02:00, 20 August 2011 (UTC)

YesY Done by Sandstein and me. You may want to update the documentation. Edokter (talk) — 22:40, 20 August 2011 (UTC)
Thanks for that. — This, that, and the other (talk) 08:11, 21 August 2011 (UTC)

[edit] Is this page still needed?

The page as it stands appears to be an overview of the design rather than the usage of amboxes; since this is now complete, does this page still need MOS status? Can it be marked historical? Or would a rewrite serve it better? Grandiose (me, talk, contribs) 14:05, 1 October 2011 (UTC)

[edit] Template loop

Why did I get a template loop on Template:Contradict-other-multiple (see documentation)? I got one on Template:Contradict-other as well, and the only way to fix it was to stop using the automatic documentation (see this diff). Debresser (talk) 23:29, 26 November 2011 (UTC)

More generally: whenever I use the "name" parameter, then if there is a call to the template on its documentation page, it causes a template loop. Why is that, and can this be helped? Debresser (talk) 21:06, 10 December 2011 (UTC)

I understand that "Ambox" stands for "Article message box", and that documentation pages are in template namespace. But that seems like a small matter, and shouldn't be hard to fix. Debresser (talk) 22:33, 10 December 2011 (UTC)
Namespaces aren't the problem, as afar as I can see. Rich Farmbrough, 23:52, 10 December 2011 (UTC).
Yes this is curious. I wondered why I didn't get template loops with documentation before, I suspect some cleverness with parseing "noinclude". Probably this fails with the auto-doc. And to be frank, I don't like the auto-doc, clever though it is. The reason is that, on opening an auto-doc'd template my first instinct (which I have followed once or twice) is to add the standard documentation cliché. Then I get puzzled about the double-docs. It also makes hard work for, for example, interwiki bots. The same reasons, in fine, as for not putting {{Reflist}} in a template. Rich Farmbrough, 23:46, 10 December 2011 (UTC).
(Template loops are to stop a template calling itself infinitely, or indirectly a->b->a->b... Unfortunately they also stop well managed recursion, or at least make it harder - see my reverse family of templates.) Rich Farmbrough, 23:52, 10 December 2011 (UTC).
The template loops and the bot argument make a strong case against having this automated documentation feature. Wonder what MSGJ will have to say to defend this functionality. Debresser (talk) 00:21, 11 December 2011 (UTC)
I tested the Ambox code on Template:X5 calling it in Template:X6 in the simplest rudimentary form possible: {{#ifeq:{{FULLPAGENAME}}|Template:{{PAGENAME:{{{name}}}}} |{{Documentation}}}}. And there still is template loop inherent somewhere in the code. Using the name parameter and including a documentation page leads to a template loop. Now let's try and solve it. Debresser (talk) 18:09, 11 December 2011 (UTC)
Yep. Forget about X5 and X6, look at Template:X4. These parser functions return the main template name without the "/doc" extension when the documentation page is visible on the template page, so they call {{Documentation}} again, causing a template loop. Solution: the {{Documentation}} template must somehow be transcluded together with noinclude tags. How to do that, I don't know. Debresser (talk) 18:50, 11 December 2011 (UTC)
Alternative, undo the automatic {{Documentation}} functionality. Because it does not allow for examples on the documentation pages. But then we shall have to check for all usages of it, and add {{Documentation}} back in. Debresser (talk) 17:33, 31 December 2011 (UTC)

Shall we remove the auto-documentation feature? I thought it was good because it made the code shorter and simpler, but I see there are disadvantages. (However there are several templates which will need the documentation adding again if we remove it here.) — Martin (MSGJ · talk) 09:54, 3 January 2012 (UTC)

There is no fix for the template loop issue? If there isn't, then perhaps indeed remove the auto-documentation functionality. Debresser (talk) 13:22, 3 January 2012 (UTC)
Perhaps something with "&lt;" instead of "<"? Debresser (talk) 12:07, 8 January 2012 (UTC)
I tried some things, but to no avail. Debresser (talk) 03:30, 15 January 2012 (UTC)
Yes I think so. Nifty coding, but to no avail in this case. Rich Farmbrough, 06:36, 19 January 2012 (UTC).

[edit] Substitution checking

Please see the two sections I posted about this subject on Template_talk:Fix#Substitution_check and Template_talk:Fix#Method_of_substitution_check (one right after the other). I compare Ambox with Fix, asking a few questions and making a few suggestions. Debresser (talk) 00:53, 27 November 2011 (UTC)

[edit] Classes

Can we make these boxes take class parameters, as does {{Navbox}}? As a minimum, |bodyclass=? We could then, for instance, apply class="hlist", per WP:HIST Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 17:06, 28 November 2011 (UTC)

{{mbox}}, {{ambox}}, and {{tmbox}} already have the class= parameter. How likely is it for the others to contain lists? Edokter (talk) — 11:49, 29 November 2011 (UTC)
Thank you. It's not documented in two out of three of those cases; I assumed all used the same core. is that not the case? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 00:06, 30 November 2011 (UTC)
No. Ambox, ombox and tmbox each have a core subtemplate, the others are straight tables, and mbox is an auto-switching template. There was at one point the intention to use one core template, but that idea was abandoned because it would have put too much stress on it due to transclusion count, which would have made updating it unworkable. Edokter (talk) — 00:38, 30 November 2011 (UTC)
Andy, where do we use hlists? Rich Farmbrough, 23:48, 10 December 2011 (UTC).
[Late reply, sorry] Chiefly in navboxes, but anywhere a list is rendered horizontally, usually replacing lists separated with {{!w}}, {{·}}, or suchlike. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 20:25, 18 December 2011 (UTC)
Er.. I meant where in Amboxes? Rich Farmbrough, 20:31, 18 December 2011 (UTC).
I can't cite an example off the top of my head, but I've seen a few, which is what brought me here. I'll let you know when I next find one (if I remember!). Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 20:47, 18 December 2011 (UTC)
The only one I've seen so far is {{WikiProject status}} & that's an ombox. -- WOSlinker (talk) 22:58, 18 December 2011 (UTC)

[edit] Request

Please add the possibility for a second and third dated and undated category, that is: category2, category3, all2, all3. Debresser (talk) 21:04, 10 December 2011 (UTC)

See Template:Ambox/sandbox, and Template:Ambox/category/sandbox. I have tested these versions successfully , see Template:Template sandbox and Point Valid (my usual testing sacrifice). Just don't forget to remove to remove "/sandbox" from Template:Ambox/sandbox when copying. Note that the documentation should be updated, minimally, by adding these parameters at least to the full list of parameters. Debresser (talk) 22:40, 10 December 2011 (UTC)

Please copy the tested and ready versions from these two sandboxes to the templates, to add the possibility of a second and third dated and all-inclusive category. Debresser (talk) 01:50, 21 December 2011 (UTC)

Done and done. Killiondude (talk) 08:42, 30 December 2011 (UTC)
Thanks. Great. Debresser (talk) 16:03, 31 December 2011 (UTC)

[edit] Borders, proeminence

I agree that making the borders color match the special left border used for example in {{Cleanup-rewrite}} would be good. I'm under the impression that boxes are not proeminent enough to attract my attention. The 10% margins on each side may have something to do with it too. --Chealer (talk) 19:30, 2 March 2012 (UTC)

Personal tools
Namespaces

Variants
Actions
Navigation
Interaction
Toolbox
Print/export