Module talk:WikiProject banner/Archive 6
![]() | This is an archive of past discussions about Module:WikiProject banner. 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 4 | Archive 5 | Archive 6 | Archive 7 | Archive 8 | → | Archive 10 |
Update directions & need help at Template:WPFOOD
When you added the default flag for importance, in both the main & B ck-list areas, and when you enabled the TF6-10 prompts for creating categories, are we supposed to have a yes/no for each TF 6-10 and have that default flag in the code on our WP templates? Do the instructions need to be updated on the /doc page? Reason for asking - don't know how to get {{WPFOOD}} to prompt for the missing Herbs & Spices categories. Thanks! --Funandtrvl (talk) 15:33, 11 May 2009 (UTC)
- The TF_6-10 checks are only a tool for the convenience of editors constructing complicated banners. They don't actually work. They will prompt for the missing categories on the template page, but then they need to be "hooked". You won't get prompts on {{WPFOOD}} because they are using a custom mask. However I have created a version on Template:WikiProject Food and drink/sandbox which is prompting for them now. — Martin (MSGJ · talk) 15:47, 11 May 2009 (UTC)
- Terrific, thank you for the help and explanation! --Funandtrvl (talk) 16:13, 11 May 2009 (UTC)
B checklist
On {{WPBeatles}}, the B checklist is implemented, but an article can still be assessed as B-Class even if b1–b6 are set to "no".
Is this a bug in that banner (in which case, how do I fix it?), or is it due to a recent change in WPBannerMeta (in which case the documentation should be updated)? Dendodge T\C 16:17, 18 May 2009 (UTC)
- Yes, this is a Happy-melon error on your custom mask. Easily fixed though. — Martin (MSGJ · talk) 16:56, 18 May 2009 (UTC)
- How do I fix it? Dendodge T\C 17:10, 18 May 2009 (UTC)
- I fixed it. Also on WPGermany; I'm going to go through and check the others. :S Happy‑melon 18:04, 18 May 2009 (UTC)
- Looks like we've all done it!! Even Martin, although that was to a sandbox, so it only counts as half... :D Happy‑melon 18:20, 18 May 2009 (UTC)
- Umm, hope you didn't "fix" any others in this way! (Extra =) — Martin (MSGJ · talk) 19:35, 19 May 2009 (UTC)
- I don't know what you're talking about... :S Happy‑melon 20:44, 19 May 2009 (UTC)
- Umm, hope you didn't "fix" any others in this way! (Extra =) — Martin (MSGJ · talk) 19:35, 19 May 2009 (UTC)
- How do I fix it? Dendodge T\C 17:10, 18 May 2009 (UTC)
Questions
I've done a lot of work today to bring {{WikiProject Mississippi}} up to standards, including creating many sub pages this template required. Happy-melon converted it to WPBannerMeta on April 3rd, but many of the parameters weren't implemented during that conversion, hence my work today. Most of what I've done is via reading documentation and looking at other project templats. I do have some questions however and would appreciate any help..
- Used to, articles classed as NA would go into Category:Non-article Mississippi pages. Now I see that page was deleted twice in April. So my question is, where are the NA articles going now?
- Second question.. I think I have some coding wrong somewhere as Category:Mississippi articles needing attention is showing articles instead of placing them in the subcats. Thoughts?
It's all confusing to me but I think I've done a good job bringing the template from what it was to what it is now. Any further help fine tuning it would be most appreciated. - ALLST✰R▼echo wuz here @ 02:20, 19 May 2009 (UTC)
- It's looking good! I've made a few suggestions, feel free to revert them.
- NA-Class articles will be in Category:NA-Class Mississippi articles, although as you have full quality scale enabled only those pages which don't come under any other class will be in here.
- I don't understand. What subcategories do you want to use? I don't see any specifc coding relating to the attention category ...
- — Martin (MSGJ · talk) 07:09, 19 May 2009 (UTC)
- Excellent. I wasn't aware of Category:NA-Class Mississippi articles. I do my best to keep this project running. I wished I knew of way to know when new project related pages were created such as this one. I kept wondering why in the world Category:Non-article Mississippi pages kept getting deleted and showing as red link in the template's assessment documentation and I didn't know what to replace it with. lol I changed the images back in the template due to past discussion a wiki-lifetime ago (I think it was 2 years, maybe just under). But as I think about it, I don't guess it would matter now since all those that were a part of the discussion have seemingly disappeared. I of course find the Mississippi state flag offensive but that's another discussion for another place.
- As for those subcats, I was just noticing like on Category:Nevada articles needing attention, they have no individual articles listed there.. just all subcats, whereas Category:Mississippi articles needing attention has the subcats and some stray individual articles.
- Thanks for your help and looking at the template. - ALLST✰R▼echo wuz here @ 07:24, 19 May 2009 (UTC)
The banner has the following parameter set:
|attention={{{attention|}}}
Since no category is defined, I assume the meta feeds Category:Foo articles needing attention by default, though this is not mentioned in the documentation. Happy Melon or Martin will know better than me, though. PC78 (talk) 09:49, 19 May 2009 (UTC)
- Not mentioned? What's this then: "By default, they are categorised into Category:PROJECT articles needing attention." Navada articles needing attention will go into that category - it just so happens that there are none at the moment. — Martin (MSGJ · talk) 13:27, 19 May 2009 (UTC)
- Ahh ok, Thanks Martin. - ALLST✰R▼echo wuz here @ 20:14, 19 May 2009 (UTC)
- Ah, well. Clearly I can't read then. :) PC78 (talk) 22:37, 19 May 2009 (UTC)
- Ahh ok, Thanks Martin. - ALLST✰R▼echo wuz here @ 20:14, 19 May 2009 (UTC)
Another question
Would someone take a look at {{WikiProject Mississippi}} and fix whatever is causing it to call for {{WikiProject Mississippi/class}}. I only noticed this because when you're in edit mode for the template and scroll all the way down to the bottom of the page here it shows all templates being called for, it was red. Thanks. - ALLST✰R▼echo wuz here @ 04:24, 21 May 2009 (UTC)
- This is not an error, and happens on every banner. It's because the meta checks that page in case there is a custom class mask in place. — Martin (MSGJ · talk) 07:20, 21 May 2009 (UTC)
- OK, thank you for explaining it to me. - ALLST✰R▼echo wuz here @ 07:26, 21 May 2009 (UTC)
Hmn, we could fix this by adding the surrounding #ifexist check, as we do on the main banner. How close to the limit did you say you were with the category checks, Martin? Happy‑melon 15:00, 21 May 2009 (UTC)
Some feedback would be appreciated. Headbomb {ταλκκοντριβς – WP Physics} 07:43, 23 May 2009 (UTC)
Hide importance row on non-articles
Another request born of MSGJ's and my efforts to convert {{WikiProject Anime and manga}} to use WPBM; currently WP:ANIME's banner does not display the importance row on non-articles (where importance is automatically set equal to NA), whereas WPBM does. Once again, MSGJ has said he agrees with how WP:ANIME's banner does it, and suggested I raise the issue here. Thoughts? 「ダイノガイ千?!」(Dinoguy1000) 19:08, 12 May 2009 (UTC)
- Ha, you've got your work cut out trying to persuade that lot to convert :) I agree that it's a bit pointless displaying an NA-importance, athough we should to continue categorising in those categories. — Martin (MSGJ · talk) 14:00, 13 May 2009 (UTC)
- But if a page was manually rated with an importance rating (even if it were NA), then that should be displayed. Essentially you want to hide the importance scale (but still categorise) if the importance rating is "unspecified". That's much trickier than just hiding it in certain namespaces(which is trivial). Happy‑melon 14:34, 13 May 2009 (UTC)
- Hmm, I was thinking about hiding it whenever the importance was NA ... (I don't think whether NA is actually specified should make any difference?). This would have to be checked on /importancescale itself, after the importance is passed through the mask. — Martin (MSGJ · talk) 15:53, 13 May 2009 (UTC)
- Actually, I was talking specifically about hiding in certain namespaces (everything but article talk), but showing in those namespaces if (for whatever reason) the importance has been specified. 「ダイノガイ千?!」(Dinoguy1000) 20:15, 13 May 2009 (UTC)
- Isn't that the same as what I said? (Unless you put NA importance on an article, which is silly ...) — Martin (MSGJ · talk) 20:24, 13 May 2009 (UTC)
- Cough redirects cough. :D Happy‑melon 21:14, 13 May 2009 (UTC)
- And disambiguation pages... Headbomb {ταλκκοντριβς – WP Physics} 04:49, 21 May 2009 (UTC)
- Sure, well these are all non-articles anyway. — Martin (MSGJ · talk) 07:22, 21 May 2009 (UTC)
- And disambiguation pages... Headbomb {ταλκκοντριβς – WP Physics} 04:49, 21 May 2009 (UTC)
- Cough redirects cough. :D Happy‑melon 21:14, 13 May 2009 (UTC)
- Isn't that the same as what I said? (Unless you put NA importance on an article, which is silly ...) — Martin (MSGJ · talk) 20:24, 13 May 2009 (UTC)
- Actually, I was talking specifically about hiding in certain namespaces (everything but article talk), but showing in those namespaces if (for whatever reason) the importance has been specified. 「ダイノガイ千?!」(Dinoguy1000) 20:15, 13 May 2009 (UTC)
- Hmm, I was thinking about hiding it whenever the importance was NA ... (I don't think whether NA is actually specified should make any difference?). This would have to be checked on /importancescale itself, after the importance is passed through the mask. — Martin (MSGJ · talk) 15:53, 13 May 2009 (UTC)
- But if a page was manually rated with an importance rating (even if it were NA), then that should be displayed. Essentially you want to hide the importance scale (but still categorise) if the importance rating is "unspecified". That's much trickier than just hiding it in certain namespaces(which is trivial). Happy‑melon 14:34, 13 May 2009 (UTC)
Well I propose we trial it for a while, and continue to seek comments on it. I don't expect it to be controversial because it is just hiding a row of information which is basically irrelevant anyway. There is some proposed code in the sandbox awaiting a check. — Martin (MSGJ · talk) 10:02, 21 May 2009 (UTC)
- I think we can do it like this, setting /importance to return "NA" when the rating is explicitly set to NA, and "nA" when it's set by default. Then we can make the distinction I wanted, and only hide importance ratings when they're not explicitly set. I've had a look through the hooks; I think the only place where it'll have an effect is /hooks/qualimpintersect, where I've already armoured the parameters against the change. We'll need to use ucfirst: in the same way for displaying the importance rating in the header, above; that's no big deal. Thoughts? Happy‑melon 14:54, 21 May 2009 (UTC)
- Well the physics projects sets its importance rating to NA-class manually/by bot. This is sort of a paranoid protection against people who might be tempted to assess templates, categories, etc... That being said, there is nothing lost by not displaying the "NA", IMO. Headbomb {ταλκκοντριβς – WP Physics} 15:09, 21 May 2009 (UTC)
- I really can't see why we would want to distinguish between automatic NA and imposed NA. — Martin (MSGJ · talk) 15:11, 21 May 2009 (UTC)
I have implemented the simplified version. Yes, there are thousands of category talk pages which are bot-created with class=NA/Cat, importance=NA, and the reason for this I suppose, is that the previous version of the banners did not automatically classify as NA. Therefore I see no reason to treat these any differently. — Martin (MSGJ · talk) 13:02, 26 May 2009 (UTC)
- Meh :D It's not exactly an earth-shattering change... Happy‑melon 14:07, 26 May 2009 (UTC)
New hook for custom importance scales
There were more and more projects wanting to use weird and wonderful importance ratings, so I have built a hook /customimportance for this purpose. Just to let you all know. — Martin (MSGJ · talk) 12:31, 26 May 2009 (UTC)
- Many thanks for that ! SyG (talk) 09:02, 28 May 2009 (UTC)
Can one of you guys have a look at this banner? The "to-do" list is not collapsing on article talk pages (see Talk:2011 World Amateur Boxing Championships), which I'm guessing is something to do with the recent changes to NOTES & C_NOTES. Cheers! PC78 (talk) 11:09, 29 May 2009 (UTC)
- I think it was an error on their todo list Template:WPB Announcements. A table was opened but not closed. I've removed the table entirely from that page, should be fixed. — Martin (MSGJ · talk) 11:30, 29 May 2009 (UTC)
- You sure? I'm still seeing the uncollapsed list on the talk page I linked above. PC78 (talk) 11:49, 29 May 2009 (UTC)
Try purging?— Martin (MSGJ · talk) 11:58, 29 May 2009 (UTC)- Interesting. This looks fine on Mozilla, but does not collapse on IE. — Martin (MSGJ · talk) 12:00, 29 May 2009 (UTC)
- You sure? I'm still seeing the uncollapsed list on the talk page I linked above. PC78 (talk) 11:49, 29 May 2009 (UTC)
This seems to affect all transclusions of the to-do hook in which the class parameter is not defined. Specifying the class seems to fix it! Otherwise the [show] button doesn't even appear. Hmm. — Martin (MSGJ · talk) 12:09, 29 May 2009 (UTC)
- Funnily enough the code for the new collapsed section contains a comment "TO FIX IE", which suggests that H-M was expecting something to go wrong here. I'll leave it for him to work out. There's nothing wrong with the todo hook as far I can see. — Martin (MSGJ · talk) 12:23, 29 May 2009 (UTC)
- and there also seems to be an extra td in the same line. — Martin (MSGJ · talk) 12:31, 29 May 2009 (UTC)
- Do you mean whenever
|TODO_STLE=
is not set? Happy‑melon 13:37, 29 May 2009 (UTC)- No! I mean this one on the core. — Martin (MSGJ · talk) 14:16, 29 May 2009 (UTC)
- Anyway, that didn't fix the issue. We've still got banners
- with sections which should be collapsed but no show/hide button appearing
- with collapsed sections which are uncollapsed by default (and showing the "hide" button)
- Please install internet explorer, then you can see it! — Martin (MSGJ · talk) 14:22, 29 May 2009 (UTC)
- I was referring to your 12:09 post, "in which the class paramter is not defined"; seems very bizzarre otherwise. Although I see where you're coming from; the presence of the
|class=
parameter does affect the structure of the header row. - Although I do tend to forget, I do still have IE... do remind me of that fact from time to time :D I see the issue on WPKorea, although I have no idea off the top of my head what's going on there... I'll have a poke. Happy‑melon 14:53, 29 May 2009 (UTC)
- Sorry for not being clear. I was talking about the class parameter of the template. Setting it causes the table to collapse as normal on IE. — Martin (MSGJ · talk) 15:00, 29 May 2009 (UTC)
Fixed. Stupid piece of crap that calls itself a browser... :D Happy‑melon 16:23, 29 May 2009 (UTC)
- Don't think it is ... This is still a mess on IE. — Martin (MSGJ · talk) 17:43, 29 May 2009 (UTC)
Fixed ??? Happy‑melon 11:05, 31 May 2009 (UTC)
- Don't think it is ... This is still a mess on IE. — Martin (MSGJ · talk) 17:43, 29 May 2009 (UTC)
- Sorry for not being clear. I was talking about the class parameter of the template. Setting it causes the table to collapse as normal on IE. — Martin (MSGJ · talk) 15:00, 29 May 2009 (UTC)
- I was referring to your 12:09 post, "in which the class paramter is not defined"; seems very bizzarre otherwise. Although I see where you're coming from; the presence of the
- Do you mean whenever
The show/hide on the Korea banner seems to be broken again. PC78 (talk) 13:29, 29 May 2009 (UTC)
- Broken how? Doesn't collapse in IE? Or is it a different issue? Happy‑melon 13:37, 29 May 2009 (UTC)
- All related to the same problem I think. — Martin (MSGJ · talk) 14:22, 29 May 2009 (UTC)
- Well this one's not fixed, so perhaps not? Happy‑melon 16:23, 29 May 2009 (UTC)
- It collapses correctly when I copy the content to Special:ExpandTemplates. That's just taking the piss :D Happy‑melon 16:30, 29 May 2009 (UTC)
- All related to the same problem I think. — Martin (MSGJ · talk) 14:22, 29 May 2009 (UTC)
Well done chaps, it all looks good to me in both IE and FF. :) PC78 (talk) 12:27, 30 May 2009 (UTC)
- Martin's example above is still broken for me on IE7/Vista. Is it for you? Happy‑melon 10:42, 31 May 2009 (UTC)
- Ok, I think I might have fixed it; but I have no faith in it to stay fixed any more, so do let me know if you spot anything else not collapsing when it should... Happy‑melon 11:05, 31 May 2009 (UTC)
- Just to confirm that it's all looking good now, and any explanation you can offer as to how you fixed it and what causes this error would be helpful, just in case you are not around next time it happens! Also, do we know why it only happened with unassessed articles? — Martin (MSGJ · talk) 18:41, 31 May 2009 (UTC)
I'm not entirely convinced that it's fixed, what with the ongoing discusison at TT:WPBS, but that seems to be tangentially connected.
Ok, whistlestop tour of WPBM header structure... The challenge in redesigning the header was to get a reliable 50% division in the header row, whilst still having the show/hide button float correctly to the right. The show/hide JavaScript adds the button to the first <th>
cell it encounters, so splitting the header row up into multiple cells would normally result in the button appearing midway across the row. There's also the need to have more than one cell in the row, or the 100% width declaration in the mbox-text class doesn't properly push the box out to its maximum allowed width. Our infamous width issue is a myserious bug whereby this feature also doesn't work when the cell with mbox-text class has colspan=3, but that's another issue :D
The very first implementation just had the project link, taskforces and assessment all together as freeflowing text in one th cell, with a {{td}}
providing the second cell (the outer table of WPBM actually only has two rows; all the contents of the banner proper are inside a second nested table). However this was pretty hideous, and I had for a long time on the todo list "fix header alignment/linewrapping/general awfulness"... The second generation still had all the content in one cell, but everything other than the collapse button was inside another nested table. However, this was a pain because the nested table couldn't be given 100% width (or it linewrapped to underneath the show/hide button), which meant trying to specify fixed widths to the cells inside failed horribly on several browsers; this was the Safari and Chrome bug we had a while back.
The third and most recent implementation throws all of that out the window. I was looking at the code and realised that all this time, the show/hide button hadn't been applying to the first cell in the row; the whole way through we'd had a {{td}}
to get the mbox magic. But because the cell generated by that template is a <td>
and not a <th>
, it was being ignored by the JavaScript. So this generation applies that principle to the header. Now there are two full-width cells in the header row (plus a tiny {{td}}
), but the first one (which contains the project link and taskforces) is not a th, it's a td with font-weight:bold. Only the second one (with the assessment rating) is a th. That's the case if quality assessments are used by the banner, anyway; otherwise the header is still one th with colspan=2.
Now to the bug. With the way we show assessments in the collapsed banner (ie not showing "(Rated ???-Class)") the th in the header row is empty if |class=
is not set. The CollapsibleTables JavaScript coughs and dies on IE when it's asked to add a show/hide button to an empty th, for some unknown reason. We realised this over at Common.js, and the fix is to ensure that the empty th is made not empty, by adding a hidden span or something. I killed two birds with one stone here on WPBM by filling the hidden span with useful machine-readable metadata, with which one can do interesting things with JavaScript. But I realised a few days ago (when one of said scripts broke) that the position meant that the metadata was only being included if the project used a quality scale! So I moved it such that it would always be available. Which of course left the cell empty again (serves me right for removing the "this fixes IE" comment), and in came the bug reports above :D I recognised the bug symptoms and reinserted the fix, but with a crucial difference: the span I added had no actual content other than an HTML comment. And as I've found through experimentation today... Tidy eats empty spans, so it wasn't making it into the final output. I'm not sure why the problem went away on the testcases I checked after adding the empty span, but that was my over-optimistic 16:23 post above. Adding an nbsp into the span forces it to display in all its invisible glory, and fixes the problem properly. Happy‑melon 19:24, 31 May 2009 (UTC)
- Wow, thanks. This may take some digesting ... — Martin (MSGJ · talk) 21:00, 31 May 2009 (UTC)
- So empty table cells are always problematic? Or just ones in the header with the show/hide button? — Martin (MSGJ · talk) 21:01, 31 May 2009 (UTC)
- Only when the CollapsibleTables JS tries to stick a show/hide button in them. Happy‑melon 08:50, 1 June 2009 (UTC)
Bad assignment to unassessed
Changes over the last day (or so) are now meaning that numbers of our projects (WP:Novels) articles are being assigned to Unassessed see "Category:Unassessed Fantasy fiction articles" as an example. all of these are assessed, at least as far as the "class" is concerned. This should not be happening. Please fix urgently. :: Kevinalewis : (Talk Page)/(Desk) 13:31, 31 May 2009 (UTC)
- In {{WPBannerMeta/hooks/taskforces/core}}, the QUALITY parameter is wrong and class is not been passed through for tf 3 & tf 4. -- WOSlinker (talk) 13:57, 31 May 2009 (UTC)
- So is anyone able to sort this out for us then as I don't understand this new template code and I am not an admin and have now access anyway. :: Kevinalewis : (Talk Page)/(Desk) 15:02, 31 May 2009 (UTC)
- I've put in an {{editprotected}} request on Template talk:WPBannerMeta/hooks/taskforces/core -- WOSlinker (talk) 15:16, 31 May 2009 (UTC)
Fixed now. Sorry about this; I'm really not sure how that crept in. — Martin (MSGJ · talk) 16:31, 31 May 2009 (UTC)
- Partly because I assumed they were carbon-copies and only checked that the numbers were incremented correctly; I completely missed that error, so my apologies too. Happy‑melon 18:32, 31 May 2009 (UTC)
I wanted to know if the following is possible?
I was thinking, instead of having a photo for the dermatology icon (as it is hard to find a great derm photo that scales down nicely) could we have that space read something like "DERM" inside a colored box? Similar to how the class and importance scale information is displayed?
Is this functionality available, and, if not, could someone add it? ---kilbad (talk) 20:50, 31 May 2009 (UTC)
- You would have to make an image of the text, if that makes sense. — Martin (MSGJ · talk) 20:59, 31 May 2009 (UTC)
- Like it? File:DERM.gif No, well, probably not. But there are some nice tools out there ... — Martin (MSGJ · talk) 21:46, 31 May 2009 (UTC)
- Cleaning up the image inclusion syntax is on the todo list; I'm looking at
{{image}}
, which has nice features we could use. You could use that to include text instead of images, but only if the text is linked (ie, the first character is "["). That's better than nothing, though. Happy‑melon 09:13, 1 June 2009 (UTC)
- Cleaning up the image inclusion syntax is on the todo list; I'm looking at
Requesting a sanity-check on applying this diff to Template:WPBannerMeta/importancescale. Thanks, — Martin (MSGJ · talk) 20:50, 7 May 2009 (UTC)
- That looks sane to me. Mind you... :D Happy‑melon 21:50, 7 May 2009 (UTC)
- Ha ha.
Done. — Martin (MSGJ · talk) 21:56, 7 May 2009 (UTC)
- Ha ha.
Requesting check for applying this diff to Template:WPBannerMeta. As {{WPBannerMeta/importance}} interprets ¬ the same as blank, this shouldn't have any effect at this stage. My idea eventually is to deprecate IMPORTANCE_SCALE. But before that can happen, we need to track which banners pass importance but don't use importance. Thanks, — Martin (MSGJ · talk) 21:38, 10 May 2009 (UTC)
- Yes, that should be ok. Happy‑melon 22:58, 10 May 2009 (UTC)
- I think I'm about ready to replace {{#if:{{{IMPORTANCE_SCALE|}}}| with {{#ifeq:{{{importance|}}}|¬||. The job queue seems to have been lightening fast recently (I populated category of 2000 in less than 2 mins a couple of days ago) so I'm reasonably sure that there are no more banners which pass importance and don't use the importance scale. I might look at doing something similar with taskforces and hooks later. (Think I've finally got the hang of ¬, woohoo!) — Martin (MSGJ · talk) 13:55, 13 May 2009 (UTC)
Done, seems to be working. — Martin (MSGJ · talk) 21:08, 13 May 2009 (UTC)
- I think I'm about ready to replace {{#if:{{{IMPORTANCE_SCALE|}}}| with {{#ifeq:{{{importance|}}}|¬||. The job queue seems to have been lightening fast recently (I populated category of 2000 in less than 2 mins a couple of days ago) so I'm reasonably sure that there are no more banners which pass importance and don't use the importance scale. I might look at doing something similar with taskforces and hooks later. (Think I've finally got the hang of ¬, woohoo!) — Martin (MSGJ · talk) 13:55, 13 May 2009 (UTC)
I think we're ready to roll this out to the 5 main taskforces as well now. Does anyone have any concerns about this? In a nutshell, the switch for the importance scale will be whether or not an importance parameter is passed or not, and the IMPORTANCE_SCALE parameter becomes redundant. — Martin (MSGJ · talk) 10:04, 15 May 2009 (UTC)
- As long as we're happy that there aren't any parameters being passed when they shouldn't be, and so we're not going to accidentally activate any importance scales. Happy‑melon 10:18, 15 May 2009 (UTC)
- Yes, I'm happy ;) — Martin (MSGJ · talk) 11:40, 15 May 2009 (UTC)
Done, now for the taskforce hook ... — Martin (MSGJ · talk) 12:26, 18 May 2009 (UTC)
- Yes, I'm happy ;) — Martin (MSGJ · talk) 11:40, 15 May 2009 (UTC)
Request for a code-check on Template:WPBannerMeta/hooks/taskforces/sandbox please. Main changes/benefits are:
- Removal of duplication of code for live and templatepage versions.
- Avoidance of calling {{WPBannerMeta/class}} 10 times through the use of a core.
- Deprecation of the IMPORTANCE parameters, as per the main template.
Thanks, — Martin (MSGJ · talk) 17:46, 29 May 2009 (UTC)
- Looks good to me, my edit was just code layout tweaks. I'm sure it could be simplified/optimised further (the double parsers in the core look like a ripe target), but it'll only make the code less readable. Happy‑melon 18:05, 29 May 2009 (UTC)
- Forgot to say that it's implemented on Template:ChristianityWikiProject/sandbox, and I can't see any problems either. I thought for a long time about how to do this efficiently, but if you can do it more simply then great. — Martin (MSGJ · talk) 18:17, 29 May 2009 (UTC)
- I didn't say I could do it more simply: if I were forced to optimise it further, I'd probably do something wierd like move the yesno templates in the main hook to the parameter names, thereby recovering the defined/undefined nature of the trigger parameters; and use that to remove the double parsers in the core. But that's just stupid :D Happy‑melon 18:44, 29 May 2009 (UTC)
- Forgot to say that it's implemented on Template:ChristianityWikiProject/sandbox, and I can't see any problems either. I thought for a long time about how to do this efficiently, but if you can do it more simply then great. — Martin (MSGJ · talk) 18:17, 29 May 2009 (UTC)
Done, and error fixed thanks to WOS. I think we can now remove the calls to the importance mask from Template:WPBannerMeta/taskforce now as importance is pre-normalised. — Martin (MSGJ · talk) 17:16, 31 May 2009 (UTC)
- Yeah, /core and /hooks/taskforces are the only valid entry points; anything else that breaks is because someone's not doing it properly. Happy‑melon 08:49, 1 June 2009 (UTC)
Done. Fixed a couple of small errors as well: a switch that looked as though it should be an ifeq, and a | missing in the MAIN_CAT conditional. — Martin (MSGJ · talk) 14:22, 1 June 2009 (UTC)
- That #switch looks like it's (or should be) a class test; is there any reason we can't switch based on class rather than namespace? And avoid "this article..." on redirects, dabs, etc? Happy‑melon 14:51, 1 June 2009 (UTC)
- I've been thinking about making a template to show something more descriptive here. Such as file, disambiguation page, etc. — Martin (MSGJ · talk) 10:27, 3 June 2009 (UTC)
- That #switch looks like it's (or should be) a class test; is there any reason we can't switch based on class rather than namespace? And avoid "this article..." on redirects, dabs, etc? Happy‑melon 14:51, 1 June 2009 (UTC)
WPBannerMeta/taskforce
The last edit to WPBannerMeta/taskforce added an extra | into the #if for MAIN_CAT, so now the taskforce MAIN_CATs are only shown if category=no. Can it be fixed. Thanks -- WOSlinker (talk) 12:27, 3 June 2009 (UTC)
- Oops, what was I thinking?
Fixed — Martin (MSGJ · talk) 13:01, 3 June 2009 (UTC)
Standard or not?
Is it recommended to use WPBannerMeta in project templates isntead of the own project code? Starting this thread due to this discussion. SkyBonTalk\Contributions 14:56, 4 June 2009 (UTC)
- There's certainly no mad axeman waiting outside to butcher a project that doesn't use it, but I certainly would recommend it (you're probably in the wrong place if you were expecting a different answer :D). I can usually come along and write a list of at least ten things that are 'wrong' with any particular banner coding-wise, and people usually now have a hell of a time to find something that WPBM can't do (or can't be made to do, as long as the thing actually makes sense in the first place). Happy‑melon 15:28, 4 June 2009 (UTC)