Module talk:WikiProject banner/Archive 4
![]() | 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 2 | Archive 3 | Archive 4 | Archive 5 | Archive 6 | → | Archive 10 |
Why do we need Listas?
I understand the purpose of listas, so that talk pages are properly categorized. However, since it seems to be causing a fair bit of trouble in some instances and, in my opinion, isn't widely used enough to make sense, couldn't DEFAULTSORT just be used on all the pages, separating the sorting function from the WikiProject Banners? The DEFAULTSORT could go at the page top, to avoid getting mixed in with other text. -Drilnoth (talk) 03:25, 26 February 2009 (UTC)
{{{small}}} and template length
Is there any way to make text display differently based on whether or not it has the |small=yes
parameter? The template in question is {{D&D}} (just trying to give Martin some more fun :) ), and at WT:DND it looks really bad because of its length. Could there be some kind of |SMALL_TEXT
parameter for when designing templates so that shorter text can be used when the banner is "small"? Thanks. -Drilnoth (talk) 03:25, 26 February 2009 (UTC)
- This was actually something that I was going to propose once. However the small form is not so widely used so I am not sure if it's worth it. In the meantime you can do it manually using a parser function, for example [1]. Martinmsgj 09:32, 26 February 2009 (UTC)
- Ah... thanks. I wasn't completely sure whether or not that would work in combination with the Meta template. -Drilnoth (talk) 14:49, 26 February 2009 (UTC)
- Since this can be so easily set by doing {{#if:{{{small|}}}| Small text | Big text }}, and could be justifiably applied to all the text parameters (
|TF_4_SMALL_TEXT=
anyone?) it makes infinitely more sense to do it as shown above. Vis number of small banners, Category:Small talk page templates is currently only populated by WPBannerMeta banners. I'm seriously considering unsupporting small altogether, although I know that will raise a lot of hackles. Happy‑melon 18:22, 28 February 2009 (UTC)
- Since this can be so easily set by doing {{#if:{{{small|}}}| Small text | Big text }}, and could be justifiably applied to all the text parameters (
- Ah... thanks. I wasn't completely sure whether or not that would work in combination with the Meta template. -Drilnoth (talk) 14:49, 26 February 2009 (UTC)
Taskforce hook and hide subpage
I recently implemented {{WPBannerMeta}} on {{WPMED}}, and I came across two inconsistencies in this template involving the taskforce hook. First, when task forces are specified using the hook, category checks are not done to insure their existence. I would expect the error messages to be displayed for missing categories, just as they are for task forces used by the built-in parameters. Second, after I added the /hide subpage to suppress the category error messages, the task forces specified using the hook are no longer displayed at {{WPMED}}. Everything still appears to function properly, but it would be nice to display all of the available task forces when looking at {{WPMED}}. --Scott Alter 22:03, 27 February 2009 (UTC)
- Regarding your first point, this is not something that is supported yet. Until recently there were no checks done on taskforce categories at all. Now the main 5 are checked. What you can do in the meantime is rotate their positions in the sandbox to check 5 at a time.
- About the second point, this seems weird and unintended. I'll look into it. Martinmsgj 22:20, 27 February 2009 (UTC)
- It wasn't connected to /hide. It was just a BANNER_NAME paramter incorrectly set. I've fixed it for you. Martinmsgj 22:29, 27 February 2009 (UTC)
- Thanks for fixing that. I'm pretty sure that all of the task forces were displayed before I created the hide subpage, but since it is working now, I guess it doesn't really matter. --Scott Alter 22:35, 27 February 2009 (UTC)
Doing sanity-checks for things added by hooks is probably possible, but certainly rather complicated. I'll have to have a think about it... Happy‑melon 18:25, 28 February 2009 (UTC)
Migrating Template:WPAVIATION
I would like to switch Template:WPAVIATION over to this code. The only thing stopping me from already having done this is the fact that out b-class checklist has only 5 items, the same as the Military history checklist, and not the 6 I thought the meta required. But I just found Template:WPBannerMeta/class and am wondering if I'm reading it right. Can it be used to incorporate our style of checklist? - Trevor MacInnis (Contribs) 20:25, 19 February 2009 (UTC)
- Yes, you can implement it with the five items. Alternatively you could use six items but set the 6th to "yes" by default so that the existing articles are not affected. That might be confusing though. Martin 21:04, 19 February 2009 (UTC)
- Actually, looking at Template:WPBannerMeta/class, it doesn't look like the 6th parameter is currently checked for the B class assessment. That might be a bug in the WPBannerMeta code. For more complicated banners such as WPAVIATION, it's alway good to start the changes in a sandbox version first and see how it goes. -- WOSlinker (talk) 21:14, 19 February 2009 (UTC)
- That is indeed a bug, now
Fixed. How well do the 5 milhist criteria map onto the 6 WP1.0 criteria? Happy‑melon 22:42, 19 February 2009 (UTC)
- It looks like it's just that they don't use b6. -- WOSlinker (talk) 08:02, 20 February 2009 (UTC)
- That is indeed a bug, now
- Actually, looking at Template:WPBannerMeta/class, it doesn't look like the 6th parameter is currently checked for the B class assessment. That might be a bug in the WPBannerMeta code. For more complicated banners such as WPAVIATION, it's alway good to start the changes in a sandbox version first and see how it goes. -- WOSlinker (talk) 21:14, 19 February 2009 (UTC)
An option in core to use a custom bchecklist, just like the custom class would would (I think). Change
{{#if:{{{B_CHECKLIST|}}}| {{WPBannerMeta/bchecklist|class={{{class|}}}|b1={{{b1|}}}|b2={{{b2|}}}|b3={{{b3|}}}|b4={{{b4|}}}|b5={{{b5|}}}|b6={{{b6|}}} }} }}
To
{{#if:{{{B_CHECKLIST|}}}|{{#ifexist:{{{BANNER_NAME}}}/bchecklist |{{ {{{BANNER_NAME}}}/bchecklist|class={{{class|}}}|b1={{{b1|}}}|b2={{{b2|}}}|b3={{{b3|}}}|b4={{{b4|}}}|b5={{{b5|}}}|b6={{{b6|}}} }} |{{WPBannerMeta/bchecklist|class={{{class|}}}|b1={{{b1|}}}|b2={{{b2|}}}|b3={{{b3|}}}|b4={{{b4|}}}|b5={{{b5|}}}|b6={{{b6|}}} }} }} }}
-- WOSlinker (talk) 08:11, 20 February 2009 (UTC)
- It would be kinder to write a hook for
|HOOK_IMPORTANCE=
rather than add another #ifexist: call to all million-odd transclusions. This is the first project other than MilHist that I've seen to use the 5-point scale. Happy‑melon 08:47, 20 February 2009 (UTC)
- WikiProject Films and WikiProject Comics also use the 5-point scale. :) PC78 (talk) 16:49, 20 February 2009 (UTC)
The template is almost ready for the changover, but there is just one issue (that I can see) that needs fixing. The hooks for collaboration and peer review are not giving the links I'm looking for. The "currently" link in the peer review doubles the subject page name, so the link is [[Wikipedia:WikiProject_Aviation/Peer_review/SUBJECTPAGENAME/SUBJECTPAGENAME]]. The same happens in the "archived" link, and the "candidate" link in the collaboration hook. - Trevor MacInnis (Contribs) 18:39, 1 March 2009 (UTC)
- I've made a change to the sandbox banner & that should be fixed now. -- WOSlinker (talk) 19:33, 1 March 2009 (UTC)
Issues to fix
I've found a few issues while trying to convert the aviation banner to this format:
- the b-class checklist allow you to enter random text into the 6 items and still get a b-class assessment, even though the items are still not checked off.
- "y" and "n" seem to work for some items (notes, collaboration, etc) but not for other (bclass checklist, taskforces). Our banner curently uses a subpage Template:WPAVIATION/YesNo that allow for a variety of entries (y, yes, Yes, YES, etc), can this be incorporated somehow? - Trevor MacInnis (Contribs) 03:05, 26 February 2009 (UTC)
- I've just looked at the code to give you a definitive answer. As things stand:
- For notes, any value except no, No, NO, or nO or a blank will result in a "yes";
- For taskforces, any value will result in a "yes" (even "no"!) So you have to leave it blank or undefined to get a "no". We could look at changing this maybe.
- For the B-class checklist:
- yes, Yes, yEs, yeS, etc. produce "criterion met"
- No, no, NO, nO produce "criterion not met"
- Anything else or blank value produces "not checked"
- Hope this helps, Martinmsgj 09:27, 26 February 2009 (UTC)
Sounds good. There are a few things I think the code guru's should check and fix though. You're correct that in the B-class checklist "Anything else or blank value produces "not checked"" in the checklist, but if you were to enter the "anything else" into all 6 parameters, say by copying and pasting the example code from the banner | b1 = <yes/no>
| b2 = <yes/no>
| b3 = <yes/no>
| b4 = <yes/no>
| b5 = <yes/no>
| b6 = <yes/no>
, this will result in the article assessment being automatically, and incorrectly, changed to "B-Class". It may not be a big issue...unless someone decides to auto tag articles, including the checklist for future use.
Secondly, I think "y" and "n" should be added to the list of accepted terms for "yes" and "no"- Trevor MacInnis (Contribs) 16:16, 27 February 2009 (UTC)
I am not able to replicate this error. Can you link to an example? Martinmsgj 16:30, 27 February 2009 (UTC)Oh, wait. I think I just did. I'll look further. Martinmsgj 16:32, 27 February 2009 (UTC)- Yes, this does seem to be an error. Well done for spotting it. Although the checklist display takes anything other than "no" to mean "yes", the actual calculation of the class takes anything other than "yes" to mean "no"! I think my code in Template:WPBannerMeta/class/sandbox will fix it. Can someone just check it? Martinmsgj 16:49, 27 February 2009 (UTC)
- I've been tagging articles for WP:MEASURE over the last couple of days. Our project banner (which uses the checklist) certainly wouldn't let me assess any articles at B-class until I'd filled out the checklist: they were automagically placed at C-class instead. I think that includes C-class articles where I left the checklist unfilled to come back to later, but I can't quickly find an example. On the other hand, the template lets me assess at any other class (including FA!) without a problem. Physchim62 (talk) 17:07, 27 February 2009 (UTC)
- Yes, this does seem to be an error. Well done for spotting it. Although the checklist display takes anything other than "no" to mean "yes", the actual calculation of the class takes anything other than "yes" to mean "no"! I think my code in Template:WPBannerMeta/class/sandbox will fix it. Can someone just check it? Martinmsgj 16:49, 27 February 2009 (UTC)
The error is only apparent if something other than yes or no is entered. For example setting b1-b6 as "gobbledygook" and class=b currently results in b-class. I might make one further suggestion, based on something I've seen other banners do. That if the 6 criteria are marked as satisfied, then the article is classified as B-class even if class=start or class=C. Any thoughts on this? Martinmsgj 17:13, 27 February 2009 (UTC)
- No. I think it's an important freedom of the project reviewer not to give B-class even if the criteria are fulfilled. Such a situation should be rare, but I don't think we should make it technically impossible. Physchim62 (talk) 21:42, 27 February 2009 (UTC)
- The changes you made in class/sandbox nearly work but the b1..b6 parameters need to be put though the lc: thingy somewhere. It may be better to do that in WPBannerMeta or core before it is passed over to class. -- WOSlinker (talk) 19:23, 27 February 2009 (UTC)
Fixed I hope. Thanks for the lc reminder. I couldn't avoid doing it twice though. It seems to be working correctly. If not, please let me know. Martinmsgj 22:07, 27 February 2009 (UTC)
- I've updated the example code in the class docs as well. -- WOSlinker (talk) 22:16, 27 February 2009 (UTC)
More on the B-class checklist
I've put a new version on the B-class checklist in the sandbox. It has the following two possible advantages:
- Gives warning of incorrect parameters. The following values are accepted:
- yes, y, 1 = criterion met
- no, n, 0 = criterion not met
- <yes/no>, yes/no, ? or (blank) = not checked
- Anything else = incorrect parameter warning
- It will accept an input of "unused" from the project banner in which case it will not display anything for that criterion. This might allow projects which use 5-point checklists to use the standard code instead of an extra hook. (But I'm not sure how to change the prompt which appears when no parameters are entered ...)
See my sandbox for an example. What do people think about this? Martinmsgj 14:05, 2 March 2009 (UTC)
- "NA" would be a better term than "not used". Happy‑melon 16:58, 3 March 2009 (UTC)
- Well, maybe, but NA often means "not article" rather than "not applicable", so that's why I tried to avoid it! Martinmsgj 17:39, 3 March 2009 (UTC)
Based on your idea I have implemented a "n/a" option so that if the reviewer of an article believes that a criterion is not relevant to an article, he/she can use "n/a" instead of "yes" and still award the B-class. (Of course this is only implemented on the default class mask and not on custom ones yet.) I still think an "unused" option might be useful when a project decides they won't use a particular criterion, and this would alleviate the need for the separate hook. But I think this needs some more thought to do properly. Martinmsgj 23:34, 3 March 2009 (UTC)
- That would allow the 5 item b-class checklist to merge into this, but it would need to have a way of having a specific item be "n/a" without having to enter it into every use. - Trevor MacInnis (Contribs) 23:39, 3 March 2009 (UTC)
- Yes, of course. The "unused" parameter, if implemented, would be passed by the project banner template, not the individual instances on talk pages. I think in this case it would be better if the unused criterion was hidden and not marked as "not applicable". Martinmsgj 23:49, 3 March 2009 (UTC)
Custom messages for class/importance
A while ago the physics banner linked to the project's guidelines for importance ratings, but this is not possible under the metabanner. Could custom messages be shown instead (I'm sure other projects would like to link to their own A/B class guidelines too)?Headbomb {ταλκκοντριβς – WP Physics} 20:07, 3 March 2009 (UTC)
- You can use the ASSESSMENT_LINK parameter to define what the "rated" link points to. Martinmsgj 22:13, 3 March 2009 (UTC)