Module:WikiProject banner/doc

Module:WikiProject banner can be used to create WikiProject banners, enabling new projects to easily create a banner to place on article talk pages, ensuring standardisation between projects. A list of all WikiProject banners using this meta-template can be found here.

As this is a meta template, it should not be transcluded directly on to talk pages when you want to tag a page. Instead, use the template provided by the WikiProject.

WikiProject banners are categorised into a subcategory of Category:WikiProject banner templates. It is not necessary to include a category link in the documentation for each project banner. Any project banners with issues are automatically added to Category:WikiProject banners with errors.

Syntax
The template can be used at varying levels of complexity, from the very simple to the extremely complicated. Simple options are listed here first, with complexity increasing down the page.

Two different types of parameters are used: formatting and display:
 * Formatting parameters customise the meta-template for a particular project, defining link targets, categories, images, and text. All formatting parameters use UPPERCASE and underscores (_) instead of spaces, for example  and.
 * Display parameters customise the template output for each individual article that the banner is displayed on. These are the parameters which are entered on the talk page (, , etc.) and they must be 'passed through' the project banner to the meta-template underneath. To 'pass' the parameter  , you need to include the code.

Parameters
In the examples below, a WikiProject banner will be constructed for the (currently) nonexistent WikiProject Tulips.

Simple options

 * (Required) – the name of the project without the word "WikiProject", used in a variety of contexts; first letter should usually be capitalised. Eg:
 *  – it is assumed that page name of the banner template is  '''. If this is not the case then define the page name in this parameter. Eg:
 * – it is assumed that the project is located at  . If this is not the case, then define the full link to the project page in this parameter. Eg:
 * – if your project is not called   then define the exact name of the project with this parameter.


 * – this allows the template to detect if it has been substituted instead of transcluded and give an error message.  
 * (Required) – the 'category' parameter must be passed through the template to enable category optout. E.g.:  .
 * (Required) – the 'listas' parameter must be passed through the template. Eg:
 * – the location of an image to use in the top-left corner of the banner. Do not include the "File:" prefix. Images used on WikiProject banners must be free images – fair use images are not permitted. Eg:
 * – the size of . Default is 80px. Eg:
 * – the location of an image to use in the top-right corner of the banner. Do not include the "File:" prefix. Images used on WikiProject banners must be free images – fair use images are not permitted. Eg:
 * – the size of . Default is 80px. Eg:
 * – the default text is "This article is within the scope of  WikiProject , a collaborative effort to improve the coverage of    articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the  Talk:  discussion and see a list of open tasks." If defined, the alternate message will be displayed.
 * – the default article is ; alternatively, the linked article can be changed to either a raw article title or more complicated text. Eg: (default)   &rarr; "...the coverage of tulips on Wikipedia..." or (alternate)   &rarr; "...the coverage of tulips, liliaceae and related articles on Wikipedia..."
 * – if the WikiProject maintains a portal, define this parameter with the portal name. The associated image is held centrally at Module:Portal/images. Eg:
 * – the default is no main category created; if defined, all pages displaying the template will be sorted into Category: . Eg:  → Category:WikiProject Tulips articles
 * – if defined, contains text that will appear across the bottom of the banner and above the collapsed section (if one is present). Please do not use this parameter to 'hook' extra code to the bottom of the template – see the hooks section below for a better solution.

Example

 * Produces:

Assessment
Many projects use the Content assessment schema to grade their articles by quality and the corresponding importance scale to place their articles in order of priority. In order to implement WP:1.0, which uses a bot to automatically compile its statistics tables, you will need to follow the instructions at /Using the bot, as well as those outlined here.
 * (Required)– the class parameter must be passed through, if the quality scale is used. Eg:
 * the auto parameter must be passed through, if the auto assess option is needed. Eg:  Projects which use bots to automatically categorise articles can have the bot add the following parameter to the project banner, which triggers the display of a small notice that the article was tagged by a bot rather than a human:
 * , for an article which includes a stub template, to indicate that it has automatically been rated Stub-class;
 * , to show that the class has automatically been inherited from other WikiProject's assessments on the same page;
 * , to show that the class has automatically been deduced from the length of the article.
 * – if defined, all articles with the auto parameter will be categorised into Category: . By default, they are categorised into Category:Automatically assessed  articles. Eg:   → Category:Automatically assessed Tulip and Daffodil articles
 * ,,  ,  ,  ,   – the six B-class criteria parameters.
 * – if defined, enables the standard importance scale (Top, High, Mid, Low, NA, Unknown). Eg:
 * – configures the importance scale, if used. The possible options are:
 * standard – enables the 'standard' importance scale (Top, High, Mid, Low, NA and Unknown). (This is the default behaviour.)
 * inline – allows for a simple custom importance scale to be defined, generally with Importance mask.
 * subpage – allows for a more complex custom importance scale to be used using a subpage called /importance.
 * – the link to a WikiProject-specific quality (and/or importance) scale. If there is a page at   then this will be used by default. To override this, you can set this parameter to no.
 * – articles are sorted into categories based on their quality; so "Featured Articles" on Tulips would be categorised by default into Category:FA-Class Tulips articles. To change the default, define this parameter so that featured articles are instead categorised into Category:FA-Class ASSESSMENT_CAT. Eg:  → Category:FA-Class Liliaceae articles

Example

 * Produces:

Alerts and notes
Built into the module is the ability to display a number of other fields that contain useful information about the article. There are also three predefined fields for: The parameters are:
 * 1) articles which have been automatically assessed by a bot (see above);
 * 2) articles in need of immediate attention;
 * 3) articles in need of an infobox.
 * – pass this parameter through to enable the use of the attention note. Eg:, then by including   on the talk page.
 * – if defined, all articles displaying the attention note will be categorised into Category: . By default, they are categorised into Category: articles needing attention. Eg:   → Category:Floridiae taskforce articles needing attention. A value of   results in no categorisation.
 * – pass this parameter through to enable the use of the needs-infobox note. Eg:, then by including   on the talk page.
 * – if defined, all articles displaying the needs-infobox note will be categorised into Category: . By default, they are categorised into Category: articles needing infoboxes. Eg:   → Category:Floridiae taskforce articles needing infoboxes. A value of   results in no categorisation.
 * – pass this parameter through to trigger any defined note. Eg:, then by including   on the talk page.
 * – the text of note 1. E.g.: This page has been marked as needing a photograph. If this is left blank there is no visual output.
 * – an image can be defined for each note. Remember that all images must be free, not fair-use. Eg:
 * – if defined, all articles displaying note 1 will be categorised into Category: . Eg:  → Category:Wikipedia requested photographs of Floridiae
 * – when more than a threshold number of notes and alerts are triggered on a page, they are automagically collapsed into a show/hide box. The threshold number can be customised by setting this parameter to the maximum number of notes on a page that will not trigger the collapse.  The default is 2, so if three notes are triggered on a page, they will not be collapsed, but if a fourth is also triggered, the collapse box appears.  So setting 0 will always create a collapse box (if there are any notes to fill it), while 999 will never trigger a collapse box. Eg:
 * – the heading for the collapsed section; the default is More information: Eg:
 * – the size of the image used for the icons. (It is recommended to precede the size with "x" as this specifies the height of the image instead of the width, which results in a neater banner because all rows have equal height.) The default is a height of 25px. Eg:

Example

 * Produces:

Task forces
The module can accommodate task forces, each with its own image, links and importance scale, if desired. The following parameters are available:
 * – this parameter must be passed through to enable and trigger the display of the task force section. Eg:
 * – the full page name of the task force's project page. Eg:
 * – the name of the task force. This is used as the label for the task force link (unless TF_1_TEXT is used instead). Eg:
 * – if defined, a link of the form "/ | " is added after the main project's name when the banner is collapsed inside a WikiProject banner shell. Eg:
 * – if defined, replaces the default "This page is supported by..." text. E.g.:   If defined to be "none", then no output will be displayed, although appropriate categories will still be added.
 * – an image can be defined for each task force. Remember that all images must be free, not fair-use. Eg:
 * – if defined, enables the quality categorisations for the main project (e.g.: Category:FA-Class Tulips articles) to be duplicated for the task force. The class arising from class and QUALITY_SCALE will be used; Eg:
 * – if defined, enables the use of a separate importance (or priority, if used) scale for the task force.Eg:
 * (Required if quality or importance assessments are used) – the assessment category to be used for the task force-specific quality and importance assessments. Identical in syntax to ASSESSMENT_CAT. Eg:  → Category:FA-Class Floridiae articles
 * – if defined, all pages displaying "tf 1" will be categorised into Category: . Eg:  → Category:Floridiae articles
 * – additional code to "hook" on the template only if this task force is used.
 * – the size of the taskforce icons. (It is recommended to precede the size with "x" as this specifies the height of the image instead of the width, which results in a neater banner because all rows have equal height.) The default is a height of 25px. Eg:

Example

 * Produces:

B-class checklist
Enables a B-class checklist. There are six official criteria (although some projects use five) that an article needs to satisfy in order to be classified as B-class. A checklist can provide a helpful aid for editors to show where an article needs improvement.

Required parameters

 * The six B-Class criteria:,  ,  ,  ,  ,

Optional parameters

 * – if set to "yes", the checklist will be displayed on every Start-class article. The default behaviour is to only display on Start-class when one or more of the parameters b1-b6 have been filled in.
 * – specifies a category to use when any of the checklist parameters are blank.
 * to  – specifies individual categories to use when the individual checklist parameters are blank or set to no.

Custom parameter names
The standard parameter names (i.e. b1, b2, etc.) should be passed as an alternative to any custom parameters (e.g. B-Class-1, B-Class-2, etc.). For example: b1=

If only the standard parameters are used, then eg:, etc. is fine.

Collapsing task forces
By default, the list of task forces will be collapsed into a show/hide box if there are more than task forces. You can configure this behaviour with the following parameters:
 * – the threshold number of task forces for them to collapse, e.g. if 3 then they will collapse whenever there are more than 3 task forces.
 * – the heading for the collapsed section. The default is 

To-do list
This enables a project to-do list or other similar list to be integrated into a project banner. There are two main parameters, TODO_LINK and TODO_TEXT. Only one should be used at any time. If the to-do list is located on a different page then  should be used. However, if you've just got some text to include then you can use the  option instead.

Styling can be adjusted using the TODO_STYLE and TODO_TITLE_STYLE parameters.

If you are using TODO_LINK and don't want to see the edit links at the top of the textbox, set.

Example

 * Produces:

Quality/importance category intersection
This feature adds categories which combine quality and importance such as Category:Start-Class High-importance Kent-related articles. It has no visible output.

It takes the following parameters:

Required parameters

 * – the format of the category names. The,   and   are replaced by the class, importance and topic respectively. For example:
 * , e.g. Category:Mid-importance B-Class Geology articles
 * , e.g. Category:C-Class Andhra Pradesh articles of Low-importance
 * , e.g. Category:B-Class High-importance Pornography articles
 * , e.g. Category:Stub-Class, Top-importance Economics articles

Optional parameters

 * – can be set to yes to stop categories being added when either class or importance is "NA". These can also be set individually:
 * – can be set to yes to stop categories being added when class=NA
 * – can be set to yes to stop categories being added when importance=NA
 * – text to append to the class when it is "Unassessed", e.g. -Class

Image-needed note
This feature adds a note than can be used to track when articles needs an image, photograph, diagram, illustration, etc. It will populate various categories such as

It takes the following parameters:

Required parameters

 * – pass through whichever parameter you are using to trigger this note, e.g. image-needed.

Optional parameters

 * – specifies the icon to be used (without the File namespace prefix); the default is Camera-photo.svg.
 * – pass through the type which can be used to accommodate other components that are needed, e.g. diagram, equation, map, etc. If this is not specified then "image or photograph" is used. E.g. image-type.
 * – to allow an editor to pass more details about the required image, e.g. image-details.
 * – pass this parameter through to allow an editor to specify the location of the requested image, e.g. image-location. This will also populate categories of the form Category:Wikipedia requested photographs in Scotland.
 *   – a default category to use when the location is not specified or leads to a non-existent category.
 *   – pass this through to allow an editor to specify a topic area that the photograph relates to, e.g. image-topic. This will populate categories such as Category:Wikipedia requested photographs of toys.
 *   – a default category in case the topic is not specified or leads to a non-existent category, e.g. Wikipedia requested images of politics.

Collaboration note
This featue enables a project collaboration system to be integrated into a project banner. The following parameters are used:

Required parameters

 * – pass the parameter that will trigger the collaboration candidate note, if used, e.g. collaboration-candidate
 * – the parameter that will trigger the current collaboration note, if used. E.g. collaboration-current
 * – the parameter that will trigger the past collaboration note, if used. e.g. collaboration-past
 * – the full link to where the review for the particular article is held. E.g. Wikipedia:WikiProject Paranormal/Collaboration

Optional parameters

 * – the text to display in place of the default "project collaboration", e.g. Collaboration of the Month
 * – the name of the image to use. If not specified then Crystal 128 kuser.png is used.
 * – if defined, pages using yes will be categorised into this category, e.g. Paranormal collaboration candidates → Category:Paranormal collaboration candidates
 * – if defined, pages using yes will be categorised into this category, e.g. Paranormal collaborations → Category:Paranormal collaborations
 * – if defined, pages using yes will be categorised into this category, e.g. Past paranormal collaborations → Category:Past paranormal collaborations

A-class review note
This feature enables an A-Class review process to be integrated into a project banner. The following parameters are used:

Required parameters

 * – the parameter that will trigger the note. Accepted values are "pass", "fail", "current" (any capitalisation); everything else is treated as null.  Eg:
 * – the full link to where the review for this particular article is held. Eg:
 * – the full link to the main A-Class review page (where instructions etc. are held). Eg:

Optional parameters

 * – pages using pass will be categorised into this category. Eg:  → Category:Successful requests for Tulips A-Class review
 * – pages using fail will be categorised into this category. Eg:  → Category:Failed requests for Tulips A-Class review
 * – pages using current will be categorised into this category. Eg:  → Category:Current requests for Tulips A-Class review
 * – a custom image can be set, using the same syntax as for other note images. Eg:
 * – a custom image size can be set, using the usual note syntax. Eg:
 * – pages specifying the A Class parameter without a valid SUBPAGE_LINK page existing will be categorised into this category.

Additional task force categories
Sometimes it is desirable to populate additional categories when certain task forces are used. For example the attention parameter is used to draw attention to articles which need immediate attention in the cycling project. Articles within the scope of the Tour de France task force populate the additional category of Category:Tour de France articles needing attention.

This can be achieved by using the following code:

Peer review note
This feature enables a peer review process to be integrated into a project banner. The following parameters are used:

Required parameters

 * – the parameter that will trigger the active peer review note; should be passed through, e.g. peer review
 * – the parameter that will trigger the old peer review note; should be passed through, e.g. old peer review
 * – the full link to where the review for this particular article is held, e.g. Wikipedia:WikiProject Tulips/Assessment

Optional parameters

 * – the name of the image to use. If not specified then Exquisite-kfind.png is used.
 * – if defined, pages using yes will be categorised into this category, e.g. Requests for Tulips peer review → Category:Requests for Tulips peer review
 * – if defined, pages using yes will be categorised into this category.
 * – If the page has been moved since it was reviewed, pass this parameter to specify the old page title (the one the review was archived under) to make the link point correctly to the review.
 * – if defined, pages without a valid existing peer review page will be categorised into this category.

Other hooks
WPBannerMeta incorporates a number of 'hooks' where advanced or customised features can be added. These should take the form of a subtemplate passed to the relevant hook parameter. Any relevant parameters should then be passed to the hook template – it may be necessary to repeat parameters that are already passed to the main template (category and class are commonly used).

Custom masks
The module uses a mask to normalise the values given to the class parameter, to ensure that invalid inputs are discarded (e.g. cheesecake) and that equivalent inputs appear the same (e.g. FA and fA). This mask effectively controls which extended assessment scale values are accepted by the template (e.g. "Template-Class", "Redirect-Class", etc.). Projects which want to use more obscure assessment classes (e.g. "Future-Class", "Bplus-Class", etc.) or to not use all of the standard classes (e.g. not using "C-Class") can define their own custom mask, which will override the default. To achieve this, create the mask template in the /class subpage of your project banner template and set custom. Note that this will remove the project from project-independent quality assesments, and so no assessments will be inherited from other projects.

Inactive WikiProject banners
A number of WikiProjects have been identified as inactive or defunct (see ). In this case, the project banner can be given a less prominent form. Keeping an inactive project's template on relevant talkpages helps any group of users who later wishes to revive the project. This template will auto-categorize the project banner into.

The easiest way to convert a banner template to an inactive state, is to replace main with inactive.

Parameters

 * The only required parameter is PROJECT - the name of the WikiProject (but without the word "WikiProject")
 * An additional parameter PROJECT_STATUS can be used to identify the status of the inactive project. Currently recognised values are inactive and defunct. The default is inactive.
 * All the other parameters can and should be retained, as this will make it easier to "revive" the project in the future.

Examples

 * produces:


 * When inside a banner shell the result is:


 * produces:


 * When inside a banner shell the result is: