ઢાંચો:WPBannerMeta/doc
This is a documentation subpage for ઢાંચો:WPBannerMeta. It may contain usage information, categories and other content that is not part of the original ઢાંચો page. |
This ઢાંચો employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here. |
This template is used on approximately ૯૯,૩૦,૦૦૦ pages, or roughly 7590% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
This template does not display in the mobile view of Wikipedia; it is desktop only. Read the documentation for an explanation. |
WPBannerMeta is a meta-template, which 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 at What links here: WPBannerMeta
This is a meta template. It is used to build other templates. Do not transclude this template directly on to talk pages when you want to tag a page. Instead, use the template provided by the WikiProject.
Syntax
ફેરફાર કરોWPBannerMeta 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.
WPBannerMeta takes two different types of parameters: formatting and display. The 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 (e.g. |PROJECT=
and |NOTE_1_CAT=
). 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 (|class=
, |importance=
, etc.) and they must be 'passed through' the project banner to the meta-template underneath. To 'pass' the parameter foo
, you need to include the code foo={{{foo|}}}
.
Parameters
ફેરફાર કરો
| ||
|
In the examples below, a WikiProject banner will be constructed for the (currently) nonexistent WikiProject Tulips.
Simple options
ફેરફાર કરોPROJECT
(Required) – the name of the project without the word "WikiProject", used in a variety of contexts; first letter should usually be capitalised. Eg:Tulips
– it is assumed that page name of the banner template isBANNER_NAME={{subst:FULLPAGENAME}}
"Template:WikiProject <PROJECT>"
. If this is not the case then define the page name in this parameter. Eg:Template:Tulips project
PROJECT_LINK
– it is assumed that the project is located at"Wikipedia:WikiProject <PROJECT>"
. If this is not the case, then define the full link to the project page in this parameter. Eg:Wikipedia:WikiProject Tulips
PROJECT_NAME
– if your project is not called"WikiProject <PROJECT>"
then define the exact name of the project with this parameter.
DOC
– if|DOC=auto
is set then automatically generated documentation will be added to the template page. Other options are:|DOC=custom
– this will transclude the /doc page to allow custom (not automatic) documentation to be displayed. This can be used instead of the customary<noinclude>{{Documentation}}</noinclude>
at the bottom of the template.|DOC=auto+custom
– this will include the automatic documentation and additionally transclude the /doc page. This allows extra instructions and categories to be included.|DOC=none
– (or left blank) will not include any documentation.
substcheck
– this allows the template to detect if it has been substituted instead of transcluded and give an error message.substcheck=<includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly>
category
(Required) – the 'category' parameter must be passed through the template to enable category optout. E.g.:category={{{category|}}}
.listas
(Required) – the 'listas' parameter must be passed through the template. Eg:listas={{{listas|}}}
IMAGE_LEFT
– 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:Tulipa suaveolens floriade to Canberra.jpg
IMAGE_LEFT_SIZE
– the size ofIMAGE_LEFT
. Default is 80px. Eg:50px
IMAGE_RIGHT
– 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:Tulipa suaveolens floriade to Canberra.jpg
IMAGE_RIGHT_SIZE
– the size ofIMAGE_RIGHT
. Default is 80px. Eg:50px
MAIN_TEXT
– the default text is "This article is within the scope of [[WikiProject {{{PROJECT_LINK}}}]], a collaborative effort to improve the coverage of {{{PROJECT or MAIN_ARTICLE}}} articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the [[Talk:{{{PROJECT_LINK}}}]] discussion and see a list of open tasks." If defined, the alternate message will be displayed.MAIN_ARTICLE
– the default article isPROJECT
; alternatively, the linked article can be changed to either a raw article title or more complicated text. Eg: (default)tulips
→ "...the coverage of tulips on Wikipedia..." or (alternate)[[tulip]]s, [[liliaceae]] and related articles
→ "...the coverage of tulips, liliaceae and related articles on Wikipedia..."
PORTAL
– if the WikiProject maintains a portal, define this parameter with the portal name. The associated image is held centrally at Module:Portal/images. Eg:Tulips
MAIN_CAT
– the default is no main category created; if defined, all pages displaying the template will be sorted into Category:MAIN_CAT
. Eg:WikiProject Tulips articles
→ Category:WikiProject Tulips articlesBOTTOM_TEXT
– 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:
{{WPBannerMeta
|PROJECT = Tulips
|BANNER_NAME = Template:WikiProject Tulips
|substcheck=<includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly>
|category={{{category|}}}
|listas={{{listas|}}}
|PROJECT_LINK = Wikipedia:Somewhere about tulips
|IMAGE_LEFT = Tulipa suaveolens floriade to Canberra.jpg
|IMAGE_LEFT_SIZE = 50px
|MAIN_ARTICLE = [[tulip]]s, [[liliaceae]] and related articles
}}
|
- Produces:
WikiProject Tulips | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
ચેતવણી: કી "¬" આગળનામૂળે પ્રસ્થાપિત ક્રમિકાવર્ગીકરણ કી "WPBannerMeta/doc"નું સ્થાન લઈ લેશે..
Assessment
ફેરફાર કરોMany projects use the Version 1.0 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.
class
(Required)– the class parameter must be passed through, if the quality scale is used. Eg:class={{{class|}}}
QUALITY_SCALE
– configures the quality scale; possible options are:- standard – enables the 'standard' quality scale (FA, A, GA, B, C, Start, Stub, FL, List, NA). (This is the default behaviour, if the class parameter is used.)
- extended – enables the 'standard' quality scale plus some additional values (Category, Disambig, Draft, File, Portal, Project and Template).
- inline – allows for a simple custom quality scale to be used, generally used with {{Class mask}}.
- subpage – allows for a more complex custom quality scale to be used using a subpage called /class. See custom masks below for further details.
auto
the auto parameter must be passed through, if the auto assess option is needed. Eg:auto={{{auto|}}}
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:|auto=stub
, for an article which includes a stub template, to indicate that it has automatically been rated Stub-class;|auto=inherit
, to show that the class has automatically been inherited from other WikiProject's assessments on the same page;|auto=length
, to show that the class has automatically been deduced from the length of the article.
AUTO_ASSESS_CAT
– if defined, all articles with the|auto=
parameter will be categorised into Category:AUTO_ASSESS_CAT
. By default, they are categorised into Category:Automatically assessedPROJECT
articles. Eg:Automatically assessed Tulip and Daffodil articles
→ Category:Automatically assessed Tulip and Daffodil articles
b1
,b2
,b3
,b4
,b5
,b6
– the six B-class criteria parameters should only be passed through if the B-class checklist hook is used.
importance
– if defined, enables the standard importance scale (Top, High, Mid, Low, NA, Unknown). Eg:importance={{{importance|}}}
IMPORTANCE_SCALE
– 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.
ASSESSMENT_LINK
– the link to a WikiProject-specific quality (and/or importance) scale. If there is a page at"Wikipedia:WikiProject <PROJECTLINK>/Assessment"
then this will be used by default. To override this, you can set this parameter to no. For more details, see here.ASSESSMENT_CAT
– 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-ClassASSESSMENT_CAT
. Eg:|ASSESSMENT_CAT=Liliaceae articles
→ Category:FA-Class Liliaceae articles
Example:
{{WPBannerMeta
|PROJECT = Tulips
|BANNER_NAME = Template:WikiProject Tulips
|substcheck=<includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly>
|category={{{category|}}}
|listas={{{listas|}}}
|IMAGE_LEFT = Tulipa suaveolens floriade to Canberra.jpg
|QUALITY_SCALE = extended
|class={{{class|}}}
|auto={{{auto|}}}
|importance={{{importance|}}}
|ASSESSMENT_LINK = Wikipedia:WikiProject Tulips/Article grading
}}
|
- Produces:
WikiProject Tulips | (Rated GA-class, Top-importance) | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Alerts and notes
ફેરફાર કરોBuilt into WPBannerMeta is the ability to display a number of other fields that contain useful information about the article. There are also three predefined fields for:
- articles which have been automatically assessed by a bot (see above);
- articles in need of immediate attention;
- articles in need of an infobox.
The parameters are:
attention
– pass this parameter through to enable the use of the attention note. Eg:attention={{{attention|}}}
, then by including|attention=yes
on the talk page.ATTENTION_CAT
– if defined, all articles displaying the attention note will be categorised into Category:ATTENTION_CAT
. By default, they are categorised into Category:PROJECT
articles needing attention. Eg:Floridiae taskforce articles needing attention
→ Category:Floridiae taskforce articles needing attention. A value ofnone
results in no categorisation.
infobox
– pass this parameter through to enable the use of the needs-infobox note. Eg:infobox={{{needs-infobox|}}}
, then by including|needs-infobox=yes
on the talk page.INFOBOX_CAT
– if defined, all articles displaying the needs-infobox note will be categorised into Category:INFOBOX_CAT
. By default, they are categorised into Category:PROJECT
articles needing infoboxes. Eg:Floridiae taskforce articles needing infoboxes
→ Category:Floridiae taskforce articles needing infoboxes. A value ofnone
results in no categorisation.
note 1
– pass this parameter through to trigger any defined note. Eg:note 1={{{needs-photo|}}}
, then by including|needs-photo=yes
on the talk page. Up to five notes can be specified in the core banner.NOTE_1_TEXT
– 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.NOTE_1_IMAGE
– an image can be defined for each note. Remember that all images must be free, not fair-use. Eg:Gnome-dev-camera.svg
NOTE_1_CAT
– if defined, all articles displaying note 1 will be categorised into Category:NOTE_1_CAT
. Eg:Wikipedia requested photographs of Floridiae
→ Category:Wikipedia requested photographs of Floridiae
COLLAPSED
– 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 3, 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|COLLAPSED=0
will always create a collapse box (if there are any notes to fill it), while|COLLAPSED=999
will never trigger a collapse box. See also the /notecounter hook. Eg:6
COLLAPSED_HEAD
– the heading for the collapsed section; the default is More information: Eg:Additional information:
NOTE_SIZE
– 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:x30px
Example:
{{WPBannerMeta
|PROJECT = Tulips
|BANNER_NAME = Template:WikiProject Tulips
|substcheck=<includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly>
|category={{{category|}}}
|listas={{{listas|}}}
|IMAGE_LEFT = Tulipa suaveolens floriade to Canberra.jpg
|QUALITY_SCALE = extended
|class={{{class|}}}
|ASSESSMENT_LINK = Wikipedia:WikiProject Tulips/Article grading
|auto={{{auto|}}}
|AUTO_ASSESS_CAT =
|attention={{{attention|}}}
|ATTENTION_CAT =
|infobox={{{needs-infobox|}}}
|INFOBOX_CAT =
|note 1={{{needs-photo|}}}
|NOTE_1_TEXT = This page has been marked as needing a [[photograph]].
|NOTE_1_IMAGE = Gnome-dev-camera.svg
|NOTE_1_CAT = Wikipedia requested photographs of Floridiae
|note 2 = {{{audio-file|}}}
|NOTE_2_TEXT = An [[audio file format|audio file]] has been created of this article.
|NOTE_2_IMAGE = Nuvola apps arts.svg
|NOTE_2_CAT = Tulips articles with audio files
}}
|
- Produces:
WikiProject Tulips | (Rated Stub-class) | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Task forces
ફેરફાર કરોWPBannerMeta can accommodate up to five task forces, each with its own image, links and importance scale, if desired. (More than five task forces can be supported through the use of hooks.) The following parameters are available:
tf 1
– this parameter must be passed through to enable and trigger the display of the task force section. Eg:tf 1={{{floridiae|}}}
TF_1_LINK
– the full page name of the task force's project page. Eg:Wikipedia:WikiProject Tulips/Task forces/Floridiae
TF_1_NAME
– 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:the Floridiae task force
TF_1_NESTED
– if defined, a link of the form "/ [[{{{TF_1_LINK}}}|{{{TF_1_NESTED}}}]]" is added after the main project's name when the banner is collapsed inside a {{WikiProject banner shell}}. Eg:Floridiae
TF_1_TEXT
– if defined, replaces the default "This page is supported by..." text. E.g.:This page is within the scope of the [[Wikipedia:WikiProject Tulips/Task forces/Floridiae|Floridiae task force]]. New members are always welcome!
If defined to be "none", then no output will be displayed, although appropriate categories will still be added.TF_1_IMAGE
– an image can be defined for each task force. Remember that all images must be free, not fair-use. Eg:Tulipa florenskyi 4.jpg
TF_1_QUALITY
– 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:yes
tf 1 importance
– if defined, enables the use of a separate importance (or priority, if used) scale for the task force.Eg:tf 1 importance={{{floridiae-importance|}}}
TF_1_ASSESSMENT_CAT
(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:Floridiae articles
→ Category:FA-Class Floridiae articlesTF_1_MAIN_CAT
– if defined, all pages displaying "tf 1" will be categorised into Category:TF_1_MAIN_CAT
. Eg:Floridiae articles
→ Category:Floridiae articles
TF_SIZE
– 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:x30px
Example:
{{WPBannerMeta
|PROJECT = Tulips
|BANNER_NAME = Template:WikiProject Tulips
|substcheck=<includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly>
|category={{{category|}}}
|listas={{{listas|}}}
|IMAGE_LEFT = Tulipa suaveolens floriade to Canberra.jpg
|QUALITY_SCALE = standard
|class={{{class|}}}
|tf 1={{{floridiae|}}}
|TF_1_LINK = Wikipedia:Wikiproject Tulips/Task forces/Floridiae
|TF_1_NAME = the Floridiae task force
|TF_1_NESTED = Floridiae
|TF_1_TEXT =
|TF_1_IMAGE = Tulipa florenskyi 4.jpg
|tf 1 importance={{{floridiae-importance}}}
|TF_1_ASSESSMENT_CAT = Floridiae articles
|TF_1_MAIN_CAT = Floridiae articles
}}
|
- Produces:
WikiProject Tulips / Floridiae | (Rated FA-class) | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Advanced features
ફેરફાર કરો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={{{category|}}}
and |class={{{class|}}}
are commonly used). If you write a hook that you think other projects could use, please copy or move it to a subpage of Template:WPBannerMeta/hooks and add it to the list on that page.
Custom masks
ફેરફાર કરોWPBannerMeta uses a mask to normalise the values given to the |class=
parameter, to ensure that invalid inputs are discarded (e.g. |class=cheesecake
) and that equivalent inputs appear the same (e.g. |class=FA
and |class=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 WPBannerMeta's default.
Other details
ફેરફાર કરોThis meta-template automatically categorises all instances (i.e. specific project banners) 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 errors are automatically added to Category:WikiProject banners with formatting errors.
The core WPBannerMeta template:
To reduce the byte-count of banners that do not make full use of WPBannerMeta's features, most of the optional features are broken out into subpages:
- /doc – the documentation you are now reading.
- /importancescale – the importance classification system.
- /importance – used in conjunction with Template:Importance mask to normalise the value of the
|importance=
parameter.
- /importance – used in conjunction with Template:Importance mask to normalise the value of the
- /istemplate – tests the type of the current page (i.e. article talk page, templatepage, or demonstration).
- /locwarning – warns when the banner template is used on a non-talk page.
- /substwarning – warns when a banner template is substituted.
- /note – an individual note.
- /taskforce – the code for each task force display.
- /templatepage – the categories and notes that only appear on the template page.
- /qualityscale – the quality classification system.
- /class – used in conjunction with Template:Class mask to normalise the
|class=
input and account for B-Class checklist status, if enabled.
- /class – used in conjunction with Template:Class mask to normalise the
See also
ફેરફાર કરો- {{B}} – convenience tool for frequent users of {{WPBannerMeta}}'s
B_CHECKLIST
andb1
throughb6
features - {{Inactive WikiProject banner}} – for use if a WikiProject becomes inactive or defunct
- {{WikiProject banner shell}} – template to combine multiple WikiProject Banners
- {{WPBannerDoc}} – convenience template that generates standardised parameter documentation for use on the /doc page
- Wikipedia:WikiProject Council/Guide § Tagging pages with WikiProject banners – guideline about tagging articles for a project