Template:Quality mask/doc/custom

This template subpage contains a mask which normalizes the input passed to quality. This can be thought of as the 'default' mask, but it is possible for banners to define their own individual masks with wider or fewer choices of acceptable inputs.

If the page corresponding to  exists and   is set in the banner, then control is passed to the code on that page to normalize the input, and no modification is performed by the WPBannerMeta itself. The following parameter is available to be used:
 * quality

Some caveats:
 * WPBannerMeta/qualityscale treats a null output from the mask as "unassessed"
 * WPBannerMeta/importancescale handles importance ratings differently when the mask outputs "NB"

Any alternative mask needs to be carefully designed to handle all inputs correctly, with care given to case-insentivity, etc.

Examples
The following code accepts only the standard assessment scale with a few extras:

An example using all classifications and namespace detection:

Generic self-documentation
A minor problem with the examples above is that someone clicking the link from the banner template to see the custom mask will be presented with a blank page (you have to edit the page to see there's actually code). A simple solution is to add a local wrapper to your code, replacing the basic structure:

with this one: &lt;noinclude>:''Custom mask used by undefined:'' &lt;pre>&lt;/noinclude>&lt;noinclude>&lt;/pre>&lt;/noinclude>