Jump to content

Template talk:Class mask/Archive 1

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

What's this for?

The idea is that this template will make it easier for projects to create their own custom quality scales for use with their project banner. Eventually it may make sense to put this "inline" without needing a separate subpage. — Martin (MSGJ · talk) 09:35, 31 July 2009 (UTC)

forceNA option

I saw the todo list & I've added a forceNA option in the sandbox. -- WOSlinker (talk) 10:06, 6 September 2009 (UTC)

Looks good. — Martin (MSGJ · talk) 11:08, 6 September 2009 (UTC)
Ok, I've copied it over. I've also added future, current, needed & merge class options as well. Haven't updated the docs yet though. -- WOSlinker (talk) 11:32, 6 September 2009 (UTC)

FQS option

I've also added a FQS option in the sandbox. -- WOSlinker (talk)

Yes, I like the way you've done this because we can use things like |FQS=yes |project=no to give everything except Project-Class, can't we? — Martin (MSGJ · talk) 12:28, 6 September 2009 (UTC)
I didn't think of that when I added the FQS param but yes that should work. -- WOSlinker (talk) 12:36, 6 September 2009 (UTC)
Got a slight bug for you to fix. If |FQS=yes |file=yes it would be nice if the output was File rather than Image. — Martin (MSGJ · talk) 17:55, 6 September 2009 (UTC)
Would swapping the order of file & image in the switch statement fix it or would that introduce any other issues? -- WOSlinker (talk) 20:53, 6 September 2009 (UTC)
That might do it. I guess the first match in the switch will be output? — Martin (MSGJ · talk) 21:00, 6 September 2009 (UTC)
Seems to be working. — Martin (MSGJ · talk) 07:26, 11 September 2009 (UTC)

Weird stuff happening with the use of this template

When you guys put this on the Template:WikiProject Food and drink/class page, all of the assessments switched to unassessed. --Jeremy (blah blahI did it!) 03:18, 15 September 2009 (UTC)

Sorry, it's because I forgot to pass the class parameter! Fixed now. — Martin (MSGJ · talk) 06:04, 15 September 2009 (UTC)
I've added a warning box in case anyone makes this mistake again. — Martin (MSGJ · talk) 06:23, 15 September 2009 (UTC)

On a side note

Was it you guys that added the auto assessment icon? I got a kick out of the Bender-esque face on the assessment tags. --Jeremy (blah blahI did it!) 03:21, 18 September 2009 (UTC)

It was PC78 who suggested it at Template_talk:WPBannerMeta#Auto.3Dyes_is_a_bit_intrusive. -- WOSlinker (talk) 06:15, 18 September 2009 (UTC)

Why aren't redirects lumped with the FQS?

Is this normal? Also, there's an inconsistency in the documentation. Says FQS enables the 6 classes, but only lists five. Headbomb {ταλκκοντριβς – WP Physics} 23:12, 20 September 2009 (UTC)

FQS hasn't included Redirect since April. It was decided that too few projects needed it for it to be worth imposing on all projects. FQS enables the following six:
  • Image, Category, Disambig, Portal, Template, Project
— Martin (MSGJ · talk) 06:50, 21 September 2009 (UTC)

Questions

  1. Is this template designed specifically for {{WPBannerMeta}}, or can it be used by non-meta banners?
  2. I see support has been added for five additional sub-topics. Any chance of increasing this to ten?
  3. Hypothetically speaking, if I wanted A-Class assessments to be dependant on a successful A-Class review (in the same way that B-Class is dependant on a completed checklist), how feasible would it be to do it using this template? PC78 (talk) 23:07, 6 October 2009 (UTC)
Although it is currently only used by WPBM banners, the reason it was hived off is that it could be used by any banner. I think the answer to the last two questions are the same. If a feature would be useful to a significant number of projects then it can of course be implemented here. But if it is only likely to be of use to one or two projects then I would say that it's probably not worth putting here. As it used by 1.6 million pages, performance is a consideration. What extra classes did you have in mind? — Martin (MSGJ · talk) 09:25, 7 October 2009 (UTC)
Say, for example, if a custom mask was doing something like:
a={{#ifeq:{{lc:{{{A-Class|}}}}}|pass|A}}
How easy would it be for this template to do something like that? PC78 (talk) 23:14, 7 October 2009 (UTC)
Well the first thing would be to alter Template:WPBannerMeta and Template:WPBannerMeta/class so that an A-class parameter is passed to custom class masks. As this function is unlikely to be used by more than a handful of projects (there aren't many that even use A-class) it's probably not worth adding it to this template though. — Martin (MSGJ · talk) 11:09, 8 October 2009 (UTC)

Disambiguation

The template should interpret "Disambiguation" as "Disambig". PC78 (talk) 18:15, 18 October 2009 (UTC)

Yes, probably. And Dab seems a likely one to keep, but I wonder if Disamb is used anywhere ... — Martin (MSGJ · talk) 19:54, 19 October 2009 (UTC)
{{editprotected}} Could Template:Class mask/core/sandbox be copied over to Template:Class mask/core. I've added the Disambiguation as asked for above & also tpl and img class aliases as used by the WikiProject Trains Banner. Thanks. -- WOSlinker (talk) 15:43, 26 October 2009 (UTC)
 Done — Martin (MSGJ · talk) 18:04, 26 October 2009 (UTC)

Common configurations?

 FA A GABCStartStub FL ALBLCLListSIAFutureCategoryDisambigDraft FMFileNeededPortalProjectRedirectTemplateUserNA???Total
0001438952,0875,6990000400000000000007,2425,73316,070

Is there any easy way of knowing which configurations people are using most often in class masks? The one I tend to see the most is the standard assessment scale plus Category, Disambig and Template, but it would be useful if there were some proper stats to look at. PC78 (talk) 19:06, 19 November 2009 (UTC)

See the template above. Pages in category reflect the number of subcategories (aka 31 means 31 projects and taskforces). Headbomb {ταλκκοντριβς – WP Physics} 21:03, 19 November 2009 (UTC)
Thanks, but that'snot really what I meant. I'm interested in what combinations the classess are used in, not how ofetn each one is used individually. PC78 (talk) 21:41, 19 November 2009 (UTC)
Think you'd find that FQS+redirect is the most common option. A lot of custom masks were created when Redirect-class was dropped from the default. — Martin (MSGJ · talk) 12:22, 20 November 2009 (UTC)

Improved syntax to support "unrecognised" classes

Perhaps we can do something similar to the way {{importance mask}} is coded to allow for any class to be supported by passing it as the name of a parameter. For example, if we used something like

{{#switch:{{lc:{{{class|}}}}}
...
 #default = {{yesno
  |1     = {{{{{lc:{{{class|}}}}}|}}}
  |yes   = {{ucfirst:{{{class|}}}}}
 }}
}}

that would allow |cheesecake=yes and Cheesecake-class will be implemented. — Martin (MSGJ · talk) 12:21, 19 November 2009 (UTC)

Possible code is now in Template:Class mask/sandbox. Needs checking and maybe simplifying ... Just one annoyance: It will currently only work for classes with an initial uppercase letter (e.g. Book). It would be great if it could work with others (e.g. SL) as well. — Martin (MSGJ · talk) 18:00, 19 November 2009 (UTC)
Would it be able to handle the namespace/pagename detect I added to {{Physics/class}} for Book and Project-Class? PC78 (talk) 18:30, 19 November 2009 (UTC)
With
{{#switch:{{lc:{{{class|}}}}}
...
 #default = {{yesno
  |1     = {{{{{lc:{{{class|}}}}}|}}}
  |yes   = {{{ {{lc:{{{1}}}}} }}}
 }}
}}
it is then possible for it to work with SL.
{{Class mask/sandbox|sl
|book=Book
|sl=SL
}}
-- WOSlinker (talk) 19:34, 19 November 2009 (UTC)
I've done something slightly more complex in the sandbox now, so that both |book=yes and |book=Book work. -- WOSlinker (talk) 19:51, 19 November 2009 (UTC)
Wow, that's genius! I think we can remove all the extra code for future-class, merge-class, etc. now. — Martin (MSGJ · talk) 22:43, 19 November 2009 (UTC)

The only possible refinement I can think of is to use uppercase parameter names for the new syntax and retain the lowercase ones for the current behaviour yes/no. It's not really important because there will never be a "yes-class"! But it might keep the syntax clearer? Could we use the same trick to allow some of the standard classes (e.g. A-class or C-class) to be switched off? — Martin (MSGJ · talk) 17:11, 20 November 2009 (UTC)

I think I've simplified things a bit. Do my changes look okay? If so I think we are ready to go ahead with this. However I think this template can be improved more in the future. — Martin (MSGJ · talk) 17:33, 22 November 2009 (UTC)
It doesn't appear to be working for SL-Class, if that's a concern. Also, you can't have multiple values for a class, so you couldn't use it for Bplus-Class if you wanted the banner to accept either "bplus" or "b+". PC78 (talk) 17:40, 22 November 2009 (UTC)
Thanks for the feedback but I don't think you're quite right. The new syntax now works in uppercase - see /testcases for an example of SL-class. Bplus can be done with something like the following. — Martin (MSGJ · talk) 17:48, 22 November 2009 (UTC)
{{class mask|{{{class|}}}
 |B+    = Bplus
 |BPLUS = Bplus
}}
Is everyone happy with this syntax (lowercase parameter just to switch it on with an initial capital letter, and uppercase to actually specify what the class is)? If so, I think we can implement. — Martin (MSGJ · talk) 16:43, 23 November 2009 (UTC)
 Done — Martin (MSGJ · talk) 21:34, 23 November 2009 (UTC)

If it's not too much of a dumb question, how does the template generate multiple custom classes? PC78 (talk) 00:15, 23 November 2009 (UTC)

Well, it only checks parameters which match the input. For example, if class=bAnAnA then it will check the parameter {{{BANANA}}} and if that isn't defined it will then check the parameter {{{banana}}}. Quite clever! — Martin (MSGJ · talk) 16:43, 23 November 2009 (UTC)

Namespace detection for custom classes

Ah, OK. What about namespace detections for the custom classes? PC78 (talk) 19:09, 22 November 2009 (UTC)
Do you mean your titleparts magic on Template:Physics/class? I'm not sure it would be a good idea on this template as it is special code only relevant to the book-class. And I can't think of any other custom classes which would require namespace detection. But anyway, can we do one thing at a time? :) — Martin (MSGJ · talk) 19:23, 22 November 2009 (UTC)
A namespace detect for User-Class would be useful too. It shouldn't matter that the titleparts code is only used for Book-Class. If this template is going to be used to implement Book-Class in banners, then there's no reason not to have it, otherwise books are going to end up with an incorrect default of Project-Class. PC78 (talk) 19:43, 22 November 2009 (UTC)
I've taken the liberty of moving this down as it is separate to the issue above and probably needs further discussion. — Martin (MSGJ · talk) 16:39, 23 November 2009 (UTC)
In general I remain opposed to adding code here for the benefit of few projects. User-class is used by two projects as far as I know, and Book-class is still only used by one. Unless these numbers change significantly, I don't think is unreasonable to expect them to code their own class masks. Let's see what other people think about this issue though. — Martin (MSGJ · talk) 16:46, 23 November 2009 (UTC)
OK, but isn't this whole change—clever though it may be—ultimately being done for the benefit of just a few projects? I'm only counting seven projects that use classes other than those already supported by this template. PC78 (talk) 17:42, 23 November 2009 (UTC)
Actually this will simplify the template a lot because it will mean we can take out the special code for Merge-, Future- and Current-class. — Martin (MSGJ · talk) 18:40, 23 November 2009 (UTC)
I think "a lot" may be overstating it a little. In order to remove the special code for the classes you mention, won't you need to find and update uses of those classes first? The /table subtemplate will need updating too, but we I guess can revisit the namespace issue if Book-Class takes off. PC78 (talk) 21:39, 23 November 2009 (UTC)

Inline usage

The documentation for WPBannerMeta says that inline masks should not be used if the banner uses any hooks, which seems to contradict what the documentation here says. Which is correct? PC78 (talk) 03:30, 26 November 2009 (UTC)

Any hook which uses the quality class, i.e. /taskforces or /qualimpintersect or /qualitycats. Because otherwise the code would need to be duplicated. PS Why are you editing at 3.30am? Couldn't sleep? :O — Martin (MSGJ · talk) 07:24, 26 November 2009 (UTC)
I'm a creature of the night. :) PC78 (talk) 12:09, 26 November 2009 (UTC)

On a semi-related note, can custom masks be used in the task force hook? PC78 (talk) 19:00, 26 November 2009 (UTC)

Only for QUALITY_SCALE at the moment as IMPORTANCE_SCALE hasn't been implemented yet. On the todo list though. -- WOSlinker (talk) 22:14, 26 November 2009 (UTC)

Banners not using this template

Here's a list of WPBannerMeta banners with custom classes that don't use this template:

Banner Mask Reason
{{Chemicals}} subpage no FA, GA, C, FL, List-Class
{{Composers}} subpage no C, FL-Class
{{Department of Fun}} inline Category, File, Project, Template, NA-Class only, Bottom-importance only
{{WikiProject Green Bay Packers}} subpage no C-Class
{{Pittsburgh Steelers project}} subpage no A-Class
{{WPAFC-admin}} inline Category, File, Project, Template, User, NA-Class only
{{WPAVIATION}} subpage customised assessments relating to the B-Class checklist
{{WPCATSUP}} subpage Category, File, Project, Template, User, NA-Class only
{{WPMeasure}} subpage no FA, GA, FL-Class
{{WikiProject Editing trends}} subpage Category, Image, Project, Template, User, NA-Class only
{{WikiProject Ethiopia}} subpage no C or FL-Class
{{WikiProject Firearms}} subpage Deferred-Class
{{WikiProject Heraldry and vexillology}} subpage no C or FL-Class
{{WikiProject Israel}} subpage no FL-Class
{{WikiProject Lists}} subpage Stub, FL, List, Category, Disambig, Image, Portal, Project, Template, NA-Class only
{{WikiProject Philately}} subpage no FL-Class
{{WikiProject Pokémon}} subpage no FL-Class
{{WikiProject Republic of Macedonia}} subpage no C-Class
{{WikiProject Xbox}} subpage no FL-Class

I'm not sure why some of these don't already use {{class mask}} -- perhaps I missed something in the code? It was suggested above about adding parameters for all classes, so hopefully the above data will be of use in that regard. PC78 (talk) 00:50, 29 November 2009 (UTC)

Thanks for this. The main reason that not all custom masks use this template is that it was never seriously deployed, it just sort of crept in. There are various things about this template which I am not yet happy with. Apart with the fundamental issue with the class parameters which I am still mulling over, I am rather dissatisfied with the current implementation for B-class checklists. The current set up, with half of the code in WPBannerMeta/class and the other half here, is confusing and does not lend itself well to automatic documentation. Luckily there are not too many banners which use it, so it won't be too much work to change them all! — Martin (MSGJ · talk) 23:15, 29 November 2009 (UTC)
At the last count, 347 Template namespace transclusions of {{class mask}}. PC78 (talk) 23:45, 29 November 2009 (UTC)

Further improvements and simplifications

So the recent developments seem to be working and I am looking at further improvements in the same vein:

  • Adding parameters for all classes so that the standard ones may be switched off, e.g. |A=no would turn off A-class.
  • With the number of required parameters decreasing, perhaps it would be simpler if the template was de-cored.
  • We will need a separate template for the documentation. I'm thinking about moving /table to /templatepage as this would be more logical. And the documentation could be called automatically using noinclude - something like
{{class mask<noinclude>/templatepage</noinclude>|{{{class|}}}
 |topic = etc.
}}
  • Unfortunately that will mean changing a lot of templates, but it would have the advantage that the main template can be simplified a lot. — Martin (MSGJ · talk) 17:38, 24 November 2009 (UTC)
No objection to the further refinements of the template, but I do have the following questions:
  1. Is support for |redirect=, |future=, |current=, |merge= and |needed= to ultimately be removed in favour of the new unnamed parameters? Do we need a tacking category for these?
  2. Will the table be able to support the new unnamed parameters?
  3. How feasible will it be to add namespace detection for Book-Class and User-Class if/when they become more widely used?
Since we seem to be heading towards using this template for pretty much all custom masks, it should be preferable to provide as much functionality and flexibility as possible. PC78 (talk) 18:01, 24 November 2009 (UTC)
  1. Future, current and merge have already been removed from /core. I have only left them on the main template for the time being for the benefit of /table. I hesitated with Redirect and Needed because these behave a little differently. If these classes are used when they are not in use, the mask will default to NA-Class rather than Unassessed (with the logic that we can at least say they are not articles). The other non-article classes (e.g. Disambig) work in the same way.
  2. Yes, but we will need to recode it so that it checks all possible classes.
  3. I don't foresee any technical difficulty in that.
I agree with you, with the usual caveat that we don't complicate the template for the benefit of very few projects. — Martin (MSGJ · talk) 18:09, 24 November 2009 (UTC)
Should the mask not default to NA if Merge-Class is unused? AFAIK it's typically used for redirects of merged articles. PC78 (talk) 18:30, 24 November 2009 (UTC)
Really? I always thought it was for articles that need merging with another article. — Martin (MSGJ · talk) 18:35, 24 November 2009 (UTC)
That's how I've always looked at it. I could be wrong though, it's not something I've had much involvement with. PC78 (talk) 18:57, 24 November 2009 (UTC)

Here's a hypothetical question for you (if it's not too o/t): if a Topic-Class was created at some point in the future, how much would it screw with templates like this that use a |topic= parameter? :D PC78 (talk) 20:11, 24 November 2009 (UTC)

Haha. Luckily |TOPIC=Topic would work! But an interesting question. — Martin (MSGJ · talk) 21:29, 24 November 2009 (UTC)
Oh s**t, try typing |class=FQS into any WPBannerMeta template ... :S — Martin (MSGJ · talk) 21:31, 24 November 2009 (UTC)
? I don't see a problem. PC78 (talk) 21:33, 24 November 2009 (UTC)
We need to rethink the syntax because any banner using the |FQS=yes has effectively enabled yes-class. Look:
WikiProject iconArticles for creation Unassessed
WikiProject iconThis article was reviewed by member(s) of WikiProject Articles for creation. The project works to allow users to contribute quality articles and media files to the encyclopedia and track their progress as they are developed. To participate, please visit the project page for more information.
???This article has not yet received a rating on Wikipedia's content assessment scale.
Would changing |FQS= to |fqs= make a difference? PC78 (talk) 21:50, 24 November 2009 (UTC)
Hmm, well lowercase parameter names will interfere with the lowercase syntax and uppercase ones will interfere with the uppercase syntax. There a few ways to avoid this problem, such as:
  • Make the parameters which are not related to classes have mixed capitalisation (e.g. like forceNA)
  • Append something like -class to all the class parameters. So |redirect=yes would become |redirect-class=yes.
But both would require a lot of work to change over. So maybe it's better just to change the uppercase syntax which has just been implemented (and accept that |topic=yes will never work). I'll keep thinking about this. — Martin (MSGJ · talk) 22:03, 24 November 2009 (UTC)

Not too difficult to fix. Just needed to filter out some values before passing through to custom. See sandbox change. Does mean though that you can't have a FQS class. -- WOSlinker (talk)

Sure, we could do it that way. It's just not a very clean way to code the template ... — Martin (MSGJ · talk) 21:33, 25 November 2009 (UTC)

I've moved /table to /templatepage as I proposed above and I have started the process of recoding it so that it doesn't depend on the main template. (This will enable the syntax above to be used and so the documentation for Book-class and other custom classes should start to work.) However it's not perfect just yet. — Martin (MSGJ · talk) 10:47, 5 December 2009 (UTC)

Adding Book-Class to the class mask

{{edit protected}} This will be used to tag Wikipedia Books for the various wikiprojects. I wanted to add this to the physics banner, but apparently the banner uses this class mask to generate classes (and others projects will most likely want to as well in the near future). Could someone update the class-mask accordingly? Headbomb {ταλκκοντριβς – WP Physics} 02:31, 17 November 2009 (UTC)

This template is only intended to cater for widely used classes. If it becomes widely used in the future, then we could certainly add it here, but for now I suggest adding it to the custom class at Template:Physics/class. (Yes, you wouldn't be able to use this template anymore.) — Martin (MSGJ · talk) 08:15, 17 November 2009 (UTC)
Alright so how do I do that? Adoption would be greatly simplified however, if it was done through this template. I also don't see the point of purposefully limiting the use of the class mask. Enabling by default would certainly be overkill, but I can see of no negative aspect to having it bundled up with the rest of them. Headbomb {ταλκκοντριβς – WP Physics} 08:42, 17 November 2009 (UTC)
I think PC78 has now done this for you. The idea is that {{class mask}} is suitable for 99% of projects and is as simple and efficient as possible. Therefore we don't add classes which are used by just one or two projects. (For example Template:WikiProject Plants/class doesn't use this template because they use SL-class.) I agree that there would be no harm in adding this if it becomes used by several projects. — Martin (MSGJ · talk) 17:04, 17 November 2009 (UTC)
Then could we add it? The class is new, so hasn't had time to be adopted by several projects (physics has it now, but that required PC78 to intervene). There will probably be a signpost article about it in the relatively near-future about it, as well as a mention on WP:AALERTS, but I don't want to publicize this until the backbone is ready for large-scale adoption. I doubt you want to create custom classes for dozens of wikiprojects coming here at once, asking for help with custom classes. Headbomb {ταλκκοντριβς – WP Physics} 19:57, 18 November 2009 (UTC)
It might be preferable to wait and see what level of interest there is in Book-Class, but I guess it's a kind of chicken and egg situation. PC78 (talk) 00:11, 19 November 2009 (UTC)
That is indeed the situation. It's not wise to push for the adoption of a class when it's not supported and requires projects to go through hoops to make it work. The class wouldn't be enabled by default, so it won't annoy anyone who doesn't want to be annoyed by it. From the current library, several wikiprojects would be interested in this (the usual big ones, such as biographies, music, physics, biology, chemistry, astronomy, military history, music, videogames, geography, aviation, ...). If adoption after two-three months is comparable to say ...No-importance articles, then it can always be removed. But I doubt that will be the case. Headbomb {ταλκκοντριβς – WP Physics} 02:47, 19 November 2009 (UTC)

I'm not in favour of adding support for a class here which is currently used by 5 pages. It's far too premature. I don't know about "jumping through hoops" - before this convenience template was built, that was the only way to add custom classes to a banner! I'm thinking about an improved syntax for this template however which would allow additional classes to be easily supported, see the next section. — Martin (MSGJ · talk) 12:15, 19 November 2009 (UTC)

The previous way was a horrible thing to request of projects to take upon themselves. There's 5 pages now because I couldn't make sense of how to add support for the class for the physics projects, so I couldn't (and still can't) go and ask people "hey, add the book-class" and not be able to answer the "OK, but how do I do that?" question. Support the class, and most of the 500 pages will probably be tagged by the end of the year, as well as well as result in an increase of the number of books. While streamlining the process to add custom classes is a good thing, I don't think it makes much sense to anticipate that the book-class could not even reach the level of adoption that Category:Merge-Class articles (9 Projects) or as Category:Current-Class articles (16 projects), both of which are supported. Headbomb {ταλκκοντριβς – WP Physics} 16:48, 19 November 2009 (UTC)
Tagging books for the physics project is as simple as adding {{Physics|class=Book}} to the talk page, so I'm not sure why you're having difficulty there. I'm inclined to think that you're over-estimating how popular books and Book-Class will be, but I guess that remains to be seen. PC78 (talk) 17:04, 19 November 2009 (UTC)
Tagging is trivial, that's not what I'm talking about. I'm talking about modifying project banners to support the book-class. It would be trivial to do if |book={{{book|}}} was added to the class mask. It wouldn't be trivial to do if I was asking them to do modify their banners like you did. I'm not saying that hundreds of projects will adopt the book-class overnight, but to think that it won't be at least comparable to the merge-class by the end of the year is grossly underestimating how popular the book-class will be.
Not to sound impatient or ungrateful, but if I'm wrong, then it can be removed at no great loss. If I'm right, then we taking a lot of time talking about whether to include ~20 characters [unless I'm forgetting something] in this template, which could be spent on making sure the inclusion of these 20 characters didn't break something, and that the book-class is successful and popular. Headbomb {ταλκκοντριβς – WP Physics} 17:34, 19 November 2009 (UTC)
I'll defer to Martin's judgement regarding changes to this template, but I do agree that there seems to be no real negative to adding it here (and for the few other unsupported classes as well). I think I misread your previous comment, but I'm still not clear about what it is you want to do; other projects can worry about their banners. If it helps, custom class masks are documented here, and the examples on that page could be updated to cover Book-Class. PC78 (talk) 18:09, 19 November 2009 (UTC)

I'm not quite following the discussion below, what's the status on this? Headbomb {ταλκκοντριβς – WP Physics} 14:30, 22 November 2009 (UTC)

Book-Class can now be enabled with this template by adding the parameter |BOOK=Book. Not all banners with custom masks use this template, though. Those would need to add Book-Class in the same way I added it to {{Physics}}. PC78 (talk) 16:15, 24 November 2009 (UTC)
So the physics template could revert to using the class mask, and add |BOOK=Book, and it would work? Headbomb {ταλκκοντριβς – WP Physics} 16:41, 24 November 2009 (UTC)
I believe Martin has already done it. You don't have the namespace detect for Book-Class anymore, so a blank |class= parameter will default to Project-Class, but IIRC you weren't overly concerned about that anyway. PC78 (talk) 16:55, 24 November 2009 (UTC)
Excellent, thanks a bunch! Also {{Class mask/table}} needs to be updated. Headbomb {ταλκκοντριβς – WP Physics} 17:09, 24 November 2009 (UTC)

Now that we have a new namespace for books, we should update this template so that namespace detection works (and |class=book is not required). I think WOSlinker has been coding this in the template sandboxes. I also tentatively propose that Book-class be added to the extended (FQS) quality scale. This was suggested at Wikipedia_talk:WikiProject_Video_games/Archive_77#Book-class and would bring it in line with the other namespace-based classes. This would need discussing somewhere central though as it would affect all 0 projects using this scale. — Martin (MSGJ · talk) 19:37, 31 December 2009 (UTC)

That would be incredibly helpful and would greatly simplify things for me. I could tag articles without going to the tedious process of explaining the book-class, asking for consensus, getting minimal feedback, making an edit protected request one week later, THEN tag the book. While I am biased in this, so far no projects declined using it (although some were indifferent, their attitude being "Well even if it's not that useful for us, it doesn't do any harm") (Currently ~35 have adopted the book-class). Headbomb {ταλκκοντριβς – WP Physics} 04:02, 1 January 2010 (UTC)
Posted for comments on WT:COUNCIL. — Martin (MSGJ · talk) 08:11, 2 January 2010 (UTC)

Proposed changes

The code in the /sandbox will:

  • de-core the template (no longer any advantage I think)
  • add the code for checking B-class checklists. (This will tidy the interplay with {{WPBM}} and also allow inline masks with the bhecklist.)
  • remove a few parameters that are now unneeded. (E.g. no special parameter for future-class is now needed.)
  • stop automatically calling /templatepage. This is for simplicity, otherwise every conceivable parameter has to be passed there. Instead the <noinclude>/templatepage</noinclude> syntax can be used.

— Martin (MSGJ · talk) 11:29, 27 April 2010 (UTC)

To-do list - Add ability to turn off FA/A/GA-class

I've made some changes in the sandbox to implement the ability to turn off a class item but not just for FA/A/GA, I've done it for all of FA/A/GA/B/C/Start/Stub/FL/List. There's also a testcase as well. -- WOSlinker (talk) 18:42, 28 April 2010 (UTC)

That looks okay. The reason I only suggested it for FA/A/GA is that I didn't anticipate any need to switch the others off. (If Stub/Start/C/B are not being used then the class mask is so bespoke that this template probably doesn't help.) But I suppose it doesn't do any harm ... — Martin (MSGJ · talk) 19:30, 28 April 2010 (UTC)
FL & C are mentioned in the table above a few times. -- WOSlinker (talk) 19:42, 28 April 2010 (UTC)
Ah, good point. Is there any advantage in using the approach we use on {{importance mask}} and grouping the parameters together? — Martin (MSGJ · talk) 21:22, 28 April 2010 (UTC)
Could do. I've changed the sandbox to that method. -- WOSlinker (talk) 21:51, 28 April 2010 (UTC)
Okay. (I wasn't saying it was simpler that way, I was just thinking aloud.) What about using pagetype to automatically switch to NA instead of unassessed for non-articles? (Code in sandbox.) — Martin (MSGJ · talk) 11:02, 29 April 2010 (UTC)
I can't really see aany occasions where it will get down to the pagetype part when on non-article pages as the switch NAMESPACE part just above that would cover all those. -- WOSlinker (talk) 17:44, 29 April 2010 (UTC)
I guess you're right. I was thinking about the non-article pages in mainspace, but I guess the disambig and redirect options need to be retained because of the variants for each. — Martin (MSGJ · talk) 10:35, 30 April 2010 (UTC)

 Done — Martin (MSGJ · talk) 10:54, 30 April 2010 (UTC)

Thoughts on B-class checklist

The current method used to evaluate whether the B-class checklist is satisfied (i.e. with the |b= parameter) may need rethinking. The main thing I don't like about it, is that it is not possible to tell whether the checklist is being used or not. (The documentation on /table should ideally show whether it is in use or not. The other thing I have been thinking about, is an auto-promote setting which would automatically rate articles tagged with C-class as B-class if the criteria were all satisfied. Any thoughts on either of these would be welcome. — Martin (MSGJ · talk) 16:06, 21 September 2009 (UTC)

You would only ever use the b parameter if you were using the checklist and can't you tell if b is being used by using {{#ifeq:{{{b|¬}}}|¬|Not used|Used}}. However, passing though all the b1..b6 parameters and also an optional Start-Until (or perhaps a better name) would allow the B-class checklist to work with all currently used possibilities (including: using a 6 point check list, using a 5 point check list, B or C only rating and B, C and Start rating)
Code
{{#if:{{{B_CHECKLIST|{{{BCHK|}}}}}}
   |{{#ifexpr:
     {{#switch:{{WPBannerMeta/b|{{{b1|}}}}}|y|x|¬=1|0}}*
     {{#switch:{{WPBannerMeta/b|{{{b2|}}}}}|y|x|¬=1|0}}*
     {{#switch:{{WPBannerMeta/b|{{{b3|}}}}}|y|x|¬=1|0}}*
     {{#switch:{{WPBannerMeta/b|{{{b4|}}}}}|y|x|¬=1|0}}*
     {{#switch:{{WPBannerMeta/b|{{{b5|}}}}}|y|x|¬=1|0}}*
     {{#switch:{{WPBannerMeta/b|{{{b6|}}}}}|y|x|¬=1|0}}
    |B <!-- Checklist fulfilled -->
    |{{#if:{{{Start-Until|}}}
      |{{#ifexpr:{{{Start-Until|9}}} <= {{#expr:
       {{#switch:{{WPBannerMeta/b|{{{b1|}}}}}|y|x=1|0}}+
       {{#switch:{{WPBannerMeta/b|{{{b2|}}}}}|y|x=1|0}}+
       {{#switch:{{WPBannerMeta/b|{{{b3|}}}}}|y|x=1|0}}+
       {{#switch:{{WPBannerMeta/b|{{{b4|}}}}}|y|x=1|0}}+
       {{#switch:{{WPBannerMeta/b|{{{b5|}}}}}|y|x=1|0}}+
       {{#switch:{{WPBannerMeta/b|{{{b6|}}}}}|y|x=1|0}}
      }}
      |C
      |Start}}
    |C}}
   }}
   |B<!-- Checklist not used -->
  }}

The code about needs checking & testing though. I've got an example in User:WOSlinker/list2 -- WOSlinker (talk) 18:43, 21 September 2009 (UTC)

Might even be worth adding to the main WPBannerMeta template. -- WOSlinker (talk) 19:46, 21 September 2009 (UTC)
Hmm, interesting ideas.
  1. The problem with the used/unused thing at the moment is that B has to be passed as default, so ¬ is never going to reach the /table page.
  2. Good idea to normalise the criteria on WPBannerMeta itself.
  3. Not sure about Start-Until ... I think there are just ?two banners which use this. Do you think it's worth it?
  4. I did think about passing the number of satisfied criteria from /class ... or perhaps the number of unsatisfied criteria would be more helpful.
  5. How about promoting from C? Useful or not needed?
— Martin (MSGJ · talk) 21:21, 21 September 2009 (UTC)
How about allowing the B_CHECKLIST parameter, so that instead of
|b={{{b|B}}}

you could have:

|b={{#if:{{{B_CHECKLIST|}}}|{{{b|B}}}|B}}
|c={{#if:{{{B_CHECKLIST|}}}|{{{b|C}}}|C}}

? This would provide the promoting from C. -- WOSlinker (talk) 21:48, 21 September 2009 (UTC)

Could do ... but it seems like we are using two parameters when one would suffice. What about using |B_CHECKLIST=PASS or something? And do you think auto-promotion should be an option or the norm? — Martin (MSGJ · talk) 11:43, 22 September 2009 (UTC)

I've remembered why we shouldn't normalise the B-criteria on WPBM itself. Because some hooks need to evaluate them, it is better to avoid code duplication and put it on /class I think. — Martin (MSGJ · talk) 11:11, 8 October 2009 (UTC)

I was looking again at your Start-Until suggestion. Do you still want to do this? An alternative might be PASSES_FOR_C which would be the number of criteria which need to pass in order to be C-class. (The default would be zero of course.) — Martin (MSGJ · talk) 11:02, 14 May 2010 (UTC)

Could do. Could also work in an autopromote option as well. Will have to wait a week or so though (unless you want to do it) as I'm away. Will need some testcases too. -- WOSlinker (talk) 17:24, 14 May 2010 (UTC)
Okay, I may have a tinker in the sandbox but I'll wait for you to check it when you return. — Martin (MSGJ · talk) 20:59, 16 May 2010 (UTC)
Some code on the /sandbox. I think the neatest solution is to use a meta-template which will tell us which interval a value lies in. I had a look for a such a template and couldn't find one, so I made one which is currently at User:MSGJ/Interval. — Martin (MSGJ · talk) 09:53, 21 May 2010 (UTC)
Poke — Martin (MSGJ · talk) 12:36, 9 June 2010 (UTC)
Been a bit busy recently. Will see if I can take a look soon. -- WOSlinker (talk) 20:01, 9 June 2010 (UTC)
Poke. Would you be able to take a look at this because we will need to make the Image->File change shortly? Thanks — Martin (MSGJ · talk) 17:21, 26 July 2010 (UTC)
Added some more test cases for 5 point checklists and the PASSES_FOR_C option. Had to alter the range to get it to work for those checklists as if b6=unused, it counts as 1 in the totals. Everything else seems ok. -- WOSlinker (talk) 18:40, 26 July 2010 (UTC)
Hmm, yeah, good catch. Maybe we are not using the best syntax here then because I don't like this way of coding because we are having to check the parameters twice. Would FAILS_FOR_C be any easier? — Martin (MSGJ · talk) 18:47, 26 July 2010 (UTC)
Or maybe just put an instruction on the documentation: "If you are using a 5-point checklist please add one to the PASSES_FOR_C parameter." — Martin (MSGJ · talk) 18:52, 26 July 2010 (UTC)
It's only one parameter that's checked twice as there are only 5 & 6 point checklists (no 3 or 4 ones). If you wanted to code it the otherway, the parameter would actually need to be called FAILS_FOR_START. -- WOSlinker (talk) 19:00, 26 July 2010 (UTC)

(Outdent) FAILS_FOR_START would be okay - sorry but my brain is a bit fuzzy: would we avoid checking any parameter twice if we switched to that method? And do you oppose my second solution? Sorry to be a pain, but as this is such a high-traffic template I think we should be as efficient as possible. (And, I think this may need a bit more thought so I'm going to take this out of the sandbox for now and prepare the Image-File thingy.) — Martin (MSGJ · talk) 20:20, 26 July 2010 (UTC)

Category for incomplete B-class assessments

If a project uses this template to implement a B-class rating system, it would be nice if they could have a category to track articles that have incomplete B-class checklists. I don't see anything like that in the code now - did I miss it? — Carl (CBM · talk) 19:04, 15 April 2011 (UTC)

I'm not sure this template would be the best place to implement those categories. Probably a better place would be to add something into Template:WPBannerMeta/hooks/bchecklist. -- WOSlinker (talk) 20:06, 15 April 2011 (UTC)
Discussion at Template_talk:WPBannerMeta/hooks#Checklist_tracking_categories. -- WOSlinker (talk) 20:28, 15 April 2011 (UTC)
Thanks. — Carl (CBM · talk) 22:14, 15 April 2011 (UTC)

Image -> File

There is code on the sandbox to rename Image-Class to File-Class in the cases that FQS is set to "yes". Does it look okay? — Martin (MSGJ · talk) 20:28, 26 July 2010 (UTC)

Added some more testcases. I think the 3rd one down should be File rather than Image, so needs a fix. -- WOSlinker (talk) 20:39, 26 July 2010 (UTC)
Also 5 & 6 don't seem to be working properly. -- WOSlinker (talk) 20:41, 26 July 2010 (UTC)
Fixed now I think with [1] -- WOSlinker (talk) 20:44, 26 July 2010 (UTC)
You're never going to want both Image- and File-class simultaneously. — Martin (MSGJ · talk) 20:52, 26 July 2010 (UTC)
If you don't want it that way and want just one then I think the file param should be before the image param in the switch statement. -- WOSlinker (talk) 20:59, 26 July 2010 (UTC)
Umm, brain hurting again ... — Martin (MSGJ · talk) 21:13, 26 July 2010 (UTC)
Okay back up slightly. What do you think should happen if |FQS=yes|image=yes? — Martin (MSGJ · talk) 21:20, 26 July 2010 (UTC)
I think that should go to File for auto-namespace detection, if class=file passed then File and if class=image passed then image. -- WOSlinker (talk) 21:28, 26 July 2010 (UTC)

That's admittedly logical but quite complicated, and improbable that this would behaviour would ever be desired. The current code assumes that both will never be wanted and |FQS=yes|file=yes implicity turns off Image-Class. Would that approach not make sense now? — Martin (MSGJ · talk) 21:31, 26 July 2010 (UTC)

I'm just going to put your code in because I don't want to think about this anymore :) But wouldn't we want this to achieve the behaviour you describe above? — Martin (MSGJ · talk) 21:42, 26 July 2010 (UTC)
Yes, I'd actually forgotten to change that one. -- WOSlinker (talk) 21:47, 26 July 2010 (UTC)
Okay  Done, that was more complicated than I thought it would be! — Martin (MSGJ · talk) 22:19, 26 July 2010 (UTC)

As Image-Class is not used by any projects these days I have removed support for it. Of course it is still possible to add it as a custom class, but namespace detection will always give File-class. — Martin (MSGJ · talk) 11:48, 9 June 2011 (UTC)

FM-Class

If File-class is used but FM-class is not used then an input of FM should probably default to File-class rather than NA-class. — Martin (MSGJ · talk) 11:49, 9 June 2011 (UTC)

Yes, would be good. The following should do that I think. -- WOSlinker (talk) 17:55, 9 June 2011 (UTC)
 |fm       = {{#ifeq:{{{fm}}}|yes|FM|{{#ifeq:{{{file|{{{FQS}}}}}}|yes|File|NA}}}}
Okay looks good, and done. — Martin (MSGJ · talk) 10:30, 10 June 2011 (UTC)

Help needed with task force

So I can't figure out how to get class category pages by namespace to populate for the New York Knicks task force:

 FA A GABCStartStub FLListCategoryDisambigFilePortalProjectRedirectTemplateNA???Total
0062893265240233211000311210787

Some examples include Category talk:New York Knicks and Talk:Knicks. As far as I can tell, Template:WikiProject National Basketball Association and Template:WikiProject National Basketball Association/class are configured correctly. Any help will be appreciated. NYCRuss 19:46, 30 December 2011 (UTC)

Everything looks as thouugh it is configured ok in the banner. Probably the Job queue is being a bit slow. -- WOSlinker (talk) 20:02, 30 December 2011 (UTC)
Thanks for checking it out. It does indeed seem to be some kind of system lag. NYCRuss 01:42, 31 December 2011 (UTC)

An additional class

I am interested in using an additional class. If it has merit, it would be great seeing it incorporated into the "Class mask" template. The class would be: UA for "unassessable", a class distinct from unassessed for it would define a page as having: "significant questionable inclusions and/or omissions, sufficient to place deletion peril upon the page". This would facilitate additional tracking capabilities and perhaps quarantine the worst class examples, by noindexing them when the assessment is in place. Coding the assessment similar to the behavior of CSD, disallowing its removal by the page creator, with bot enforcement, would increase the significance, and usefulness, of such a class option. I am keen to see the thoughts others might have to these regards, and I thank all for indulging this post. Best - My76Strat (talk) 19:08, 28 April 2012 (UTC)

Hi My76Strat. Adding a new class to a WikiProject banner is very easy to do and I could help you with that. There would be no need to add it to this template unless there was a consensus that it be universally adopted (i.e. added to every WikiProject banner). I'm not sure whether you will get agreement for that, and in any case it would be better to try it out on a few projects first to see if it works well. — Martin (MSGJ · talk) 15:08, 14 May 2012 (UTC)

Image Class / File Class categories

The Template:Class mask/templatepage subcomponent of this template contains logic to list categories of the format "Image-Class wibble articles". These have been deprecated in favour of categories styled "File-Class wibble articles", and globally deleted/renamed/moved (see Wikipedia:Categories_for_discussion/Log/2010_July_3#Category:Image-Class_articles).

Can the current code that checks for both be simplified to drop the checks for "Image-Class wibble articles" categories please? - TB (talk) 21:26, 6 December 2012 (UTC)

 Done -- WOSlinker (talk) 23:22, 6 December 2012 (UTC)
Cheers. - TB (talk) 07:45, 7 December 2012 (UTC)

Draft namespace

Could we add the draft namespace please? —  HELLKNOWZ  ▎TALK 15:20, 27 December 2013 (UTC)

 Done -- WOSlinker (talk) 18:22, 27 December 2013 (UTC)

Protected edit request on 1 September 2014

Please could we make "Draft" the default class for all drafts, to make them easier to identify via projects.

  • Add |draft below |stub on line 23.

For a test case, Draft talk:Dead Waves (band) and Draft talk:Metaltech (Band) should both say "This page has been assessed as Draft class" and be assigned to the category Category:Draft-Class Heavy Metal articles. Ritchie333 (talk) (cont) 17:21, 1 September 2014 (UTC)

There are currently only 23 projects that support the Draft-Class. I think there would need to be a RFC before making it a default for all projects. -- WOSlinker (talk) 17:27, 1 September 2014 (UTC)
See related discussion - Wikipedia talk:WikiProject Articles for creation#Review & cleanup for some long-time AfC drafts? Ritchie333 (talk) (cont) 17:33, 1 September 2014 (UTC)
@Ritchie333: Not done: please establish a consensus for this alteration before using the {{edit template-protected}} template. Also, I see three problems with your proposal.
  • I don't think that auto-detection of draft class should be enabled for all projects, just those that have |QUALITY_SCALE=extended.
  • Adding a new line as you suggest would break the existing line further down,
     |draft    = {{#ifeq:{{{draft}}}|yes|Draft|NA}}
    
    It would be better to amend that line.
  • It would only work on banners where the talk page use has the explicit parameter |class=draft, it would not detect by namespace.
I address all three concerns in my edit to Template:Class mask/sandbox (diff). --Redrose64 (talk) 19:55, 1 September 2014 (UTC)
Okay, thanks for the heads up. I'm coming from the point of view of a problem and hopefully the regulars here can advise on better ways to implement a solution. Ritchie333 (talk) (cont) 13:16, 2 September 2014 (UTC)
This proposal would affect a large number of projects, so I agree it does need a proper discussion appropriately advertised. I can't see it attracting much opposition though. — Martin (MSGJ · talk) 15:56, 2 September 2014 (UTC)

OK, there are three possible routes:

  1. Leave things as they are:
    • each project that uses |QUALITY_SCALE=inline or |QUALITY_SCALE=subpage can opt-in to Draft-class if they choose to, by adding |draft=yes to the {{class mask}} template. For inline, the {{class mask}} template is inside the {{WPBannerMeta}} template of the WikiProject banner; for projects with subpage, it is in the /class subpage of the banner.
    • those with |QUALITY_SCALE=extended or |QUALITY_SCALE=standard cannot use Draft class without changing |QUALITY_SCALE= to either inline or subpage
  2. Add Draft to the FQS group (Category, Disambig, File, Portal, Project, Template):
    • each project that uses |QUALITY_SCALE=inline with |FQS=yes or |QUALITY_SCALE=subpage with |FQS=yes would be given Draft-class with the ability to opt-out by adding |draft=no to the {{class mask}} template (see option 1)
    • each project that uses |QUALITY_SCALE=inline without |FQS=yes or |QUALITY_SCALE=subpage without |FQS=yes can opt-in to Draft-class if they choose to, exactly as for option 1
    • each project that uses |QUALITY_SCALE=extended would be given Draft-class without opt-out, other than by switching to another |QUALITY_SCALE=
    • those with |QUALITY_SCALE=standard cannot use Draft class without changing |QUALITY_SCALE= to one of the others
  3. Add Draft to the standard group (FA, A, GA, B, C, Start, Stub, FL, List, NA):
    • each project that uses |QUALITY_SCALE=inline or |QUALITY_SCALE=subpage would be given Draft-class with opt-out, exactly as for option 2 with |FQS=yes
    • each project that uses |QUALITY_SCALE=extended or |QUALITY_SCALE=standard would be given Draft-class without opt-out, other than by changing |QUALITY_SCALE= to either inline or subpage

We won't arrive at a final decision in just two days. I !vote for Option 2: add Draft to the FQS group. --Redrose64 (talk) 19:06, 2 September 2014 (UTC)

As I mentioned elsewhere, I think "opt-in" is going to be the most pragmatic option. We can tag drafts for all the projects we like, but unless the project is known as being active and responsive (eg: Military history, Classical music), then we'll just end up with a list of drafts that nobody looks at. An affirmative action from the project will at least indicate that somebody is willing to look at drafts. Ritchie333 (talk) (cont) 10:23, 3 September 2014 (UTC)
Opt-in is what we've got currently. {{WikiProject Metal}} has opted-in to Draft-class and it's working fine as your two examples at the top will show. — Martin (MSGJ · talk) 10:41, 3 September 2014 (UTC)
I would also likely vote for option 2. — Martin (MSGJ · talk) 10:55, 3 September 2014 (UTC)
FWIW, I've developed a script User:Ritchie333/drafts.js that provides an option to list all unreviewed drafts assigned to a project, which allows me to bypass any template-based restrictions. Ritchie333 (talk) (cont) 11:50, 3 September 2014 (UTC)

I've started a discussion at Wikipedia:Village pump (proposals)#Widen usage of Draft-class. Any tweaks or suggestions welcome. — Martin (MSGJ · talk) 13:25, 3 September 2014 (UTC)

Lua version

This is just a note to say that I've made a Lua version of this template at Module:Class mask. I've taken care to ensure that it's an exact one-to-one conversion - you can see the test cases at Module:Class mask/testcases (run). I've just tested the speed, and it turns out that it's actually slower than the existing template, although they're both very fast. (The template rendered 1000 transclusions in ~0.5 seconds, and the module rendered 1000 transclusions in ~1.0 seconds.) The difference is from the overhead involved in calling Lua from wikitext - when I tested the module in Lua only, it took ~0.03 seconds to render the result 1000 times. Because of the speed difference it wouldn't make much sense to convert the template now, but it might make sense if/when more of Template:WPBannerMeta gets converted to Lua. — Mr. Stradivarius ♪ talk ♪ 01:01, 19 January 2015 (UTC)

Help-class

Was just wondering why:

|Help talk      = NA
instead of:
|Help talk      = {{#ifeq:{{{help|{{{FQS}}}}}}|yes|Help|NA}}
?

In other words, why are Help pages forced into Category:NA-class (name) articles categories and do not have their own Category:Help-class (name) articles categories? Any special reason? – Paine  18:50, 24 July 2015 (UTC)

@Paine Ellsworth: Very few pages in Help: space are associated with one or more particular WikiProjects. Help pages tend to be of interest to pretty much everybody. But if you want to put a WikiProject banner on a particular Help talk: page, it's not going to have much company, so it's probably best to feed the parameter |class=Project. --Redrose64 (talk) 20:06, 24 July 2015 (UTC)
Okay, I did that at Help talk:Redirect, so far the project's only Help page, and thank you very much! Also note the Help Project banner on that page – I imagine they have this problem more than anybody else does, don't you think?
Now, I read the above idea of yours and wondered why it hasn't been engaged yet? Sounds like a good idea. – Paine  01:50, 25 July 2015 (UTC)
I've been looking at {{Wikipedia Help Project}} - it has oddities in both class and importance. Like several other WikiProject banners, it has a custom class mask (this is at Template:Wikipedia Help Project/class, as you would expect); but unlike the others, it's not built around {{class mask}} (which is self-documenting) and instead uses its own custom code (so I have added some documentation). I think that this non-standard method was done so that when |class= is blank or omitted, and the banner is used on a Help talk: or Wikipedia talk: page, it gets Unassessed-class by default, instead of NA-class. --Redrose64 (talk) 13:48, 25 July 2015 (UTC)

Redirect

Can we use Module:Pagetype to automatically assign NA-class to redirects? — Martin (MSGJ · talk) 10:34, 12 November 2013 (UTC)

Not necessarily, because some WikiProjects permit |class=redir, see for example Category:Redirect-Class rail transport articles --Redrose64 (talk) 10:41, 12 November 2013 (UTC)
Yes of course, so I should update my suggestion. If no |class= parameter is used, and if the page is a redirect then it will automatically get rated as Redirect-class if that class is in use, otherwise it will get NA-class. — Martin (MSGJ · talk) 12:58, 12 November 2013 (UTC)

2 years later, I've now put code on the /sandbox to do this. For example Talk:Managed Bean is automatically put into Redirect-class. — Martin (MSGJ · talk) 12:45, 25 September 2015 (UTC)

@Redrose64: care to check my code? — Martin (MSGJ · talk) 18:47, 27 September 2015 (UTC)
A bit different from my suggestion at #Autodetection of Redirect-class. What is the normal practice for talk pages of redirects that are not mainspace, such as a redirected template? --Redrose64 (talk) 18:53, 27 September 2015 (UTC)
(I've merged that section below.) Yes I pondered that same question and currently they are probably classed by their namespace by default. But they are not templates, project pages or portal pages really, so I think Redirect-class (or NA-class if the Redirect class is not used) is probably more apt. What do you think? — Martin (MSGJ · talk) 19:12, 27 September 2015 (UTC)

I've deployed this and also updated the auto-documentation — Martin (MSGJ · talk) 12:34, 29 September 2015 (UTC)

Autodetection of Redirect-class

I've found that when {{pagetype}} is used with a blank first parameter on the talkpage of a mainspace redirect, it outputs redirect - this has given me this idea, which should eliminate the need for edits like this. What do people think? --Redrose64 (talk) 20:01, 24 November 2014 (UTC)

Good idea! — Martin (MSGJ · talk) 20:14, 24 November 2014 (UTC)

Should TimedText talk: pages be classified by namespace as if they were in File talk: space

See for example Category:NA-Class Alternative music articles, this has a number of pages in TimedText talk: namespace. A TimedText page is a set of captions or subtitles for a separate video file, they are associated with pages in File: namespace. So, TimedText:Clint Mansell, Kronos Quartet, and Mogwai - Death Is the Road to Awe.ogg.en.srt is associated with File:Clint Mansell, Kronos Quartet, and Mogwai - Death Is the Road to Awe.ogg and each may have a talk page (in this case, both do).

At the moment, File talk:Clint Mansell, Kronos Quartet, and Mogwai - Death Is the Road to Awe.ogg is in Category:File-Class Alternative music articles but TimedText talk:Clint Mansell, Kronos Quartet, and Mogwai - Death Is the Road to Awe.ogg.en.srt is in Category:NA-Class Alternative music articles. Should TimedText talk: pages be classified by namespace as if they were in File talk: space? If so, both of these talk pages will be placed in Category:File-Class Alternative music articles. --Redrose64 (talk) 09:36, 1 October 2015 (UTC)

Other newer namespaces

Following on from the above, I've found that pages in Module talk: space are also given NA-class, perhaps those should be treated as Template-class. Template:Class mask/templatepage does not list either TimedText talk: or Module talk: - and it also doesn't list three other newer namespaces (Education Program talk:, Gadget talk:, Gadget definition talk:) which are treated as ???-class by Template:Class mask. --Redrose64 (talk) 15:44, 1 October 2015 (UTC)

Potentially affected talk pages: TimedText talk (less than 50), Module talk (more than 50), Education Program talk (two pages), Gadget talk (none), Gadget definition talk (none). --Redrose64 (talk) 16:01, 1 October 2015 (UTC)
As you know I've made the very same suggestion for Module and TimedTalk pages over at Template talk:WPBannerMeta. I'm also inclined to think that Help, MediaWiki and Education Program pages should all be treated as Project-Class, though perhaps this requires a bit more consideration – changes to the Help talk namespace might impact on WP:WPHELP, for example. Certainly we should be assigning a default NA-Class rating to these newer namespaces rather than leaving them undefined. PC78 (talk) 02:50, 2 July 2016 (UTC)

Proposed changes 2

The following changes have been made in the sandbox:

  1. "Mediawiki talk" changed to "MediaWiki talk" (bugfix)
  2. "TimedText talk" to be classed as File-Class, and "Module talk" to be classed as Template-Class, per discussion above
  3. "Education Program talk", "Gadget talk" and "Gadget definition talk" (all currently undefined) to be classed as NA-Class

I've tested the code and it all seems to be working fine, but I'd appreciate someone else taking a look. PC78 (talk) 02:50, 2 July 2016 (UTC)

@MSGJ and WOSlinker: Could one of you please implement these changes? I'm not sure if point #2 would require a broader discussion and concensus so I'll leave that one up to you, but the rest should be pretty straightforward. PC78 (talk) 12:52, 9 July 2016 (UTC)
I'm completely happy with the changes to TimedText and Module. Is there really a gadget namespace? — Martin (MSGJ · talk) 20:49, 9 July 2016 (UTC)
Yes, but there's nothing useful in it yet - the only page in that namespace is a redirect to mainspace. --Redrose64 (talk) 21:50, 9 July 2016 (UTC)
Okay, so should we be adding extra code to this massively used template when it will effectively unused yet? I suggest we add the support for module and timedtext, but leave the others for now. — Martin (MSGJ · talk) 22:18, 9 July 2016 (UTC)
I've tweaked the sandbox to remove some of the options from the switch statement. Would that work? — Martin (MSGJ · talk) 22:24, 9 July 2016 (UTC)
That's a more elegant solution that will cover any future namespaces as well. :) It appears to work just fine. PC78 (talk) 00:38, 10 July 2016 (UTC)
The downside with my solution (and which needs to be fixed before deploying) is that any use in a subject namespace will be given NA-class. Now of course this template is not supposed to be used in subject namespace, but I think unassessed is probably preferable to NA in these cases. — Martin (MSGJ · talk) 20:33, 10 July 2016 (UTC)
Perhaps use {{TALKSPACE}} instead of {{NAMESPACE}}? PC78 (talk) 20:38, 10 July 2016 (UTC)
Tried it, any use in subject space will mirror the corresponding talk space which seems appropriate to me. What do you think? PC78 (talk) 07:02, 11 July 2016 (UTC)
Sounds fine. In that case we can do the switch based on SUBJECTSPACE which is slightly simpler. Sandboxed with same logic in force NA. — Martin (MSGJ · talk) 08:19, 11 July 2016 (UTC)
Even better. :) Have tried it and it all looks good. PC78 (talk) 15:16, 11 July 2016 (UTC)
Okay I will do some final checks and deploy then? — Martin (MSGJ · talk) 20:26, 11 July 2016 (UTC)
Cool. I'll leave it in your capable hands. :) PC78 (talk) 07:16, 12 July 2016 (UTC)

Deployed

... and looking good — Martin (MSGJ · talk) 11:27, 12 July 2016 (UTC)

Any chance you can update Template:Class mask/templatepage? I've just had a go but I'm not sure what I'm doing... PC78 (talk) 07:12, 13 July 2016 (UTC)
Check please? — Martin (MSGJ · talk) 08:32, 13 July 2016 (UTC)
Looks good. Cheers! :) PC78 (talk) 15:28, 13 July 2016 (UTC)

Bplus (B+) no longer exists

If there's any Bplus-class code in this or a related template, it needs to be removed. B+ has been merged to B, per Wikipedia:Categories for discussion/Log/2018 June 30#Bplus-Class articles.  — SMcCandlish ¢ 😼  10:58, 19 July 2018 (UTC)

@SMcCandlish: that is a redlink. --Redrose64 🌹 (talk) 16:33, 19 July 2018 (UTC)
Link fixed; missing space char.  — SMcCandlish ¢ 😼  17:42, 19 July 2018 (UTC)

Tracking

Would it be possible to track any instances of |a=no? I'm trying to gather some data on which projects have explicitly opted out of using A-Class. PC78 (talk) 15:40, 1 September 2019 (UTC)

I think that it would be better to do this in Template:Class mask/templatepage rather than in Template:Class mask. --Redrose64 🌹 (talk) 22:32, 1 September 2019 (UTC)
Possibly, I'm a bit reluctant to touch anything though! PC78 (talk) 22:48, 1 September 2019 (UTC)
Code up your proposal in the template's sandbox, add some testcases to the /testcases subpage (see WP:TESTCASES). --Redrose64 🌹 (talk) 22:55, 1 September 2019 (UTC)
Well, yes... I meant I'm reluctant to fiddle with such a highly used template that is used by other templates. I'll have a go though... PC78 (talk) 23:15, 1 September 2019 (UTC)

I've added a tracking category to {{Class mask/templatepage}} since that was pretty straightforward, although this won't register any inline uses of the class mask. Adding the category to {{Class mask}} was not so straightforward though, {{Class mask/testcases}} doesn't display any obvious errors but it was breaking my test banner so I'll leave that well alone since I can live without it. PC78 (talk) 21:36, 2 September 2019 (UTC)

Interpret "audio" as "file"?

"Audio-Class" was briefly used by WikiProject Louisville, presumably with the intention of segregating files by type, and although technically still supported in {{WikiProject Louisville/class}} the banner itself is essentially deprecated with only 17 remaining transclusions. "Audio-Class" is no longer in use and Category:Audio-Class Louisville articles was deleted back in 2014. Clearly the idea has failed to gain traction so I wonder if it would be best to "retire" the class and interpret any future usage of |class=audio as File-Class? PC78 (talk) 16:40, 7 September 2019 (UTC)

Just removing the |audio=yes from {{WikiProject Louisville/class}} would do it. -- WOSlinker (talk) 19:19, 7 September 2019 (UTC)
Not quite what I meant. I'm suggesting a change that would apply to all WikiProject banners, i.e. interpreting "audio" as a synonym of "file" (as with "image", for example, or "Bplus" and "B"). PC78 (talk) 19:37, 7 September 2019 (UTC)
There is no need to add a synonymn as if you set the class in a banner on a file talk page to any invalid value, it will ignore it and use the File class. -- WOSlinker (talk) 21:53, 7 September 2019 (UTC)
Ah-ha, fair enough then! Is there any purpose to the existing synonyms used for file, category or template then? PC78 (talk) 22:03, 7 September 2019 (UTC)
In most cases, if a WikiProject banner is used in any namespace other than Talk:, there is no need to use a |class= parameter at all, since the class will be autodetected. I know of no WikiProject banners where this is not generally true, because I've not checked all the banners. However, for the File talk: namespace, one specific class cannot be autodetected - when a file (be it image, audio or something else) is FM-Class, and the WikiProject supports that class, you need to set |class=fm explicitly - but such WikiProjects will interpret the absence of |class= as implying File-class. There is no such thing as a featured category or featured template, so |class= may always be omitted when a WikiProject banner is used in Category talk: or Template talk: space. --Redrose64 🌹 (talk) 06:57, 8 September 2019 (UTC)

SIA-Class

If |SIA= is used then SIA-Class is triggered in the documentation generated by Template:Class mask/templatepage, which is good. But see for example usage at Template:WikiProject Fungi/class: in this case |SIA=List so the class is not used but is still triggered in the doc. Is there any way around this? PC78 (talk) 17:51, 10 September 2019 (UTC)

Topics

What's the maximum number of topics allowed? Template:WikiProject Australia/class seems to have pegged the needle. --Nessie (talk) 17:37, 27 September 2019 (UTC)

Six. We could certainly add a few more, but forty seems rather excessive. PC78 (talk) 17:41, 27 September 2019 (UTC)
@PC78: What's the difference of including them? Do they change the totals in the table on the subpage? Is there a reason they don't get their own table(s)? --Nessie (talk) 18:03, 27 September 2019 (UTC)
Topics 1-6 are only used to check to see if the assement categories exist and display a warning for those that don't. Each check counts as a "Expensive parser function" and only 500 are allowed per page. Template:WikiProject Australia/class currently has 225. -- WOSlinker (talk) 18:11, 27 September 2019 (UTC)
I'm sorry, I didn't mean as per adding the functionality to the template. I meant what's the difference in an editor adding |topic1= to a class subpage. What does it do for assessment as opposed to removing it? --Nessie (talk) 18:17, 27 September 2019 (UTC)
The parameters only check to see if the assessment categories exist for each "topic", which is handy but you don't need them. Not sure if the main |topic= parameter is mandatory, but you can safely remove the rest. PC78 (talk) 18:34, 27 September 2019 (UTC)
Yes, |topic1= to |topic6= are only used when the class subpage is viewed, they take no part in the assessment logic. --Redrose64 🌹 (talk) 19:15, 27 September 2019 (UTC)

Subpage quality scale for TFs when template uses inline?

Another question. Template:WikiProject Banksia (edit | talk | history | links | watch | logs) uses |QUALITY_SCALE=inline. It has a 'taskforce' (really it's parent) for WP:PLANTS that was using |TF_1_QUALITY=yes. I changed it to |TF_1_QUALITY=subpage. Will the template look for {{WikiProject Plants/class}} or does it want to use {{WikiProject Banksia/class}}, which doesn't exist because |QUALITY_SCALE=inline is used? --Nessie (talk) 18:27, 27 September 2019 (UTC)

If you set it to "subpage" it will look for the subpage of that template, which in this case doesn't exist. PC78 (talk) 18:36, 27 September 2019 (UTC)
No, the |TF_n_QUALITY= parameters do not distinguish between different values such as subpage - they treat all non-blank values as yes (the ultimate code, whether the normal or "hook" form is used, is in {{WPBannerMeta/taskforce}} which merely checks to see if the parameter is non-blank). It is only the |QUALITY_SCALE= parameter (which is handled separately, within {{WPBannerMeta/class}}) that identifies the set of valid values. Accordingly, if a taskforce is defined inside a {{WPBannerMeta/hooks/taskforces}}, that template should have a |QUALITY_SCALE= parameter that has the same value as that of the main {{WPBannerMeta}} template.
To the original q: yes it is possible to use the quality scale subpage from another WikiProject, by careful use of the |BANNER_NAME= parameter within {{WPBannerMeta/hooks/taskforces}}, but you need to ensure that there is only one taskforce in use within that hook. --Redrose64 🌹 (talk) 18:53, 27 September 2019 (UTC)
@NessieVL: Please give this a try. --Redrose64 🌹 (talk) 19:14, 27 September 2019 (UTC)
@Redrose64: Yea, I was thinking I just should switch to a subpage, but I just wanted to rock the boat the least i could. Oh well. --Nessie (talk) 19:26, 27 September 2019 (UTC)
(Edit conflict) Sorry, I misread the question. But I assume the intention was to set |QUALITY_SCALE=subpage in the task force hook? PC78 (talk) 19:30, 27 September 2019 (UTC)
@NessieVL: Would Banskia not be better off as a task force in the {{WikiProject Plants}} banner? PC78 (talk) 19:36, 27 September 2019 (UTC)

Portal-Class

At some point we will have to consider removing Portal-Class from the FQS. The ongoing cull of portals at WP:MfD means that there are now less than 700 and at least half the subcategories of Category:Portal-Class articles are now empty; this trend looks likely to continue for the foreseeable future. Something to bear in mind at least. PC78 (talk) 18:44, 23 September 2019 (UTC)

@PC78:, agree with that and probably Book-class also. Where is the best place to discuss? — Martin (MSGJ · talk) 19:58, 19 October 2020 (UTC)
Correction: Book-class was never added to FQS, but it was manually added to 948 project banners! It is a very underused class and I believe books are not even supported anymore. — Martin (MSGJ · talk) 20:07, 19 October 2020 (UTC)
The best place to discuss is where we initially discussed adding Draft-Class to FQS (see above), which was followed by a proposal at VPR. --Redrose64 🌹 (talk) 20:44, 20 October 2020 (UTC)

User space

Does anyone think that pages in the user talk space are likely to be userspace drafts and so should default to Draft-class rather than NA-class? — Martin (MSGJ · talk) 13:49, 21 October 2020 (UTC)

Drafts - quite possibly. Drafts of articles - not necessarily. Some might be drafts of pages ultimately bound for Help: or Wikipedia: space, many of those started out as user-space essays. Redrose64 🌹 (talk) 09:56, 22 October 2020 (UTC)
So are you saying these would be better left as NA-class by default? I would guess the vast majority would be draft articles but don't have any stats to back that up. — Martin (MSGJ · talk) 13:47, 22 October 2020 (UTC)
Without examining the pages individually, we don't know what they might contain. A page in User talk: space might have a WikiProject banner that is completely unrelated to the matching subject page, because the user was merely testing out the WikiProject template. --Redrose64 🌹 (talk) 19:57, 23 October 2020 (UTC)

Book-class

Per the consensus at Wikipedia:Village pump (proposals)/Archive 181#The future of the Book namespace, would it be a good idea to remove references to Book-class in this template? — Martin (MSGJ · talk) 21:38, 8 July 2021 (UTC)

Do you mean before the Book: namespace is actually deactivated? --Redrose64 🌹 (talk) 07:22, 9 July 2021 (UTC)
That is correct. It's on it's way out and I think we could make a start on removing these assessments and emptying the corresponding categories. We can't really stop projects using this class by editing this template (because they can set any custom classes they like) but we can at least stop the automatic classification based on namespace detection which would make a big start on clearing these. — Martin (MSGJ · talk) 12:50, 9 July 2021 (UTC)
I see that WOSlinker has beaten me to it and already modified the sandbox. I'm just wondering whether we should push these book-class assessments into NA-class rather than them all going into Unassessed? — Martin (MSGJ · talk) 20:41, 12 July 2021 (UTC)
NA would be consistent with the idea that non-article pages do not require assessment as such, so Unassessed would be wrong. --Redrose64 🌹 (talk) 10:17, 13 July 2021 (UTC)
The Book namespace has gone now, so we can fully remove Book from the template. Using Book as a custom classmask will still work, so will still need removing from individual project banner templates. -- WOSlinker (talk) 11:41, 13 July 2021 (UTC)
This has now been removed. -- WOSlinker (talk) 11:44, 13 July 2021 (UTC)

Ignore namespace

I am planning to add a parameter to Module:Class mask to tell the module to bypass namespace detection. The reason is I am trying to test a new version of Template:WikiProject banner shell on its testcases page and it always gets detected as a template when I don't want it to! The new parameter will be used for testing purposes only. — Martin (MSGJ · talk) 11:02, 2 March 2023 (UTC)

Automatically classify disambiguation pages

Module:Disambiguation will tell you if a page is a dab-page, so we could potentially add some automagic to the class mask template. @Evad37: is your module ready for some more use? — Martin (MSGJ · talk) 19:57, 19 October 2020 (UTC)

It hasn't really had a great deal of testing regarding potential false positives and false negatives, but it seems to work where it is currently used, and I haven't heard any feedback or requests about it since I created it (until now). - Evad37 [talk] 23:27, 20 October 2020 (UTC)
Okay great. I'll do some further testing ... — Martin (MSGJ · talk) 13:47, 21 October 2020 (UTC)

The proposed code for this is in the sandbox. I have noticed quite a few dab-pages which are not being detected by that module, so will follow up at Module talk:Disambiguation — Martin (MSGJ · talk) 13:48, 22 October 2020 (UTC)

Disambiguation page detection

I propose to use Module:Disambiguation to automatically detect dab pages and classify as Disambig-class or NA-class. Any comments? — Martin (MSGJ · talk) 12:46, 9 April 2023 (UTC)

The code is in the sandbox and I think ready to deploy — Martin (MSGJ · talk) 19:54, 16 April 2023 (UTC)
 Done — Martin (MSGJ · talk) 13:33, 19 April 2023 (UTC)
Fixed an error whereby the module was checking the current page instead of the subjectpage. Should be working properly now — Martin (MSGJ · talk) 07:51, 21 April 2023 (UTC)

Use module

WPBannerMeta has been using Module:Class mask for a few weeks now and everything seems to be working well. I have recently added disambig page detection to that version. I propose to change the template to use the module, so that everything is using the same code.

The test cases all check out apart from a few strange issues with Module and TimedText namespaces, which I can't really understand. If anyone can tell me what's going wrong on Module talk:Class mask/testcases I would be grateful. — Martin (MSGJ · talk) 12:56, 17 April 2023 (UTC)

Well here goes nothing ...  Done — Martin (MSGJ · talk) 13:33, 19 April 2023 (UTC)
I've found the errors that were causing the Module and TimedText issues.
On Module:Class mask/testcases, for the test_default issues, you had passed "module" and "timedtext" as the parameters to be marked yes for testing, rather than "template" and "file". I've changed that now, and introduced a new parameter in that function to check for what happens when one does mark "module" and "timedtext" as yes, accounting for the fact those classes are not affected by FQS.
For the test_tt_file issue, if I've understood the code correctly, that section is for checking what happens when you pass class=timedtext to the template with different ways of activating/deactivating File. Additionally, it also seems like using self:assertEquals simulates what occurs with a namespace of "Module talk:"
The root of the error is, you don't treat "timedtext" (or "module" for that matter), as a valid/significant class name in Module:Class mask, so when FQS is activated, timedtext is treated as invalid and resolveDefaultGrade uses the namespace to assign Template. When FQS is not activated but File is, resolveDefaultGrade still calls resolveFQSgrade w/ Template, but then resolveFQSgrade assigns NA because Template is not activated. Indigopari (talk) 08:14, 25 April 2023 (UTC)
Thanks very much for looking into this. I think TimedText is supposed to fall back to File and Module is supposed to fall back to Template — Martin (MSGJ · talk) 09:36, 25 April 2023 (UTC)

I am thinking of adding all the functions of Module:WikiProject quality assessment into Module:Class mask to consolidate. They are all about the quality assessment of the article, and the former module calls the latter several times so it seems to be logical and possibly more efficient. — Martin (MSGJ · talk) 06:55, 26 April 2023 (UTC)

This has now been done — Martin (MSGJ · talk) 13:13, 2 May 2023 (UTC)

Protected edit request on 7 July 2023

Please revert the latest change. See this discussion about error messages that were apparently caused by the change. Thanks. – Jonesey95 (talk) 12:43, 7 July 2023 (UTC)

Fixed by MSGJ. Aidan9382 (talk) 12:45, 7 July 2023 (UTC)