Template talk:Class mask

Help class suggestion
I suggest creating an optional help-class that is similar to redirect in that it can be activated by setting help=yes, and which can then be used to automatically categorise pages in the help namespace. I have added to code necessary to do this at the sandbox. I do not have edit permission for the Module, so if no one objects and no one implements the edit, I will put forth an edit request for this in a few days. Indigopari (talk) 05:28, 25 April 2023 (UTC)


 * Which WikiProject wishes to use Help-class? Unless there is an actual use case, I do not see much point in making this change. There is actually a drive to standardise these classes, not add new ones. &mdash; Martin (MSGJ · talk) 06:29, 25 April 2023 (UTC)
 * WikiProject Linguistics, which has many IPA Help pages within its scope. Indigopari (talk) 07:30, 25 April 2023 (UTC)
 * It's a good idea to provide examples. Presumably you mean most (if not all) of the 132 pages in . -- Red rose64 &#x1f339; (talk) 08:28, 25 April 2023 (UTC)
 * Thank you for the tip! Yes, those are the pages to which I was referring; all 132 of them are in the Help namespace, which is a lot (more than the amount of WPLING templates, in fact), and so I think it would be a useful feature to be able to separate them out into their own class.
 * I would do it at WPLING's custom class mask instead, but in order to create the automatic categorisation, as far as I can tell, I would essentially have to duplicate almost all of Module:class mask in a new Module. For the sake of consistency and to ensure that any improvements to this module are reflected at WPLING, I think it would be better to be able to continue using the class mask template if possible instead. Indigopari (talk) 08:45, 25 April 2023 (UTC)
 * It should be a simple matter of editing Template:WikiProject Linguistics/class to add the yes parameter. -- Red rose64 &#x1f339; (talk) 09:27, 25 April 2023 (UTC)
 * Just adding help=yes to Template:class mask won't automatically classify article in the Help: namespace. For that, I would need to modify the Lua code that handles namespaces directly. Indigopari (talk) 12:03, 25 April 2023 (UTC)
 * In that case I have no concerns about adding this functionality &mdash; Martin (MSGJ · talk) 09:37, 25 April 2023 (UTC)
 * and what is happening with "ErrorNSswitch"? &mdash; Martin (MSGJ · talk) 06:30, 25 April 2023 (UTC)
 * I introduced a bunch of debugging variables, as I was trying to track down the TimedText and Module error in test cases. I believe I've resolved it as well Indigopari (talk) 07:33, 25 April 2023 (UTC)

Protected edit request on 27 April 2023 - add help class
I request creating an optional help-class that is similar to redirect in that it can be activated by setting help=yes, and which can then be used to automatically categorise pages in the help namespace. I have added to code necessary to do this at the sandbox at, and the difference between my version and the current code in the Module is at and it involves adding

to resolveDefaultGrade before what is currently line 56, and adding before

to getGrade before what is currently line 117. The specific line numbers don't matter so long as it's in the correct set of if-else statements. Indigopari (talk) 03:01, 27 April 2023 (UTC)


 * I'll add my merged code at the same time &mdash; Martin (MSGJ · talk) 05:14, 27 April 2023 (UTC)
 * It wouldn't need to be be like redirect, more like category, file, project or template - a simple namespace detection. -- Red rose64 &#x1f339; (talk) 08:37, 27 April 2023 (UTC)
 * The way it has been set up is the same as for the other namespaces, i.e. in the corresponding namespace (ns==13) or help. The latter may not be needed but gives project maximum flexibility - for example there could be a help page in the project namespace and they could classify this manually. &mdash; Martin (MSGJ · talk) 09:21, 27 April 2023 (UTC)
 * ✅ &mdash; Martin (MSGJ · talk) 11:24, 27 April 2023 (UTC)
 * and reverted due to errors. (My changes not Indigopari's.) Test cases on sandbox were working fine, so need to explore further &mdash; Martin (MSGJ · talk) 11:26, 27 April 2023 (UTC)
 * Okay stupid mistake on my part, but this is now deployed &mdash; Martin (MSGJ · talk) 11:35, 27 April 2023 (UTC)

Follow-up
I would like to review this proposal, because Help-class was added to the extended quality scale, which I don't think is what was proposed and is certainly not what I understood, as effectively activates this class for the vast majority of WikiProjects. I think what we want is for yes to activate the class but not yes. Ping &mdash; Martin (MSGJ · talk) 10:15, 17 October 2023 (UTC)


 * I think this is now resolved. I added the same logic for yes &mdash; Martin (MSGJ · talk) 22:24, 21 October 2023 (UTC)

B-class checklist logic
Please see Wikipedia talk:WikiProject Council which would impact this module &mdash; Martin (MSGJ · talk) 14:00, 11 September 2023 (UTC)


 * For posterity, the following logic was implemented:
 * If class=B or class=C and all B-class criteria passed => B-class
 * If class=B or class=C and any of the B-class criteria failed => C-class
 * If class=B or class=C and not all criteria passed and none failed => defer to input class
 * &mdash; Martin (MSGJ · talk) 10:21, 17 October 2023 (UTC)

class=SIA
I propose to make "SIA" / "sia" an alias for List-class, which seems to be the closest matching class in the standard quality scale. &mdash; Martin (MSGJ · talk) 08:46, 12 October 2023 (UTC)
 * I see SIAs as more like dab pages. But there are those that differ. -- Red rose64 &#x1f339; (talk) 22:04, 13 October 2023 (UTC)
 * Some related discussion here &mdash; Martin (MSGJ · talk) 19:18, 15 October 2023 (UTC)
 * Code is on the sandbox. Does this need further discussion do you think? Disambiguation pages will be identified by the banner shell automatically, so when PIQA is deployed this will result in a conflict which will then be fixed manually. &mdash; Martin (MSGJ · talk) 11:13, 16 October 2023 (UTC)
 * ✅ &mdash; Martin (MSGJ · talk) 10:21, 17 October 2023 (UTC)

Another possible addition: SL as an alias for List. Some projects have used SL to track Stub/Start quality lists. If they switch to the standard scale, then List-class seems appropriate here. &mdash; Martin (MSGJ · talk) 07:36, 19 October 2023 (UTC)


 * SL and SI as aliases for List &mdash; Martin (MSGJ · talk) 22:23, 21 October 2023 (UTC)

Merge with Module:WikiProject banner
I believe that all uses of this module are via Module:WikiProject banner. A few custom class masks call it independently. Would it make sense to merge the functionality into that module? &mdash; Martin (MSGJ · talk) 15:47, 9 November 2023 (UTC)


 * Just an update. The basic code of this module has been merged into Module:WikiProject banner and so this module is not used by any banner using the standard quality scale. This one is still in use (for now) for custom masks. &mdash; Martin (MSGJ · talk) 19:55, 2 March 2024 (UTC)

Rating non-articles
Following a discussion at Template talk:WikiProject banner shell I am proposing a change in the logic of this module so that all non-articles be rated automatically without regard to the class parameter. In other words, a non-applicable stub on a Template would be ignored and the rating will be Template-class not Stub-class. This would apply to all non-articles, e.g. redirects, drafts, files, disambiguation pages, portals, etc. &mdash; Martin (MSGJ · talk) 21:14, 25 November 2023 (UTC)


 * The only exception (I think) is that FM is allowed in the File namespace. Conversely this value could be ignored in other namespaces. &mdash; Martin (MSGJ · talk) 21:16, 25 November 2023 (UTC)
 * Sounds fine to me (including the longer description given over at Module talk:WikiProject banner), other than I have no idea what FM is or what it is for. It really makes no sense at all for stubs, templates, categories, project pages, etc., to be classified as "Stub" or "B" class.  — SMcCandlish ☏ ¢ 😼  08:06, 26 November 2023 (UTC)
 * Please see Wikipedia talk:Content assessment and my posts there. -- Red rose64 &#x1f339; (talk) 18:39, 26 November 2023 (UTC)
 * The code is in Module:Class mask/sandbox but it will need thorough testing before being implemented &mdash; Martin (MSGJ · talk) 16:32, 27 November 2023 (UTC)
 * New version passed all my tests and has been deployed. &mdash; Martin (MSGJ · talk) 19:52, 28 November 2023 (UTC)

Note that this change has the effect of ignoring disambig on many pages previously assessed as disambiguation pages, but which are now being treated as unassessed. Many of these are set index articles rather than dab pages. This has led to a big discussion at Wikipedia talk:Content assessment. Input welcome &mdash; Martin (MSGJ · talk) 22:23, 1 December 2023 (UTC)


 * I have added back the option to specify disambig to clear the many pages which have become rated as unassessed. I hope this is just a temporary solution, and we continue to discuss the long-term solution at the link above &mdash; Martin (MSGJ · talk) 21:09, 3 December 2023 (UTC)