Template talk:Message box

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

We need different colors[edit]

Say, info is yellowish white, cream or gray (#f9f9f9); warning is light red, pinkish or other; notice is green? They could be {{Message_box_(info,warn,notice)}}. Spiff 18:31, 16 Aug 2004 (UTC)

I just added a {{{backgroundcolor}}}. --Cantus 19:24, Aug 16, 2004 (UTC)
See User talk:Cantus for the message I didn't get to posting here (and, again, sorry for the confusion). Fwiw, I think I prefer having more than one, differently-colored Template:Message boxOwenBlacker 20:04, Aug 16, 2004 (UTC)

Overlapping box/table[edit]

Check out Harry Potter (character). The spoilers box covers the table, atleast in my version of IE. Aris Katsaris 00:35, 17 Aug 2004 (UTC)

Proposal[edit]

By Cantus 02:46, Aug 18, 2004 (UTC)

I'm looking at standarizing all message boxes across Wikipedia.

My idea is to handle the formatting for all these messages using one Template. This Template would carry the format, some of the style, but would leave the background color (and the message content, obviously) as customizable.

The code for the formatting Template would look something like this:

{| align="center" id="{{{id}}}" style="width: 95%; background: {{{backgroundcolor}}}; border: 1px solid #aaa; padding: 5px; color: #222; font-size: 95%;"
|-
| '' '''{{{heading}}}''' {{{message}}}''
|}

This template would be the master template that would take care of the basic format of the messages.

Next is generating the code to be used at the message Templates.

For example, for the Protected message Template, the code would look like this:

{{Message_box|
id =protected|
backgroundcolor =#f9f9f9|
heading =This page is [[Wikipedia:This page is protected|protected]] until disputes have been resolved on the [[{{NAMESPACE}} talk:{{PAGENAME}}|discussion page]].|
message =Protection is not an endorsement of this particular version. To review other versions, use the page history.
}}

And the result would look something like this:

Then, you would just reuse this code on the rest of the messages, changing the parameters (backgroundcolor, heading, message) accordingly.

This gives all the messages a standard and more professional look and format which can then be easily changed by editing only one Template.

If somebody wants to change the text of the message or the background color, they edit the message Template.

If somebody disagrees with the format of the messages, they edit the format template, which would be located at Template:Message box.

Do you support this change?

Support[edit]

  1. Cantus 02:46, Aug 18, 2004 (UTC)
  2. siroχo 02:30, Aug 21, 2004 (UTC)
  3. • Benc • 08:45, 26 Aug 2004 (UTC)
  4. El Chico! Talk 13:11, 23 Sep 2004 (UTC)
  5. [[User:Smyth|– Smyth]] 19:19, 22 Oct 2004 (UTC)

Oppose[edit]

  1. blankfaze | (беседа!) 02:49, 18 Aug 2004 (UTC)
  2. Eequor

Neutral[edit]

  1. squash 09:04, Aug 19, 2004 (UTC) Maybe keep every message box grey as suggested except for the speedy delete message box which should have a red background... just an idea

Comments[edit]

I generally like this idea, it will allow for consistency in Wikipedia templates that can give a professional design look. Some things to think about when editing this box:

  • It should not conflict with the general wikipedia design. (e.g. use 1px solid border)
  • It must be readable (contrast, coloring)
  • Subtle, yet distinctly separating text of message from article
  • It should not be an eyesore, but if it follows above points, that should not be a problem.

siroχo 17:55, Aug 16, 2004 (UTC)

I agree with what siroxo said. I also think that if we're going for consistency, the colors should be consistent as well. There is no need to have different colored boxes on every page. It is starting to look ridiculous. I suggest that if any color is needed at all, we just go with a pale gray so as not to overwhelm the actual content of the page. Angela. 07:55, Aug 18, 2004 (UTC)

Echo that, why do we need different colours? ··gracefool | 11:53, 21 Aug 2004 (UTC)
Not all message boxes perform the same function; why should they all be the same color? I'm still not convinced at the need for this metatemplate; I'd need to give it a little more thought before I can explain why, though. — OwenBlacker 12:28, Aug 21, 2004 (UTC)
There should be a limited number of different colours, otherwise these boxes could quickly become a real eyesore as different people have different ideas about what looks good etc. ··gracefool | 02:46, 26 Aug 2004 (UTC)

What would you do about templates with links to edit or history? {{localurl}} doesn't work inside a template parameter. (I notice the example above just has the link removed.) Goplat 16:29, 18 Aug 2004 (UTC)

Strong support, this is why templates exist in the first place! Centralization and conformity for sanity's sake. One comment, though: different people have differing opinions on what should be a "message box" and what should be a simple italized message (e.g.: Template:Spoiler, Template:NPOV). If we use the centralized "message box" template, some might see it as an official seal of approval. This might be a good thing, preventing silly edit wars... or it might fan the flames higher. Just something to watch out for. • Benc • 08:56, 26 Aug 2004 (UTC)

New format[edit]

I have changed the format somewhat. From DIV to TABLE, and added a new {{{image}}} tag. The drop-shadow is optional and should be removed if people dislike it. See Template:Current. —Cantus 23:56, Dec 28, 2004 (UTC)

Meta-templates[edit]

I have written Wikipedia:Meta-templates considered harmful, with input from User:Jamesday, the main database developer on the project. Meta-templates are basically templates used to commonize the format of yet other templates. One example is Template:Message box. There are a number of problems with using these, which look to outweigh the benefits. -- Netoholic @ 19:33, 2005 Feb 4 (UTC)

Alternative to metatemplates[edit]

As an alternative, I think usable CSS classes should be added to all the skins. This would allow a consistent style without the server load. For example:

<div class="messagebox" style="color: black; background-color: monkeypuke;">

Then the CSS would be something like (off the top of my head):

div.messagebox {
  border: 1px solid #aaa;
  padding: .2em; 
  margin-bottom: 3px; 
  font-size: 95%; 
  width: auto;
}
div.messagebox img {
  width: 40px;
  padding-left: 4px;
  padding-right: 4px;
  float: left;
  border: none;
}

This should be done for any metatemplate as general as this one.

– flamuraiTM 01:50, Feb 7, 2005 (UTC)

A .messagebox class wouldn't be very helpful since there's a lot of variation in message boxes. The top/bottom margins are sometimes 0 and sometimes 0.5em; the left/right margins are sometimes 2%, sometimes 2.5%, and sometimes 1em; the left/right padding is sometimes 10px, sometimes 1em; sometimes text is justified, sometimes not. The only thing all message boxes have in common is a 1px solid border, and those come in all different colors. Goplat 15:51, 7 Feb 2005 (UTC)
I thought the point of this template was to standardize all that (except the background color). That's where I pulled those numbers from. – flamuraiTM 16:25, Feb 7, 2005 (UTC)

protect?[edit]

Seems dumb that some of the templates that use this metatemplate are protected, but this one is not. I guess it hasn't been hit with vandalism yet, but someone may catch on. – flamuraiTM 18:44, Feb 6, 2005 (UTC)

This page is now protected from edits by non-sysops, considering how important it is to all those other templates. - Mark 14:56, 8 Mar 2005 (UTC)

Unprotect[edit]

Please unprotect. I would like to make some improvements to this template which I began. —Cantus 09:29, Apr 2, 2005 (UTC)

Broken![edit]

Someone please fix this template as it is broken. Look at any page that does not use an image to see what I mean. (this discussion page or my user page, for example) The image part needs to handle non-existent images. Vik Reykja 06:44, 15 Apr 2005 (UTC)

Just add a placeholder image like Image:Wiki.png. Don't panic. —Cantus 18:31, Apr 15, 2005 (UTC)
You could also just use {{divbox}} instead. — Sebastian (T) 16:21, 2005 Apr 26 (UTC)

recent changes[edit]

I wanted to incorporate the same CSS class and id methods that most other templates use. This added complexity with centering in some browsers. The "extra" div is necessary because this template uses a table, rather than just a div box. I'd like to find an all-div solution, but that's not so easy. Until then, I've used this page to help. -- Netoholic @ 8 July 2005 21:57 (UTC)

Adding a second image[edit]

I figure I should get a consensus before implementing this, since reverts in a meta-template could get hairy for its transclusions. Would anyone object to the addition of another parameter, image2, which would add a second image on the right side of the box? Specifically, I'm looking at adding a scales of justice icon to TotallyDisputed-section, a template that deals with both factual accuracy and neutrality (two subjects seems to merit two images).

Proposed code change:

<center><div style="text-align: center; margin: 0 10% 1em 10%;">
{| class="notice noprint" id="{{{id}}}" style="background: {{{backgroundcolor}}}; border: 1px solid #aaa; padding: 0.1em; margin: 0.5em auto;"
|-
| valign="top" style="padding: 0.1em" | [[Image:{{{image}}}|45px| ]]
| style="padding: 0.1em" | '''{{{heading}}}'''<br><div style="font-size: 90%;">{{{message}}}</div>
| valign="top" style="padding: 0.1em" | [[Image:{{{image2}}}|45px| ]]
|}
</div></center>

Usage idea for TotallyDisputed-section:

The neutrality and factual accuracy of this section are disputed.
Please see the relevant discussion on the talk page.

I could imagine other templates may use this as well.

Booya Bazooka 00:20, 14 August 2006 (UTC)[reply]