Template talk:Tmbox/Archive 3
![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 |
Educational example
How would a box like the one at the top of Wikipedia talk:Administrators' noticeboard be converted to using {{tmbox}}? I can only use the "textstyle" parameter for the whole box, so I find it hard to convert that table-like box properly (I also couldn't use {{warning}}, as I couldn't enlarge the image from there). Waltham, The Duke of 16:06, 12 September 2008 (UTC)
- Let me give it a try. MBisanz talk 16:12, 12 September 2008 (UTC)
- Ok, I think I got it. MBisanz talk 16:16, 12 September 2008 (UTC)
- Nicely done. Thanks; I'll use it as a template when I find similar cases (time I do something for myself, hehe). Waltham, The Duke of 17:24, 12 September 2008 (UTC)
Tmbox classes
I have now removed the hard-coded styles from {{tmbox}}. (From {{tmbox/core}} really.) Thus it now only uses the CSS classes in MediaWiki:Common.css.
Next planned update is to change to the simpler class names. Then "tmbox-text" becomes "mbox-text" and so on. Due to the 31 days CSS caching that can be done no earlier than 26 September. See Template talk:Mbox#Simpler to use class names for more on that.
(But "tmbox-small" can't be renamed to "mbox-small" since Internet Explorer 5 and 6 don't understand the CSS selector ".tmbox.mbox-small".)
--David Göthberg (talk) 13:58, 15 September 2008 (UTC)
User warning and block templates
- This discussion was moved here from the talk page of David (me). --David Göthberg (talk) 14:54, 25 September 2008 (UTC)
Hello. The tmbox changes you made to {{uw-block1}} look good ... with one exception. Instead of being centered, the template should be left-justified to match the rest of the warnings/messages/block notices in the harmonized uw-scheme. Thanks, Kralizec! (talk) 01:28, 25 September 2008 (UTC)
- Thanks. I just fixed some bugs. MBisanz asked me since he had trouble getting it right.
- But left-floating? I think not. How talk page message boxes should look was standardised and made into a Wikipedia guideline in spring 2005. See Wikipedia:Talk page templates. We amended that standard with some coloured borders some month ago so the warning templates should be able to follow the guideline too. (It was a long process, see {{tmbox}}, its talk page and the examples at Template:Tmbox/styles and so on.) So I think it is the other way around. That is, it is time the warning templates catch up with the talk page message box standard.
- --David Göthberg (talk) 02:05, 25 September 2008 (UTC)
- Interesting. I wonder how the centering will look with the numbered layout as specified at WP:UW and WP:UTM. --Kralizec! (talk) 02:48, 25 September 2008 (UTC)
- Also, I just noticed [1] that the admin .sig is no longer included inside the block template message box. Is this an oversight or another "feature"? --Kralizec! (talk) 03:36, 25 September 2008 (UTC)
- Hmm, that is awkward, I do like the signature in the box. With my own tmbox implementations,I've always been able to move it inside, see User:MBisanz/MESSAGES. MBisanz talk 03:41, 25 September 2008 (UTC)
- I guess I would use the phrase "looks terrible" but "awkward" works just as well. While I would really like to support the {{tmbox}}, forcing newer (working) templates like the uw-series into the change without first addressing all the issues gives me great pause. It would be a different story if someone had said back in January 2007 "hey, make sure these new uw templates follow Template:Tmbox/styles" but 627 days later? --Kralizec! (talk) 12:22, 25 September 2008 (UTC)
- He he, I bet Tmbox didn't even exist in 2007. I did fix the sig part of the Uw-block1 template. MBisanz talk 12:26, 25 September 2008 (UTC)
- End section moved here from the talk page of David. --David Göthberg (talk) 14:54, 25 September 2008 (UTC)
Kralizec!: First of all, I was asked by MBisanz to come and fix those boxes, since he had made some mistakes that broke them when he tried to apply {{tmbox}} to them. User warning and block boxes are not and never have been any of my interests.
Moving the signature outside the box was just me being bold. I have always found it confusing with the signature inside boxes. Since when someone responds below a box then it looks like it was they who placed the box above the comment. I think signatures should come after the content, not inside the content. Anyway, that was just a suggestion and you guys have already reverted that part.
And right, centring of boxes doesn't work very well with numbered or dotted lists for several reasons. First of all it is weird to have a dot or number before something that is centred. Secondly there is a bug in the MediaWiki parser that means it doesn't allow any line breaks in the content in numbered or dotted lists. That means that any message box that has a line break (not a <br>
tag, but an actual newline) anywhere in the code, be it in the div or table layout or in the text or even in data fed as a parameter to the box. Then MediaWiki breaks the box. This is not the fault of tmbox. But here is an example:
* {{tmbox}}
The reason your old uw boxes survive this is that they are coded as a single line, with no new lines what-so-ever in their code. Which unfortunately is messy programming, since it makes it hard to read their internal logic and thus causes human programming errors. Usually when people ask me to come fix a template that they can't understand why it is broken, then I do as I have always done as a programmer: First I indent the code to make it readable, then the bugs usually become visible and we can fix them.
Unfortunately there are good reasons why people don't use div layout in other boxes. The main reason is that it causes bad box flow in many browsers. For instance take a look at the {{Uw-voablock}}, it has a shortcut box placed before it. But that breaks in all the browsers I have. That is, right or left-floating boxes that comes before overlaps a div based box. If the box uses a table instead then that doesn't happen. Here is an example with a div based uw box:
{{shortcut|WP:SHORT}} {{Uw-voablock}}
![](http://upload.wikimedia.org/wikipedia/en/thumb/4/42/Stop_x_nuvola.svg/40px-Stop_x_nuvola.svg.png)
(The example above has been substituted so it will look the same even in the future.)
Note that the above example will not look too bad in some browsers since the text will flow around the shortcut box in those browsers. But in some browsers the text will go underneath and be hidden by the shortcut box. This is not a fault of the shortcut box, this happens with any right floating box placed before a div based box like your uw boxes.
But with a table based box coded the right way it is no problem:
{{shortcut|WP:SHORT}} {{tmbox}}
![]() |
Kralizec!: And regarding which year what happened: As I wrote above, the styles for the talk page message boxes was standardised already in spring 2005 and written down as the guideline Wikipedia:Talk page templates. That is long before the "January 2007" date you mention for the uw boxes. Then in the summer 2007 we standardised the looks for message boxes in articles. And as a convenience I coded up the {{ambox}} to make it easy to build such boxes. Note, the article message box styles was not my idea, they had already been settled on before I joined in and packaged it into the {{ambox}} meta-template. After that people helped out and improved the code in the ambox to a level where it flows perfectly in all known browsers! The wiki process is so nice! And now during 2008 we have standardised the looks for the other types of pages. And again for convenience we packaged that as the {{imbox}}, {{cmbox}} and {{ombox}}. (The ombox mostly uses the pre-existing very old de facto "other pages" message box style.) To complete the set we also somewhat amended the styles for talk page message boxes and made the {{tmbox}}. So yes the tmbox is new, but the style guide it is based on is from 2005. These standardisation efforts have been repeatedly announced all over Wikipedia. Even several times as a watchlist notice.
And the reason to standardise message boxes is of course for pages to look less cluttered. To have a unified design for all boxes that goes on the same page. (This is especially important when many boxes are visible close to each other.) This is something that the uw boxes currently breaks.
The reason people did choose to have different styles for different types of pages were that they want to make it clear what page is what type and make it clear what kind of page a box should be used on. (Personally I would have preferred just three types: Article, talk and other. But the majority of users wanted to separate more types.)
--David Göthberg (talk) 14:54, 25 September 2008 (UTC)
- All this is beyond me, but I'd like to say this: you have done well to substitute the example. I truly hate it when people discuss templates, images, and the like, and archives make it appear as if the something in question has been replaced by an identical something. Waltham, The Duke of 02:09, 26 September 2008 (UTC)
We really need to stop acting like message boxes are the same as the vast majority of tmbox situations. They are messages, not headers. I know there's some logic in standardizing the blocking messages, but that only makes sense in regards to other blocking messages, not other talk page header templates. -- Ned Scott 02:24, 26 September 2008 (UTC)
- I agree - I can't see the logic or the benefit to standardising block messages to use tmbox. the User: and User talk: namespaces are the least tightly regulated of all the namespaces - I have an ombox at the top of my user talk page sometimes, and don't think anything of it. In addition, warning & block templates seem poorly suited to the tmbox style; I can't see any reason not to give them their own, unified, style. Happy‑melon 08:58, 26 September 2008 (UTC)
- Well we've talked about it over at UTM I think, and right now we like the idea of Tmbox for block messages and leaving the other warnings the way they are. I'll try to dig up the discussion later. MBisanz talk 09:02, 26 September 2008 (UTC)
- The link at WP:UTM is [[2]], but support for the idea was tepid at best, and just for the block messages. --Kralizec! (talk) 14:30, 26 September 2008 (UTC)
- Ahh, thanks for finding that. I think Wikipedia_talk:Template_messages/User_talk_namespace/Archive_9#Blocking_messages, a few sections down, show a couple more people who would support tmbox for block messages only. MBisanz talk 14:35, 26 September 2008 (UTC)
- The link at WP:UTM is [[2]], but support for the idea was tepid at best, and just for the block messages. --Kralizec! (talk) 14:30, 26 September 2008 (UTC)
- Well we've talked about it over at UTM I think, and right now we like the idea of Tmbox for block messages and leaving the other warnings the way they are. I'll try to dig up the discussion later. MBisanz talk 09:02, 26 September 2008 (UTC)
Category proposal
Please see Wikipedia:Village pump (proposals)#Message box categories. Thanks. Dragons flight (talk) 06:59, 3 June 2009 (UTC)
Vector
Well, the new Vector theme is now an option in the preferences, I put it on and now all the tmboxes have white backgrounds. Is this intended behavior, or is something broken? ViperSnake151 Talk 23:25, 1 July 2009 (UTC)
- Whatever the problem was, it seems to have been temporary or have been fixed. The talk page message boxes now look okay in both my Firefox 2.0 and my Opera 9.02 when using the Vector skin.
- --David Göthberg (talk) 00:18, 30 October 2009 (UTC)
Left align
I posted on Wikipedia:Help_desk#Tmbox that I'd like to align the Tmbox to the left margin, but didn't succeed. Your help would be greatly appreciated. Debresser (talk) 15:17, 16 August 2009 (UTC)
|style = margin:0px;width:80%;
will do it. -- WOSlinker (talk) 16:56, 16 August 2009 (UTC)
- That worked. I had to use 50%, otherwise the box didn't fit to the left of my Babelbox and found itself below it. Thanks a lot! It isn't obvious though, not did I find it in the docpage. Perhaps that's something to be improved. Debresser (talk) 17:36, 16 August 2009 (UTC)
Categorization flaw
There seems to be a minor flaw in this template. If Template:Tmbox is used in another template, the category "Talk message boxes" propagates from that template to the next level (which might also be a template).
Example:
Template:2010WOIHMStandings talk is categorized as a Talk message box. This is correct.
However, Template:2010WOIHWStandingsB, which uses the previous template, is also categorized that way, which is wrong. Is it not a talk message box, it just has one, thanks to the use of the template.
Could someone fix that?
Thanks
LarRan (talk) 13:57, 6 October 2009 (UTC)
- Quite simply, tmbox-based templates should not be used in the Template: namespace. That page should not have a talkpage template transcluded on it, or (if the template is supposed to be used in several different namespaces) it should be constructed using
{{mbox}}
to ensure that it always displays the correct appearance for the namespace it is in. Happy‑melon 15:06, 6 October 2009 (UTC)- I see. Thanks LarRan (talk) 16:55, 6 October 2009 (UTC)
Collapsible tmboxen
At the {{translated page}} talk page, we're discussing some improvements to that template. Another user wondered if we could make that tmbox-based template collapse (like the WikiProject banners), and I responded that we'd probably need to edit {{tmbox/core}} to make it happen.
In support of something like this, do you think it would be a good idea to create optional parameters collapsible
& innercollapse
in {{tmbox/core}}, by replacing the first line with <table class="plainlinks tmbox {{#ifeq:{{{collapsible}}}|yes|collapsible}} {{#ifeq:{{{innercollapse}}}|yes|innercollapse}} {{#ifeq:{{{small}}}|yes|mbox-small}} {{#switch:{{{type|}}}
, and create equivalent parameters (for passing) in {{tmbox}}? (Also, would this even work?) The special settings and multi-level nesting of the WPB templates aren't necessary in this implementation.
Presumably, we could create a container similar to {{WPBS}} to hold these items, or just collapse them by default when transcluding them into a talk page.
Any thoughts on whether this is a good feature to have, and its feasibility? TheFeds 23:17, 24 October 2009 (UTC)
- See my comments at Template talk:WPBannerHeader#Alternative idea: I very much oppose the practice of collapsing talkpage notices (except WikiProject banners) unless and until we can develop a way to make the collapse state a user preference, and adopt a policy of all boxes being uncollapsed by default. The users who perennially complain about the space talk page banners occupy are not the banners' intended targets; they have nothing to gain from the messages and everything to gain by hiding them. The users who would find the messages useful gain nothing and lose everything by having the messages essentially hidden in the interests of saving a few inches of screen space. Happy‑melon 10:40, 25 October 2009 (UTC)
- That's a reasonable criticism. On the other hand, it might be useful to distinguish between the various uses of message boxes: some convey important information that many users should usually see, and some are used as a container for stuff that's relatively uninteresting to nearly everyone but which needs to be retained in an obvious place. I think the translation boxes are more the latter—as long as the heading on the collapsed box said that the article contained translations, the critical information would be conveyed.
- Maybe there's a better place to store translation source information than in a message box? (That's sort of why I enabled the small version for the test template—to see if people preferred that information being pushed to the side, rather than on top.)
- Or perhaps, to avoid the temptation to enable the collapsible property on important message boxes, we create a new box type "metadata", allow it (but not the existing types) to collapse, and apply a somewhat lighter shade of beige to it to subtly imply that it is only for this sort of article metadata, and that it is not for making normal boxes collapsible. TheFeds 19:12, 25 October 2009 (UTC)
- Not much interest in this? Any thoughts on using a small tmbox in lieu of a collapsible one? TheFeds 20:03, 29 October 2009 (UTC)
- TheFeds: I checked your discussion over at Template talk:Translated page/Archive 1#A bunch of improvements and your test examples over at User talk:TheFeds/template/sandbox3. I think using the small boxes seem very nice.
- --David Göthberg (talk) 00:05, 30 October 2009 (UTC)
No namespace restrictions?
I seem to recall there was a parserfunction trick to restrict a template so that it would only transclude into selected namespaces. I can't remember what it was, and I'm a bit surprised that it hasn't been incorporated into tmbox to restrict it to talk pages. would that be a useful addition to this template, or if not can someone remind me of the technique? there's (apparently) a problem with people placing {{3O}} templates on mainspace, which isn't really what it was designed for. --Ludwigs2 19:33, 7 January 2010 (UTC)
- Yes, you can use a parserfunction together with some magic words to do that. But I recommend using {{talk other}} instead, it is easier to use. But hiding the box when in the wrong namespace is bad, since we need to see the box for instance when we list it at Wikipedia:Template messages. Instead see to that it uses {{tmbox}} directly, not {{mbox}}, so it always has the brown talkpage colour. (I see you have already fixed that part in {{3O}}.) Then we usually make it show a message that it is used in the wrong place. Like this:
{{tmbox | text = Some text. }}{{talk other | <!--On a talk page, all okay--> | :::::This template should only be used on talk pages. }}<noinclude> {{documentation}} </noinclude>
- Which if not on a talk page renders this:
![]() | Some text. |
- This template should only be used on talk pages.
- Such a non-intrusive message is usually enough to stop people from using the template in the wrong places.
- If you need a stronger message then you can use {{check talk}}. But I find that one way to strong, we don't need to yell at the editors, and {{check talk}} looks really bad when we list or demonstrate a template on other pages.
- --David Göthberg (talk) 20:15, 7 January 2010 (UTC)
- ok, that's useful. I'm going to wait and watch a while to see if the template ends up in article space. I've changed the docs and the instructions so say otherwise, so it shouldn't, but if it does I'll add the revision you suggest above. thanks!
--Ludwigs2 20:42, 7 January 2010 (UTC)
- ok, that's useful. I'm going to wait and watch a while to see if the template ends up in article space. I've changed the docs and the instructions so say otherwise, so it shouldn't, but if it does I'll add the revision you suggest above. thanks!
add language
Please add the Persian language interwiki link [[fa:الگو:Tmbox]] to the page. --Wayiran (talk) 09:32, 17 February 2010 (UTC)
Done, but remember in the future that you can add the interwiki links yourself by editing the template's /doc page, such as Template:Tmbox/doc for this template. — Huntster (t @ c) 10:07, 17 February 2010 (UTC)
The default shade of "tan"
In case anyone else is looking for the color code for the default "tan" color, it is most likely #F8EABA. Thanks to User:Spitfire for this.--Rockfang (talk) 15:51, 24 February 2010 (UTC)
making it official
Is the procedure to make a TMBOX official the same as infoboxes? I made a tmbox and posted it to P:lgbt but got no response about it in a week. Is it okay to just post a tmbox without discussion? Or where should I post it for concensus? —Preceding unsigned comment added by Kaotac (talk • contribs) 20:30, 15 August 2010 (UTC)
Using Tmbox itself as a template
Template:Tmbox says that {{Tmbox}} is a meta-template, "used to build message box templates for talk pages, such as {{central}} etc." But, is it okay to use {{Tmbox}} itself as a talk page message box template? It seems very well suited for the creation of custom talk page message boxes:
![]() | Notice: This is an example of a custom talk page message box created using {{Tmbox}}. |
I'm guessing that the answer is "yes" and that people do it all the time, but I don't see this discussed in the template documentation. Thanks. — Mudwater (Talk) 20:10, 8 August 2010 (UTC)
- There's no technical reason not to, but Tmbox (and the other meta-templates) are really designed to create a uniform boilerplate for the wide range of system messages used on the project. making a one-off message directly from Tmbox for use in a particular situation would be fine, but if it's something that deserves this kind of prominent display (and isn't already covered by a separate template) it probably ought to be constructed as separate template anyway. I can add something to that effect to the docs, if you like. --Ludwigs2 20:27, 8 August 2010 (UTC)
- It seems to me that there is sometimes a need for one-off talk page message boxes. {{Tmbox}} is very well suited for that. I would therefore suggest updating the documentation to say that it's also okay to use it to create such message boxes. — Mudwater (Talk) 20:50, 8 August 2010 (UTC)
- Looks good. Thanks. — Mudwater (Talk) 23:26, 8 August 2010 (UTC)
I did tun into the Template:Notice, I assume that it suits better for building message boxes for talk pages. Should we change this template back to a "meta-template" and encourige users to use Notice template instead? Opinions? --Kslotte (talk) 14:34, 13 September 2010 (UTC)