Template talk:WikiProject banner shell: Difference between revisions
→Usage guide: reply to mikkalai |
Anachronist (talk | contribs) →New implementation of WikiProject banners: still broken over at Talk:Muhammad |
||
Line 547: | Line 547: | ||
::::Happy-melon: I tested your examples above in my three web browsers: In my Firefox 2 and IE 5.5 they work perfectly (apart from the known left align issue with example 3 in IE 5.5). But in my Opera 9.02 when I click [hide] on the entire bannershell in example 4 and 5, then the bannershell collapses all right, but it also becomes slightly less than 80% wide. I tested on some other talk pages but I don't see this problem when I click [hide] on the bannershells there. When I click show it expands again and also gets 80% wide again. This is just a minor problem, since it doesn't matter much that the bannershell becomes less wide when collapsed. But I guess we should investigate it when we get the time. |
::::Happy-melon: I tested your examples above in my three web browsers: In my Firefox 2 and IE 5.5 they work perfectly (apart from the known left align issue with example 3 in IE 5.5). But in my Opera 9.02 when I click [hide] on the entire bannershell in example 4 and 5, then the bannershell collapses all right, but it also becomes slightly less than 80% wide. I tested on some other talk pages but I don't see this problem when I click [hide] on the bannershells there. When I click show it expands again and also gets 80% wide again. This is just a minor problem, since it doesn't matter much that the bannershell becomes less wide when collapsed. But I guess we should investigate it when we get the time. |
||
::::--[[User:Davidgothberg|David Göthberg]] ([[User talk:Davidgothberg|talk]]) 19:27, 1 November 2008 (UTC) |
::::--[[User:Davidgothberg|David Göthberg]] ([[User talk:Davidgothberg|talk]]) 19:27, 1 November 2008 (UTC) |
||
Debugging is still needed. This template on [[Talk:Muhammad]] is appearing (on IE7) fully expanded, with no options to show or hide anything. ~[[User:Amatulic|Amatulić]] <small>([[User talk:Amatulic#top|talk]])</small> 19:52, 6 November 2008 (UTC) |
|||
== Usage guide == |
== Usage guide == |
Revision as of 19:52, 6 November 2008
Council | ||||
|
Minor formatting discussion
There's a discussion about a minor (but very noticeable) formatting change going on here, which doesn't seem to be attracting very much interest; any comments from this page would be welcome, as the two are fairly similar. I dislike the change for reasons explained there; in fact I would like to propose that we add the "click show for further details" to WPBS, when the |collapsed=yes
parameter is set (obviously telling viewers to click show when the banner is expanded is rather silly). It would make the banners more similar without disrupting the vast majority of instances (where WPBS is expanded). Thoughts? Happy‑melon 08:31, 14 April 2008 (UTC)
- I'm all for it, as long as the "click show..." isn't put on a new line. As with the other template, the new line for those 5 words is not necessary, and just makes the box waste vertical space on the page. Equazcion •✗/C • 08:42, 14 Apr 2008 (UTC)
- Okay, so if there's no disapproval for this change, how's about we do it? Chris Cunningham (not at work) - talk 08:48, 12 July 2008 (UTC)
- I would be against this change (that is, if I'm reading correctly, to slim the bar down to *just* the text "This article is within the scope of multiple WikiProjects"). One of the points of this shell is to minimize the footprint of the banners while still showing useful information. In this case, we get to see which banners are there and, typically, what class the article is rated, while still getting getting rid of all the 'useless garbage' in the full banners. I, for one, like seeing this information up front without having to waste effort clicking on linktext. — Huntster (t • @ • c) 09:39, 12 July 2008 (UTC)
- The only change I'm proposing here is the removal of the line break between "this subject is..." and "click [show]". Chris Cunningham (not at work) - talk 10:02, 12 July 2008 (UTC)
Are you sure you aren't thinking of {{WikiProjectBanners}}? This template doesn't have any "click [show]" text on a separate line...just a single "[show]" beside the collapsed title text.- I'm obviously an idiot for not paying attention to the black and white text above. You are talking about adding text that says "Click [show] for further details." or somesuch, correct? While not hard to implement, I question how "[show]" can be ambiguous in this situation. — Huntster (t • @ • c) 10:50, 12 July 2008 (UTC)
Problem with PeruProjectBanner
{{PeruProjectBanner}} causes a problem when it is nested, see Talk:Mortem (band). BNutzer (talk) 21:48, 4 July 2008 (UTC)
- If you're talking about the "(Rated {{{importance}}}-importance)", fixed. Anomie⚔ 00:22, 5 July 2008 (UTC)
- Done Yes, that was what I meant. Thank you for the fast solution. BNutzer (talk) 07:58, 5 July 2008 (UTC)
Unsupported template WikiProject New Wave music
{{WikiProject New Wave music}} needs to support nested=, see Talk:Beargarden (band) BNutzer (talk) 20:31, 11 July 2008 (UTC)
- If this isn't taken care of in the meantime, I'll work on this tonight. — Huntster (t • @ • c) 20:41, 11 July 2008 (UTC)
- Beat you to it. Anomie⚔ 23:09, 11 July 2008 (UTC)
Gaps between banners
I have noticed blank line appear between banners. For example Talk:World Food Programme. Is this a glitch in the template, or a problem with the nested banners? --Hroðulf (or Hrothulf) (Talk) 13:35, 16 July 2008 (UTC)
- Okay, everything should be fixed. The top and bottom banners had whitespace issues. Basically, if there is whitespace inside the banner box, it will not be a problem with this template, but with one of the banners. Just leave a message here if you see this again and someone will check it out. — Huntster (t • @ • c) 15:04, 16 July 2008 (UTC)
- Wow! that was quick. So quick I missed the reply in my watchlist. Thank you. --Hroðulf (or Hrothulf) (Talk) 20:31, 18 July 2008 (UTC)
Can this banner be made compatible with WPBS? Ed Fitzgerald (unfutz) (talk / cont) 20:15, 21 August 2008 (UTC)
- WP1.0 isn't a WikiProject, so I wouldn't think so... -- SatyrTN (talk / contribs) 21:11, 21 August 2008 (UTC)
- I know it's not technially a wikiproject, but the banner functions in pretty much the same way, and show the same kind of information. Tucking it into the shell seems like a good idea. Ed Fitzgerald (unfutz) (talk / cont) 22:16, 21 August 2008 (UTC)
- It certainly could, and in fact it was already done 7 August 2007. Anomie⚔ 22:35, 21 August 2008 (UTC)
- Really! I tried to include it in the banner shell in the Talk:Frankenstein article, and it caused the shell not to open when you hit the "show" link. Is there some other parameter other than "nested=yes" that I need to add? Ed Fitzgerald (unfutz) (talk / cont) 23:53, 21 August 2008 (UTC)
- My mistake, it was Talk:Communism not Talk:Frankenstein (don't ask!). I've fiddled with it, and whatever the problem was, it's gone away now -- almost certainly something I didn't do quite right, originally. My apologies. Ed Fitzgerald (unfutz) (talk / cont) 04:11, 22 August 2008 (UTC)
Broken?
This banner template seems to be broken at Talk:The Lord of the Rings. Can anyone help fix it? Carcharoth (talk) 00:52, 23 August 2008 (UTC)
- "=1" instead of "1=". Fixed. Chris Cunningham (not at work) - talk 01:12, 23 August 2008 (UTC)
- Thanks! Found the culprit. :-) Carcharoth (talk) 01:19, 23 August 2008 (UTC)
- Yeah, that was me, sorry, I have real problems remembering the correct format for that parameter -- what does it do, incidentally, is there something about its function that would help me to remember it? Also, although the parameter for the template is correct on WPBS on the LotR article, now it doesn't seem to have a show/hide link. Is there a reason for that? Ed Fitzgerald (unfutz) (talk / cont) 02:23, 23 August 2008 (UTC)
- The way templates work, if you call the template as
{{template|foo}}
, then when the template is expanded the parameter{{{1}}}
(the "first unnamed parameter") is replaced withfoo
. So what if you want that "first unnamed parameter" to be replaced withbar=foo
(or anything else containing "=")? If you call the template as{{template|bar=foo}}
, the parameter{{{bar}}}
is replaced withfoo
, and{{{1}}}
isn't replaced at all. The solution is to specifically name the parameter:{{template|1=bar=foo}}
. Since all WikiProject banners will have at least 1 "=" in their template invocation (for the "|nested=yes", if nothing else), the "1=" is effectively mandatory for {{WPBS}}. Anomie⚔ 03:40, 23 August 2008 (UTC)
- The way templates work, if you call the template as
- BTW, all the show/hide links seem to be working fine in Talk:The Lord of the Rings at this time. I don't know if someone fixed it or if your browser is having issues. Anomie⚔ 03:40, 23 August 2008 (UTC)
- Thanks for the info. The show/hide thing must be a browser problem: I looked w/ as different browser and it looks fine. Ed Fitzgerald (unfutz) (talk / cont) 05:43, 23 August 2008 (UTC)
After some considerable testing, I believe I've determined that under IE 7 adding Template:ME-project to WPBS causes the show/hide feature to go away, as does adding a value to the "class=" parameter of Template:Children'sLiteratureWikiProject. Looking with Firefox, there's no problem. Is it possible that these two templates are in someway in conflict with IE or WPBS? Ed Fitzgerald (unfutz) (talk / cont) 06:45, 23 August 2008 (UTC)
- I've gone back through your edits to Talk:The Lord of the Rings, and I don't see any missing show/hide links even in IE7 on my other computer. Anomie⚔ 14:29, 23 August 2008 (UTC)
- Thanks. It seems to be something in my Wikipedia set up. If I log out and look at the page, the show/hide button is there, same with using my wife's account. My account, however, on my computer or hers, does not show the hide/show button. I guess I'll root around a little and try to figure out what;s causing the problem. Ed Fitzgerald (unfutz) (talk / cont) 14:52, 23 August 2008 (UTC)
OK, here is the problem. If I have the switch "Open external links in a new tab/window" in "Preferences / Gadgets / User interface gadgets" turned on, the show/hide button on WPBS on Talk:The Lord of the Rings disappears (as does my UTC clock, also set by a gagdet switch) if I have included Template:ME-project in the shell, or if the "class=" parameter in Template:Children'sLiteratureWikiProject has a value in it. If I turn off that switch, disabling new windows for external links, the UTC clock and the show/hide button return. Sounds wierd, but I've confirmed it on another computer. This is using IE7 under Vista. Ed Fitzgerald (unfutz) (talk / cont) 19:45, 23 August 2008 (UTC)
- Hrm... I see both of those templates include a broken link in their output (to http://en.wikipedia.org{{localurl:Talk:The_Lord_of_the_Rings/Comments|action=edit}}), and IE7 throws a jscript error when trying to do much of anything with those link's
href
property. Sounds like a bug in IE7 with not handling screwed-up links correctly. - Also, BTW, I see someone changed that talk page from this template to the (unattractive, IMO) {{wpb}} shortly after your edits. Does it still stop your clock now? I suspect it does. Anomie⚔ 21:31, 23 August 2008 (UTC)
- I've fixed the links generated by those two banners, hopefully that fixes the issue. Anomie⚔ 22:04, 23 August 2008 (UTC)
- Yes, WPB was braking the clock, yes everything seems peachy now -- thank you! -- and yes WPB is uglier. I've restored WPBS. Ed Fitzgerald (unfutz) (talk / cont) 22:15, 23 August 2008 (UTC)
- I've fixed the links generated by those two banners, hopefully that fixes the issue. Anomie⚔ 22:04, 23 August 2008 (UTC)
Problem with Template WikiProject Idol series
{{WikiProject Idol series}} seems to add a blank line, see Talk:Michael Johns (singer). BNutzer (talk) 18:39, 1 September 2008 (UTC)
- No idea what was causing it, but putting the banners in a different order took care of it. -- SatyrTN (talk / contribs) 18:51, 1 September 2008 (UTC)
Talkheader + WikiProjectBannerShell ≈ Good?
Please see the discussion here. LA (T) @ 20:38, 18 September 2008 (UTC)
Centring
Can this template be centred like other talkpage headers? (I'd do it myself, but I wanted to make sure first that there wasn't some already discussed rationale for this.) - jc37 03:20, 19 September 2008 (UTC)
- Where are you seeing it not centered? It lines up perfectly with other standard talk page banners for me. Anomie⚔ 04:03, 19 September 2008 (UTC)
- Can you post a screenshot? Talk:Red hair looks fine for me (with Mozilla Firefox.) Also try logging out of wikipedia: if that makes a difference, is it is a clue to the root cause. --Hroðulf (or Hrothulf) (Talk) 09:50, 19 September 2008 (UTC)
- After reboot, ctrl+F5, etc., it still has this issue.
- It displays as left-aligned. But the talkheader shows as centered. Is there a difference between how the two are formatted? - jc37 10:06, 19 September 2008 (UTC)
- Same in Talk:Batman, Talk:Spider-Man, and interestingly, at Talk:Tobey Maguire, the project template also has the issue of being left-aligned, while the BLP notice is centred. - jc37 10:12, 19 September 2008 (UTC)
- Talk:Red hair shows the WPBS centered for me in Firefox 3, IE6, and Safari 3.1.2 for Windows. Which browser are you using? Also, BTW, Talk:Batman doesn't even use this template (it uses Template:WikiProjectBanners). Anomie⚔ 12:27, 19 September 2008 (UTC)
- jc37: You must be using some really old browser. What you describe is exactly what I see when using my Internet Explorer 5.5 (from 2001 or so). But I don't see it in any of my other browsers. Its the "messagebox" CSS class that use "margin: auto" which old browsers don't understand, so those boxes become left aligned in older browsers. We fixed the problem in the "tmbox" classes, used in for instance {{tmbox}}. So tmbox based boxes look good in all browsers.
- However, there is more to this! I took a look at Talk:Red hair with my IE 5.5, and what was really intriguing was that the {{talkheader}} was centred! Now that was strange since it uses the old "messagebox" class. So I investigated. You re-relearn something everyday... It has an old HTML setting '
align="center"
' that makes it centre even in the old browsers. So since that is neat and works well until we have upgraded these boxes to use the tmbox classes I took the liberty of adding the align="center" to {{WPBannerMeta}}, {{WikiProjectBannerShell}} and {{WikiProjectBanners}}. So now even jc37 will see these boxes centred in his ancient browser. :)) - jc37: Oh, and thanks for spotting this case!
- --David Göthberg (talk) 23:14, 19 September 2008 (UTC)
- Nicely done : )
- And adding
align="center"
was my initial intention, when posting here : ) - And you're welcome, glad to help "the cause" : ) - jc37 23:31, 19 September 2008 (UTC)
- I think I found another one: Template:ArticleHistory (discovered at Talk:Batman). - jc37 00:21, 20 September 2008 (UTC)
Display problem
The latest change has caused a problem with the footer which now splits on to several lines instead of only a single line. See talk:Beverley. Keith D (talk) 16:26, 25 September 2008 (UTC)
AOL problem?
With AOL 9.0 under Windows Vista, the show/hide option isn't shown and all banners are displayed. Things seem to be fine under IE 7.0, Firefox 2.0 and Safari 3.1.2. The problem just developed recently. Any thoughts? Ed Fitzgerald t / c 20:00, 1 October 2008 (UTC)
- Seems to be a general problem, since "show/hide" isn't appearing in navboxes either. Ed Fitzgerald t / c 21:30, 1 October 2008 (UTC)
- The problem seems to have been connected with a bad monobook.js file, and seems to be OK now. Ed Fitzgerald t / c 20:54, 2 October 2008 (UTC)
Weird spacing problem
Anyone know why there is a bunch of whitespace above the first banner in this instance of {{WikiProjectBannerShell}} (not just this one; it may be all of them that are using {{WikiProject Cue sports}}). This wasn't happening before. It is also not happening in cases that use the simpler {{WikiProject Snooker}}, though both are based on {{WPBannerMeta}} — SMcCandlish [talk] [cont] ‹(-¿-)› 09:01, 3 October 2008 (UTC)
- A quick check of transclusions shows that this whitespace occurs on every single page {{WikiProject Cue sports}} is on, bannershell or not, so it's just a coding problem with the banner. Chris Cunningham (not at work) - talk 10:16, 3 October 2008 (UTC)
- I'm absolutely baffled by this one. I utterly hate the meta template (no offense to its fans...hand-coding is easier to customise and is for me to troubleshoot), but in this instance, I cannot find anything that is out of place. — Huntster (t • @ • c) 10:42, 3 October 2008 (UTC)
- I'm taking this to WP:ANI!!! — SMcCandlish [talk] [cont] ‹(-¿-)› 13:22, 4 October 2008 (UTC) this is a joke
- Phew :D The banner cabal remains secure... Mwawhawhaw! Happy‑melon 13:49, 4 October 2008 (UTC)
- I'm taking this to WP:ANI!!! — SMcCandlish [talk] [cont] ‹(-¿-)› 13:22, 4 October 2008 (UTC) this is a joke
- Yes, that was a pain to track down. It seems to be due to an interaction between {{WPBannerMeta/comments}} use of HTML-style markup for its table row combined with the assumption in {{WPBannerMeta}} line 54 that wikimarkup will be used for table rows. I've posted more details at Template talk:WPBannerMeta. Anomie⚔ 12:55, 3 October 2008 (UTC)
- I s'pected as much, but thought it safest to post here as well. Sorry for the quasi-intrusion. — SMcCandlish [talk] [cont] ‹(-¿-)› 13:22, 4 October 2008 (UTC)
align="center"
{{editprotected}}
Please remove align="center"
from this template, it is already centered by the tmbox
classes. Thanks. —Ms2ger (talk) 16:39, 3 October 2008 (UTC)
- Done Happy‑melon 17:08, 3 October 2008 (UTC)
- Could you please change
{{#ifeq:{{lc:{{{collapsed|}}}}}|yes||un}}collapsed
to{{#ifeq:{{lc:{{{collapsed|}}}}}|yes|collapsed}}
(there is nouncollapsed
class) andcellspacing="4px"
tocellspacing="4"
(HTML attributes never includepx
)? Sorry for not asking everything at once, and thanks. —Ms2ger (talk) 17:17, 3 October 2008 (UTC)- Also Done. Could you expand on the 'px' thing? I suspect I may learn something new... Happy‑melon 17:38, 3 October 2008 (UTC)
- Thanks for your help! In CSS (and thus style attributes), a length has to be followed by a unit identifier, e.g.
px
[1], while in HTML attributes, integers are used for pixels[2]. IMO, MediaWiki should check that, but I suppose I'd have to code it myself to get it through. —Ms2ger (talk) 18:42, 3 October 2008 (UTC)- And even then your patch would sit there for two years, on the basis that "we aren't accepting any more style changes for the time being" or something similar. [view source for further comment]. — SMcCandlish [talk] [cont] ‹(-¿-)› 13:27, 4 October 2008 (UTC)
- Just a clarification: The
align="center"
code is only needed for templates that use the old "messagebox" classes. Or more precisely, any tables that use "auto" for the left and right margin to center themselves need thealign="center"
code, since older browsers don't understand "auto". The mbox classes instead use "10%" for both the left and right margin to center themselves. - --David Göthberg (talk) 20:58, 3 October 2008 (UTC)
- Thanks for your help! In CSS (and thus style attributes), a length has to be followed by a unit identifier, e.g.
- Also Done. Could you expand on the 'px' thing? I suspect I may learn something new... Happy‑melon 17:38, 3 October 2008 (UTC)
- Could you please change
- If it's still needed for some reason, it should be
style="text-align:center;"
anyway. — SMcCandlish [talk] [cont] ‹(-¿-)› 13:27, 4 October 2008 (UTC)
- If it's still needed for some reason, it should be
- SMcCandlish: Nope, they are two different things. When the
align="center"
is used in the<table>
tag it centres the whole table on the page. Whilestyle="text-align:center;"
centres the contents of the table within the table. - --David Göthberg (talk) 20:14, 4 October 2008 (UTC)
Sanity check
Can I just have a sanity check, please: it is just me that sees one of the banners misplaced slightly inside the shell template on Talk:American football?? It only appears when I'm logged in to this account, and not when I'm logged into my alternate account, even though that account uses exactly the same CSS and JS as this one... :S Happy‑melon 17:14, 3 October 2008 (UTC)
- You're still sane, that's the difference between
.mbox-inside .tmbox
and.messagebox.nested-talk
. —Ms2ger (talk) 17:17, 3 October 2008 (UTC)- You mean you do see it or you don't? Happy‑melon 17:33, 3 October 2008 (UTC)
- I do. —Ms2ger (talk) 18:42, 3 October 2008 (UTC)
- So why don't I see it when I log out or log in on another account? *cries in frustration* :D Happy‑melon 20:46, 3 October 2008 (UTC)
- I do. —Ms2ger (talk) 18:42, 3 October 2008 (UTC)
- You mean you do see it or you don't? Happy‑melon 17:33, 3 October 2008 (UTC)
- I too took a look at Talk:American football using all three of my browsers (FF 2, IE 5.5 and Opera 9.02). I see the same thing in all three of them: That is, the outer templates such as the "important note" etc. varies in the placement of their left border with 1px. And that is normal since some of them use the "messagebox" classes and some use the "tmbox" classes. But to me all the banners inside the bannershell are perfectly aligned. In spite that they use different classes. (Most of them use the "messagebox" classes, but {{WikiProject American football}} uses {{WPBannerMeta}} that uses the "tmbox" classes.) So if you see one banner with 1px difference in the left border it should be the {{WikiProject American football}}, even though I don't see it.
- But yes, too much template coding combined with CSS coding is likely to make you insane. Or perhaps we already were insane since we dared to try to code and understand this stuff? :))
- --David Göthberg (talk) 21:19, 3 October 2008 (UTC)
When logged in as Happy-melon, I see this, but when logged in as Also-Happy-melon or logged out, I see this. The only difference that I can think of is that the MediaWiki:Sysop.js javascript is loaded on my admin account but not the others. But Ms2ger says he gets it and he's not an admin. This above anything else is what confuses me - the effect is constant on both my browsers and regardless of which order I view and review the page. I think the only thing left to say is, WTF?!! Happy‑melon 21:40, 3 October 2008 (UTC)
- And I am an admin but I don't see that problem, no matter if I am logged in or not.
- I took a look in your /monobook.css and /monobook.js and I can't see anything there that should cause it. But you should perhaps anyway try to blank them both and see what happens. (I assume you know you then have to wait some minute and then bypass your browser cache to see the difference.)
- But at least it is the {{WikiProject American football}} that is smaller for you, just as I expected. But still, why don't the rest of us see it? So yeah, WTF?!!
- --David Göthberg (talk) 22:01, 3 October 2008 (UTC)
- Strike that. I just realised I have not bypassed my own browser cache for a while. So I tried that, no change. Then I tried to purge the page and now I see the misalignment, both when logged in and logged out. And I see it in all three of my browsers now. So you should try to purge the page from both your browsers and then I expect you to see it in both your browsers.
- The next thing is to fix the problem. Why is there a
height="0"
in the table header of {{WPBannerMeta}}? I don't see any good reason to have that there and it might cause some problems. - --David Göthberg (talk) 22:18, 3 October 2008 (UTC)
- When I first wrapped the content in a subtable, the outer table 'blew up' in vertical height when not nested (and when using the CSS tricks that are currently decaching to hide the header row). I can't remember which browser - I think it might have been FF2. Using the marvelous WebDeveloper plugin for firefox I've found that applying the CSS rule
.wpbs-inner .tmbox {margin:3px 0px 0px 1px;}
corrects the display in FF2, so if this rule works consistently we could add it to MediaWiki:Common.css until such time as we've converted all the banner templates to use tmbox. I haven't checked (or even seen) what the effect is when multiple tmbox-based banners appear in the same shell. I have to go to sleep now so can't test further. Happy‑melon 22:39, 3 October 2008 (UTC)
Parameter activepol
{{editprotected}} The WPBS is hiding the activepol=yes parameter of {{WPBiography}}. See Talk:John Olver. Can you revise the template to have the activepol=yes parameter show up within WPBS and outside of WPBS just like the BLP template? Thanks. -- Suntag ☼ 15:34, 19 October 2008 (UTC)
- This template already has an activepol parameter: {{WPBS|activepol=yes}}. See this edit to see how it works. Anomie⚔ 15:46, 19 October 2008 (UTC)
- Thanks. -- Suntag ☼ 04:09, 21 October 2008 (UTC)
Unsupported template
Found another one on Talk:USS Samoa (CB-6): {{WikiProject American Samoa}}. -MBK004 16:50, 21 October 2008 (UTC)
Wikiprojectbannershell and Safari
- This section was moved here from the talk page of David (me). --David Göthberg (talk) 17:53, 23 October 2008 (UTC)
Hi David, i've been away a bit, and it seems you are still working on all this templatebanner mess, so i figured you would know best where to look. As of recently, i'm seeing this problem with the wikiprojectbannershell on Safari 3.1. Can you help pinpoint the problem ? non tmboxed banners do not have this problem. --TheDJ (talk • contribs) 13:58, 21 October 2008 (UTC)
- Could you point to the page here at Wikipedia which you took that example from?
- And it really is User:Happy-melon who is working with those templates, not me. He has been doing a lot of code changes lately and I am not up to date with his changes. And he has Safari, while I can't run Safari on my operating system.
- --David Göthberg (talk) 13:24, 22 October 2008 (UTC)
- I don't have Safari, actually, which explains why I haven't seen this issue before. I echo DG: I need to know what the code looks like that produced that output for you. Happy‑melon 16:47, 22 October 2008 (UTC)
- I looked around a little since TheDJ has not yet responded. I see the problem when I use my slightly old Opera 9.02 and look at Talk:International Space Station. I don't see the problem with my Firefox 2 and not with my Internet Explorer 5.5. The cases I have found that has the problems use {{WPBannerMeta}} inside {{WikiProjectBannerShell}}. I have not had time to look closer at the code, and I might not have any spare time for a week now or so.
- --David Göthberg (talk) 09:34, 23 October 2008 (UTC)
- The problem is almost certainly (read probably definitely!) with the tmbox classes rather than WPBannerMeta per se, but I'll consider all options, naturally! Can you (TheDJ and DG) take a look at this sandbox and tell me what you see? Happy‑melon 15:54, 23 October 2008 (UTC)
- First a note: I will be moving this discussion to Template talk:WikiProjectBannerShell later.
- Happy-melon: In the sandbox you linked to, when I use my Opera 9.02 I see the following banners being only as wide as their text content: Discworld, Aerosmith and Foo. The others (including the "trivial" one) have 100% width.
- --David Göthberg (talk) 16:36, 23 October 2008 (UTC)
- Hmmmm... I've just downloaded and installed Opera 9.02 from the opera.com archives, and it renders both pages entirely correctly! How bizzarre! I might try Safari just to be certain. Good idea to move this to TT:WPBM btw, go ahead with that. Happy‑melon 17:01, 23 October 2008 (UTC)
- End section moved here from the talk page of David (me). --David Göthberg (talk) 17:53, 23 October 2008 (UTC)
- Well, you and I don't have the same operating system, and my Opera has been auto-updated up to that version number. So there might be some differences. But still, yeah bizarre indeed.
- --David Göthberg (talk) 17:53, 23 October 2008 (UTC)
Safari 3.1.2 under Wine shows only Biology and Buddhism full-width, even the trivial tmbox is partial width. It's not specific to this template, or even Wikipedia, though. This exhibits the same thing:
<html>
<title>Test</title>
</head>
<body>
<table style="margin: 4px 10%;border: 1px solid #c0c090">
<tbody><tr>
<td>?</td>
<td style="width: 100%;">blah</td>
</tr>
<tr>
<td colspan="2">
<table style="margin: 2px;border: 1px solid #c0c090">
<tbody><tr>
<td style="padding: 0px; width: 1px;"></td>
<td style="padding: 0.25em 0.9em;width: 100%;">blah?</td>
</tr>
</tbody></table>
</td></tr></tbody></table>
</body></html>
In the normal case for Safari the cell with width=100% is forcing the table to its maximum size (but only if that dummy cell is present!), the margin setting never forces the table to expand. When the table is inside another table with width=auto, that 100%ing doesn't happen, probably because the outer table doesn't have a width to take 100% of in Safari's model. If I add an explicit width=80% to the outer table in the above and remove the colspan (by inserting a dummy cell in that row to match the dummy in the first row, Safari has other problems with sizing colspanned rows too), it suddenly works as we want in Safari. Anomie⚔ 01:47, 24 October 2008 (UTC)
- I'm not surprised that it worked when you added an explicit width to the outer table, but I am surprised that this is not a more widely-known issue. Surely all our mbox templates must collapse in this fashion? What does
A short piece of text |
- Look like? Happy‑melon 17:38, 24 October 2008 (UTC)
- That looks fine, of course. But both of these look wrong:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
- It's only when the mbox is inside a table with width=auto (or inside a colspanned cell no matter if the table has a width specified or not) that Safari screws it up. Anomie⚔ 00:06, 25 October 2008 (UTC)
- That's concerning, and seems insurmountable, unless you have any clever ideas, DG. I think a fix would be to change the .mbox-inside .tmbox declaration to:
.mbox-inside .tmbox { /* For tmboxes inside other templates. */
margin: 2px;
width:100%;
}
- Given that we're never going to have boxflow issues within the WPBS template! Does adding this code to your monobook solve the issue, Anomie? Happy‑melon 08:30, 25 October 2008 (UTC)
- I did a little testing some day ago with the 80% wide ones, but gave up for now. As I reported before my Opera 9.02 also has these problems, but my testing showed that it has slightly different problems from what Anomie reports for his Safari...
- Oh, you are right Happy-melon. We probably shouldn't waste our time to try to fix the 80% wide case, since that is just the old temporary case. Since we are planning to make them 100% wide. And making it work for 100% width is probably much simpler. I think your code above will work.
Anomie: The code that Happy-melon shows above doesn't work for the {{WikiProjectBannerShell}} at the moment, since it doesn't use the "mbox-inside" class yet. (We are going to add that class later.) But you can test it in your sandbox by adding that class to the surrounding table.- I'll try to squeeze in some time to fix so also the banners that use the old "messagebox" class become 100% wide automatically, as we do for the ".mbox-inside .tmbox". I think all we have to do is to add something like
".mbox-inside .messagebox,"to the ".messagebox.standard-talk { }" declaration in MediaWiki:Common.css. But we'll have to test that carefully first of course. - --David Göthberg (talk) 10:01, 25 October 2008 (UTC)
- When I download the page and all related JS/CSS files and just edit things locally, adding
width:100%
to the rule does fix the width issues. But on both Safari (in Wine) and Firefox 3, the tmbox boxes then all seem to be shifted right 2 pixels from being centered; both browsers size the banner to 100% and then apply the margin setting. Changing tomargin:2px 0
fixes that. Anomie⚔ 13:20, 25 October 2008 (UTC)
- When I download the page and all related JS/CSS files and just edit things locally, adding
- Anomie: Oops, I was wrong about the "mbox-inside" class, it is there in {{WikiProjectBannerShell}} again.
- Everyone: I tested the code that Happy-melon suggested above, and it works fine in all three of my browsers: Firefox 2, IE 5.5 and Opera 9.02. I also see some minor margin problems just like Anomie describe. But just as Anomie found out, changing to
margin: 2px 0 0 0;
fixes it for all my browsers too. - So it seems we should add this to MediaWiki:Common.css:
.mbox-inside .tmbox { /* For tmboxes inside other templates. */
margin: 2px 0 0 0;
width: 100%;
}
- To automate the width for banners that still use the old "messagebox" class I would also like to add this:
.wpbs-inner .messagebox,
.messagebox.nested-talk {
border: 1px solid #c0c090;
background-color: #f8eaba;
width: 100%;
margin: 2px 0 0 0;
padding: 2px;
}
- I have tested the code above, and it seems to work fine in all three of my browsers. The reason I use "
.wpbs-inner .messagebox,
" above, instead of ".mbox-inside .messagebox,
", is that there might be some cases where a "messagebox" is used inside certain image boxes that has the "mbox-inside" class. If we use ".mbox-inside .messagebox,
" then those messageboxes will become talk page brown on those image pages. - --David Göthberg (talk) 03:55, 26 October 2008 (UTC)
- Excellent! Looks like we're set to go! Happy‑melon 09:13, 26 October 2008 (UTC)
- Shouldn't that second code block have the comment before the selectors or after the
{
? I seem to remember a change recently that moved all comments from out of the middle of selectors because of some b0rken browser choking on it.[3] Anomie⚔ 14:11, 26 October 2008 (UTC)
- Shouldn't that second code block have the comment before the selectors or after the
- Anomie: Right, I was the one who noticed that problem and fixed it in MediaWiki:Common.css. And I didn't add those comments to my code above, it was Happy-melon who sneaked them in. (I have now restored my code above to what I wrote.)
- Happy-melon: Please stop editing and breaking my comments. You have done this before, and it is getting annoying. (Last time was much worse, when you totally messed up my table at the Village pump about the image namespace change. [4]) The least thing you could do is to state in your comments when you have done changes to our comments. But really, stop altering other people's talk page comments.
- Everyone: I have done some more thinking and testing of the CSS code for this, and have some improvements:
- First change is to use Anomie's suggestion from above to just use "margin: 2px 0;" instead of "margin: 2px 0 0 0;". Both margin settings work, but I think the "margin: 2px 0;" looks better in the browsers I have.
- Second change is a more correct selector for the "nested-talk" code. Here is the new code:
.mbox-inside .tmbox { /* For tmboxes inside other templates. */
margin: 2px 0;
width: 100%; /* Fix for Safari and Opera. */
}
/* For old WikiProject banners inside banner shells. */
.mbox-inside .standard-talk,
.messagebox.nested-talk {
border: 1px solid #c0c090;
background-color: #f8eaba;
width: 100%;
margin: 2px 0;
padding: 2px;
}
- The difference with the new ".mbox-inside .standard-talk," selector is that now only "messagebox" boxes that are intended to be on talk pages will be converted to talk page brown and 100% wide when inside an "mbox-inside" tagged box, such as inside the {{WikiProjectBannerShell}}. While the selector I used in my previous example above ".wpbs-inner .messagebox" converts any "messagebox" box to talk page brown and 100% wide, when inside a bannershell. Both works well enough for us, so it is more a matter of theoretical correctness.
- --David Göthberg (talk) 05:38, 28 October 2008 (UTC)
- I consider 'demonstrations' and 'examples' on talk pages to be distinct from 'discussions' and 'opinions'; the latter are of course inviolate, and I would never edit such, with the sole exceptions of things like correcting indentation. However, and we've had this discussion before too, I tend to consider code examples, demonstrations and programming suggestions to be 'active content', and feel that editing such material to keep it 'up to date' is preferable to continually posting endless new examples of almost identical content with only minor differences. Naturally it is unacceptable to make changes that alter the meaning of an example, but trivial changes (as well as edits that restore the meaning of old examples) are, IMO, acceptable. Although I usually attempt to note where I have made changes, you correctly note previous cases where I have neglected to do so. Since you appear to object to this position, I will try to remember to leave your comments in whatever state I find them. But that's by-the-by... I like the new selector for the second part, very sensible. And since it's only three days until the new CSS and JS decaches for the new collapsible banners, it's only a temporary fix anyway. Happy‑melon 13:58, 28 October 2008 (UTC)
- Happy-melon: Well, the most important part is that you should note when you do changes to "examples" on a talk page. Since it is very confusing when I make a code example and add a text explanation below, and then you change the code example which makes my text explanation below seem confused. And of course even worse when you break my code example. (And even worse to break the code when I claim in my text that I have tested and verified the code in all three of my browsers.)
- And regarding the code being "temporary": Well, as we have discussed before it will probably take at least some months and perhaps some year before all usage cases of the messagebox classes have been updated to use the tmbox classes instead.
- Everyone: So, should we use "
margin: 2px 0;
" or "margin: 2px 0 0 0;
" ? Both margin settings work, but I think the "margin: 2px 0;
" looks better in the browsers I have. - --David Göthberg (talk) 15:03, 28 October 2008 (UTC)
- "
2px 0;
". It looks silly to have different offsets at the top and bottom of.wpbs-inner
. —Ms2ger (talk) 16:43, 28 October 2008 (UTC)
- "
- I have now updated MediaWiki:Common.css to use the code above. Anyone wanting to see the result of it as usual need to bypass their browser cache and can take a look at the first example in Template:WikiProjectBannerShell/sandbox.
- And gah! Now I see why the old code used "
margin: 2px 0 0 0;
". Now that we use "margin: 2px 0;
" we get more margin at the bottom than at the top, in most browsers. So I investigated: {{WikiProjectBannerShell}} uses this padding for the wpbs-inner cell: "padding:2px 4px 4px 4px;
". I want to update that padding to "padding: 2px 4px;
", instead of changing the margin back for the banners. I tested and that makes it right in all three of my browsers. Does anyone know any reason to not do that change? - --David Göthberg (talk) 19:01, 28 October 2008 (UTC)
- This is true, I will try to be more careful in future. Of course I thought I was making the trivial change of adding a few comments, such that the 'meaning' of the example wasn't changed at all; unfortunately I didn't know I was also breaking it :D...
- Vis temporariness, remember that this particular fix doesnt' really apply to all messageboxes, only to those which ever appear in an mbox-inside, of which the WikiProject banners are (AFAIK) the only examples. So this code only really applies until we've converted all 800-some WikiProject banners to use mbox classes and the new nested system. If that takes over a year we really need to work on our productivity :D You are right, however, that fully deprecating the messagebox system is going to take rather longer.
- (The below completely irrelevant given the editconflict with DG's post above :D) Since what we're really trying to do here is to unify the appearance of the new and old templates when they appear inside an .mbox-inside, perhaps the most sensible thing to do would be to exactly duplicate the styles that are applied to the .mbox-inside .tmbox tables for the other two options (.mbox-inside .standard-talk and .messagebox.nested-talk). This is the only way I've found that it's possible to make the two classes exactly identical. Code to do this is below; it's more extensive than the examples above:
.mbox-inside .tmbox { /* For tmboxes inside other templates. */
margin: 2px 0;
width: 100%; /* Fix for Safari and Opera. */
}
.mbox-inside .standard-talk,
.messagebox.nested-talk {
border: 1px solid #c0c090;
background-color: #f8eaba;
width: 100%; /* Apply the same */
margin: 2px 0; /* styles to messageboxes */
padding: 0; /* as to the new */
border-collapse:collapse; /* tmbox classes */
}
.mbox-inside .standard-talk th,
.messagebox.nested-talk th { /* Apply the most important part of '.mbox-text' to */
padding: 0.25em 0.9em; /* the header cells of normal nested messageboxes */
}
.mbox-inside .standard-talk td,
.messagebox.nested-talk td {
padding:0.5em;
}
- The last two declarations apply some relevant styles from the .mbox-text and .mbox-image classes to the cells of the other tables, as these templates don't contain the necessary class declarations. Applying these styles to the messagebox classes does introduce its own issues, such as there being no padding between the quality-scale cell and the edge of the table; these could only be fixed by applying all the various mbox tricks to the necessary cells, which would require a huge amount of convoluted and hacky CSS (and couldn't be reliably done completely without adding classes to the tables); needless to say, this whole process would be a lot easier if we could modify the entire banner collection easily at once... but then we wouldn't be in this situation in the first place :D... These style issues will go away once the banners are converted to use the mbox classes directly, so (given that that process can start in 3 days time) the moral of the story is: we can try till kingdom come to make these two groups of tables render identically, but the only way we're really going to achieve it is to make them use the same classes and styles. The other moral is, border-collapse:collapse; is a bitch to imitate without actually doing it... Happy‑melon 19:40, 28 October 2008 (UTC) (End completely irrelevant part)
- DG, I've independently come to the same conclusion on my hardcoded version of WPBS. I know the discussion over "2px 4px" vs "2px 4px 4px 4px" has been had before, but I can't remember what was decided and why!! Either way, changing it seems to solve the immediate problem, so go ahead IMO. Happy‑melon 19:46, 28 October 2008 (UTC)
- Okay, I have changed {{WikiProjectBannerShell}} to use "padding: 2px 4px;" for the wpbs-inner cell.
- Happy-melon: And regarding your "irrelevant part" above: Now that we fixed the width, margin and padding I think the "messagebox" and "tmbox" based banners look enough much like each other that no further fixes need to be done with that. The next step, as you point out, is to continue to convert banners to use the tmbox classes.
- I am very curios/thrilled to see how your new javascript and CSS code for the auto hiding of the headers will work out there on the real pages. (That is, so the banners don't need the "nested=yes" setting anymore.) If I understand it right, that is the javascript and CSS that will be fully decached in three days, right?
- --David Göthberg (talk) 20:49, 28 October 2008 (UTC)
- this is the critical edit, so yes, a couple of days should do it. Have we actually pinned down precisely how long the caching time is? I guess I'd better get writing up the explanation of how to use the new system... Happy‑melon 21:08, 28 October 2008 (UTC)
- Yes and no: For the CSS files it is exactly 31 days caching, or as my web browser states it: 2678400 seconds. For the javascript files I don't know. We should probably check with the devs what the exact javascript caching time is.
- --David Göthberg (talk) 21:20, 28 October 2008 (UTC)
- My Firebug says "
max-age=2678400, max-age=2592000
[sic]", (31/30 days respectively). —Ms2ger (talk) 18:06, 29 October 2008 (UTC)
- My Firebug says "
- Oops, thanks for "filling in" the numbers Ms2ger. Because of Happy-melon's question above I asked over at MediaWiki talk:Common.js#Javascript caching time and did get a full answer earlier today. (Have a look, it is interesting.) But I forgot to report back here. And yes, the answer is that the servers set both 30 and 31 days caching at the same time on some javascript and some CSS files...
- So as I stated over there: So to be on the safe side, and since the difference is only a day anyway, let us assume that some users won't see our changes until 31 days have passed.
- --David Göthberg (talk) 20:08, 29 October 2008 (UTC)
Nothing collapses, no show or hide gadgets
I've been using this template on several article talk pages within the scope of Wikipedia:WikiProject Wine. It has worked fine, until just now when I placed it on Talk:Sangiovese. No show/hide gadgets appear, and the WikiProject descriptions aren't collapsed. Any idea what's wrong? I didn't do anything different than on other pages (see Talk:Zinfandel for example). ~Amatulić (talk) 23:38, 29 October 2008 (UTC)
- What browser, do you have any other javascript installed, do you get any javascript errors, does it still happen after purging/null-editing/dummy-editing, does it still happen if you log out/log back in/log in as a different user? I'm on FF2.0, and I see no problems - the page renders perfectly. However, I suspect this is the same or related to Template talk:WPBannerMeta#Nesting again.... Happy‑melon 23:49, 29 October 2008 (UTC)
- Using IE7, no special settings, problem still occurs after purging caches, editing the page, logging off and on, etc. I will point out that this template works on every other page I have put it on, but not Talk:Sangiovese. I do get a little "Error on page" message in the lower left corner of the browser window, and that message doesn't appear on any other page. So it is likely a javascript error, but the error is not on my end. ~Amatulić (talk) 00:26, 30 October 2008 (UTC)
- Talk:Sangiovese is probably just the only talk page you put it on that has a "Comments" subpage. There is a certain bit of code that has been copied into a number of WikiProject banners that causes broken links to be generated, and any gadget/script that manipulates all links on the page will blow up in IE7 when it finds one of those links. This edit probably fixed it. Anomie⚔ 00:47, 30 October 2008 (UTC)
- I haven't seen the version of Talk:Sangiovese that broke for Amatulic, but the current version works fine in all three of my browsers. (Firefox 2, IE 5.5 and Opera 9.02.) So it seems you fixed it Anomie.
- --David Göthberg (talk) 00:58, 30 October 2008 (UTC)
- I'm not sure the problem surfaces in any browser other than IE7, actually, and you also have to have a gadget/script installed that pokes at the broken link. This test page should exhibit the problem, but I can't test it at the moment to say for sure. Anomie⚔ 01:41, 30 October 2008 (UTC)
- Your test page does exhibit the problem, although the problem has disappeared from Talk:Sangiovese. Did somebody fix something? ~Amatulić (talk) 18:17, 30 October 2008 (UTC)
- Amatulić: Yes, Anomie fixed the problem. And thanks that you reported that it now works.
- Anomie: Your test page works in my IE 5.5. So it seems you are right that it is IE 7 that is extra sensitive. Or I simply don't have any of the scripts installed that provokes the error. Anyway, the solution is of course to not use broken code. Thanks for fixing the broken pages.
- --David Göthberg (talk) 20:35, 30 October 2008 (UTC)
New implementation of WikiProject banners
I am delighted to be able to introduce an exciting (if you're that way inclined, anyway :D) set of tools for handling WikiProject banners on talk pages. The net effect of these new features is to remove the need for the |nested=yes
parameter when putting WikiProject banners inside banner shells, and to make it trivial to manipulate the appearance of shelled banners on a per-user or per-page basis.
The system is a combination of new JavaScript to expand the CollapsibleTables system, and new CSS designed specifically for WikiProject banners. Full details of the new JavaScript code can be found at Help:Collapsible tables. The most important step is to add one of the two new CollapsibleTables classes (('outercollapse') to the cell in the {{WikiProjectBannerShell}}
template into which the WikiProject banners are inserted. This means that any collapsible tables which are A) placed inside this cell, and B) given the 'innercollapse' class, will automatically collapse themselves. This means that it is no longer necessary to use the |nested=yes
parameter to define whether or not to add the CollapsibleTables functionality to a banner. Now we can have that functionality always enabled, and the banners will be collapsed inside WikiProjectBannerShell and uncollapsed when they are alone on a page. The CSS classes selectively hide the header row of all WikiProject banners which are not inside a banner shell. It achieves this by hiding the header row, which is identified by the class 'wpb-header', in all instances, then re-enabling it when the banner is inside an object with the 'wpbs' class. So banners outside a banner shell are still theoretically collapsible, but the hide/show button is not visible, duplicating the current behavior. So the next most important step is to also add the 'wpbs' class to some part of {{WikiProjectBannerShell}}
. Both of these steps already been done.
With these preparations completed, it is now possible to convert individual WikiProject banners to use the new system. The header of a typical WikiProject banner usually looks something like this:
Example 1:
{| class="{{#ifeq:{{{nested|}}}|yes|collapsible collapsed messagebox nested-talk|{{#ifeq:{{{small|}}}|yes|messagebox small-talk|messagebox standard-talk}}}}" {{#ifeq:{{lc:{{{nested|}}}}}|yes| {{!}}- ! colspan="3" style="text-align: center" {{!}} [[Wikipedia:WikiProject Old|WikiProject Old]]{{#if:{{{class|}}}| (Rated {{ucfirst:{{{class}}}}}-Class)}} }} |- |width="48"|[[Image:Information.svg|{{#ifeq:{{{small|}}}|yes|40px|60px}}|Icon]] |This article is within the scope of '''[[Wikipedia:WikiProject Old|WikiProject Old]]'''. For more information, etc etc etc... ... |}
With the new code, it is possible to rewrite this banner replacing the red code above with the green code below, like this:
Example 2:
{| class="wpb collapsible innercollapse messagebox {{#ifeq:{{{small|}}}|yes|small-talk|standard-talk}}" |- class="wpb-header" ! colspan="3" style="text-align: center" | [[Wikipedia:WikiProject New|WikiProject New]]{{#if:{{{class|}}}| (Rated {{ucfirst:{{{class}}}}}-Class)}} |- |width="48"|[[Image:Information.svg|{{#ifeq:{{{small|}}}|yes|40px|60px}}|Icon]] |This article is within the scope of '''[[Wikipedia:WikiProject New|WikiProject New]]'''. For more information, etc etc etc... ... |}
As you can see this is considerably simpler to write, easier to debug, and more friendly on the eye. It is also fractionally kinder on the MediaWiki parser, although this is not really important. However, the results are now very different. Compare the two banners outside any banner shell:
Example 3:
With their appearance inside a banner shell:
Example 4:
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |
{| class="collapsible collapsed messagebox nested-talk"
|- ! colspan="3" style="text-align: center" | WikiProject Old |- |width="48"| |This article is within the scope of WikiProject Old. For more information, etc etc etc... |} |
Example 5:
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |
In the top instance of {{WikiProjectBannerShell}}
, a parameter default simulates how the banners would look if the parameter |nested=yes
was passed to them. The bottom instance does not contain this tweak. The obvious effect is to make the |nested=
parameter completely unnecessary. This means that WikiProject banners can now be moved inside a banner shell just by placing a shell template around them. This should greatly simplicy the process of tagging and assessing banners. Secondly, it means that the behaviour of all the WikiProject banners within a banner shell can be manipulated easily. By adding or removing the 'outercollapse' and 'wpbs-inner' classes, it is possible to control the collapsed/uncollapsed state of all the banners inside the shell. The new parameter, |banner collapsed=no
, to {{WikiProjectBannerShell}}
, enables this switch.
The code for these changes is now completely decached, and is visible to all users. If we make a concerted effort to change the 800-some WikiProject banner templates to use the new system, it could easily be deployed within a few weeks. This would also be an excellent opportunity to convert WikiProject banner templates to use {{WPBannerMeta}}
or at least the new 'tmbox' classes.
Comments and suggestions would be greatly appreciated. Happy-melon 19:19, 31 October 2008 (UTC)
- On my browser, your example 5 doesn't show both wikiprojects collapsed. Only the second one is. In fact, your example 5 exhibits the problem I wrote about in the previous subsection on this talk page, namely, one of the wikiprojects in your banner isn't collapsible at all; no gadget appears for collapsing it. Try it with IE7. ~Amatulic' (talk) 20:49, 31 October 2008 (UTC)
- I'm running Firefox 2 and I see the same non collapsible rendering for the example 5 that Amatulic apparently does. Is that intended? I do like to hear that there might be possible simplification pending and agree that if there is going to be a pass through all the banners, revisiting/fixing other things might be goodness. ++Lar: t/c 21:28, 31 October 2008 (UTC)
- Looking at the code, it's not supposed to collapse; it's a hard-coded sample of a "nested"-using banner without the actual parameter invocation. Kirill (prof) 00:05, 1 November 2008 (UTC)
I've updated {{WPMILHIST}} to use the new code, and it seems to be working fine. Thanks to Happy-melon for setting this up! Kirill (prof) 00:05, 1 November 2008 (UTC)
- I don't know if this is intentional, but the top two examples are left-aligned, and the subsequent examples are centered. (This may be due to my system configuration, already known by David G. and others : )
- So the improvements may indeed be improvements on that count too. - jc37 08:26, 1 November 2008 (UTC)
- Happy-melon is going to tease me for this, since I have told him to not edit my examples on talk pages...
- I took the liberty of editing the examples above to make it clearer which banners are using the old code and which are using the new code. I renamed "WikiProject Foo" to "WikiProject Old", and "WikiProject Bar" to "WikiProject New". And I added example numbers so it is easier to discuss the different examples. I also slightly edited the comments of Amatulic' and Lar to reflect the new example numbers.
- Amatulic' and Lar: Right, in example 5 above, the old banner doesn't collapse, doesn't get a header, and doesn't get a show/hide button. That is correct since that example shows what happens when a banner with the old code isn't fed the required "nested=yes" parameter. Then that banner doesn't know it is inside a bannershell. While the new banner in example 5 auto-detects that it is inside the bannershell and shows the right appearance, without the "nested=yes" parameter! And that is what all this is about: The new banners don't need the "nested=yes" parameter, instead they are fully automatic.
- jc37: I guess you are using an older browser, perhaps an older Internet Explorer, right? And what you see is that in example 3 the two boxes are left aligned instead of centred on the page, right?
- The reason is that the examples above use the older "messagebox" CSS classes, instead of the newer "tmbox" classes. In some older browsers if a box uses the "messagebox" class then they get left aligned, when placed directly on a page not surrounded by the bannershell. The newer "tmbox" classes fixes that box flow problem. That is a partly separate thing from the announcement here: That banners with the "innercollapse" class no longer need the "nested=yes" parameter. Well, the "messagebox" and "tmbox" classes have been updated to work together with this new "automatic detection when inside a bannershell" system.
- So the solution to the alignment problem you see jc37 is to upgrade all old boxes to use the new "tmbox" classes.
- --David Göthberg (talk) 18:38, 1 November 2008 (UTC)
- Ah. Thanks for sorting that for me. Much appreciated. This seems a uniformly good idea then. All that remains, then, before doing this to all the project banners, is to identify what else might need doing in a big edit pass? Oh, can I tease you about editing examples too, or is that restricted to HappyMelon? :) ++Lar: t/c 19:01, 1 November 2008 (UTC)
- Lar: Nah, I guess anyone can tease me for it now, since it backfired. So I should perhaps withdraw my old statements (on other talk pages) that you should not edit my examples and change it to: "You may edit my examples, but if you do then take care so you don't break them. And more importantly, you must state that you edited them and preferably mention what changes you did." Since as I see it we sign our comments and examples on the talk pages, and not stating that one has edited another comment means false attribution and causes all kinds of confusion. It is especially confusing if others have already commented on the previous version of the examples.
- Happy-melon: I tested your examples above in my three web browsers: In my Firefox 2 and IE 5.5 they work perfectly (apart from the known left align issue with example 3 in IE 5.5). But in my Opera 9.02 when I click [hide] on the entire bannershell in example 4 and 5, then the bannershell collapses all right, but it also becomes slightly less than 80% wide. I tested on some other talk pages but I don't see this problem when I click [hide] on the bannershells there. When I click show it expands again and also gets 80% wide again. This is just a minor problem, since it doesn't matter much that the bannershell becomes less wide when collapsed. But I guess we should investigate it when we get the time.
- --David Göthberg (talk) 19:27, 1 November 2008 (UTC)
Debugging is still needed. This template on Talk:Muhammad is appearing (on IE7) fully expanded, with no options to show or hide anything. ~Amatulić (talk) 19:52, 6 November 2008 (UTC)
Usage guide
Please describe or link the meaning of the parameters "1=" and "nested". `'Míkka>t 00:54, 5 November 2008 (UTC)
- I suggest reading Template:WikiProjectBannerShell#Usage. —Ms2ger (talk) 12:43, 5 November 2008 (UTC)
- Yeah, and I suggest you reading and understanding my question before answering. `'Míkka>t 15:35, 5 November 2008 (UTC)
- "1=" simply means the first parameter. You will find documentation at meta:Help:Template
- Though I don't understand the nested parameter nor can I quickly uncover the documentation, evidence suggests that it is obvious to those who edit the code for WikiProject banners. Meanwhile, for you and I, we merely need to know that we must add |nested=yes when nesting a (compliant) banner inside a WikiProjectBannerShell.
- Judging by your experience, Ms2ger and I seem to have a blind spot as to the wording of the documentation. I have tweaked Talk:Hinduism in Russia to conform to the recommendation at Template:WikiProjectBannerShell/doc. Could you give us the benefit of your fresh eyes to recommend or add changes to the documentation that would have made it more clear to you how to use the banner shell?
--Hroðulf (or Hrothulf) (Talk) 17:03, 5 November 2008 (UTC)