साचा:Tocleft

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

Common parameters
{{WPBannerMeta
|PROJECT             = 
 |BANNER_NAME        = {{subst:FULLPAGENAME}}
 |substcheck=<includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly>
 |small={{{small|}}}
 |category={{{category|¬}}}
 |listas={{{listas|}}}
|IMAGE_LEFT          = 
 |IMAGE_LEFT_SMALL   = 
 |IMAGE_LEFT_LARGE   = 
|QUALITY_SCALE       = 
 |class={{{class|}}}
 |FULL_QUALITY_SCALE = 
 |auto={{{auto|}}}
 |importance={{{importance|}}}
|ASSESSMENT_CAT      = 
|ASSESSMENT_LINK     = 
|MAIN_TEXT           = 
|MAIN_ARTICLE        = 
|PORTAL              = 
|PORTAL_IMG          = 
|MAIN_CAT            = 
|attention={{{attention|}}}
 |ATTENTION_CAT      = 
|infobox={{{needs-infobox|}}}
 |INFOBOX_CAT        = 
|COMMENTS            = 
 |COMMENTS_CAT       = 
 |COMMENTS_FORCE     = 
}}<noinclude>
{{documentation}}
</noinclude>

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 (eg. |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|}}}.

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
    • 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>
    • small (Required) – the size parameter must be passed through the template to enable the correct display. Eg: small={{{small|}}}
    • category (Required) – the 'category' parameter must be passed through the template to enable category optout. Eg: category={{{category|¬}}}.
    • listas (Required) – the 'listas' parameter must be passed through the template. Eg: listas={{{listas|}}}
    • BANNER_NAME={{subst:FULLPAGENAME}} (Required) – the full page name of the banner. Eg: Template:WikiProject Tulips
  • 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
  • IMAGE_LEFT – the location of an image to use in the top-left corner of the banner. Do not include the "Image:" 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_SMALL – the size of IMAGE_LEFT, when the banner is displayed in 'small style'. Default is 30px. Eg: 25px
    • IMAGE_LEFT_LARGE – the size of IMAGE_LEFT in normal display. Default is 60px. Eg: 50px
  • IMAGE_RIGHT – the location of an image to use in the top-right corner of the banner. Do not include the "Image:" 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_SMALL – the size of IMAGE_RIGHT, when the banner is displayed in 'small style'. Default is 30px. Eg: 25px
    • IMAGE_RIGHT_LARGE – the size of IMAGE_RIGHT in normal display. Default is 60px. 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 is PROJECT; 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. Eg: Tulips
    • PORTAL_IMG – the default 'puzzle-piece' icon for Wikiportals can be overridden with this parameter. Eg: Icon tools.png, instead of the 'puzzle-piece'.
  • 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 articlesCategory:WikiProject Tulips articles
  • BOTTOM_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>
 |small={{{small|}}}
 |category={{{category|¬}}}
 |listas={{{listas|}}}
|PROJECT_LINK     = Wikipedia:Somewhere about tulips
|IMAGE_LEFT       = Tulipa suaveolens floriade to Canberra.jpg
|IMAGE_LEFT_SMALL = 25px
|IMAGE_LEFT_LARGE = 50px
|MAIN_ARTICLE     = [[tulip]]s, [[liliaceae]] and related articles
|PORTAL           = Tulips
|PORTAL_IMG       = Tulipa florenskyi 4.jpg
}}
Produces:
WikiProject Tulips  
WikiProject iconThis लेख is within the scope of WikiProject Tulips, a collaborative effort to improve the coverage of tulips, liliaceae and related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 ???  This लेख has not yet received a rating on the importance scale.
 

{{#assessment:Tulips||Unknown}}

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.

  • QUALITY_SCALE– if defined, enables the 'standard' quality scale (FA, FL, A, GA, B, C, Start, Stub, List). Eg: yes
    • class (Required)– the class parameter must be passed through, if the quality scale is used. Eg: class={{{class|}}}
    • FULL_QUALITY_SCALE– if defined, enables an 'extended' quality scale (NA, Image, Category, Disambig, Portal, Template, Project). Eg: yes (The Redirect class has been removed, use a custom mask to enable it.)
    • 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 as stubs, if they include a stub template, can have the bot add |auto=yes to the project banner, which triggers the display of a small notice that the article was tagged by a bot rather than a human.
    • B_CHECKLIST – if defined, this parameter enables the use of a B-Class checklist, similar to that used by WikiProject Military history. There are six criteria which must be met (see the official descriptions); the pass/fail state of the article with respect to each criteria is passed as the parameters |b1= to |b6=. It is only possible to assess an article as B-Class when all six criteria are met; otherwise, it will be assessed as C-Class.
      • b# – the six B-Class criteria must be passed through if the B-Class checklist is used.
        • The standard parameters must be passed through as an alternative to any custom ones, eg: b1={{{B-Class-1|{{{b1|}}}}}}, etc.
        • If only the standard parameters are used, then eg: b1={{{b1|}}}, etc. is fine.
  • importance– if defined, enables the standard importance scale (Top, High, Mid, Low, NA, Unknown).Eg: importance={{{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. If this parameter is defined, featured articles would instead be categorised into Category:FA-Class ASSESSMENT_CAT. Eg: Liliaceae articlesCategory:FA-Class Liliaceae articles
  • COMMENTS– some projects may want to use a subpage of the article's talk page to post brief, assessment-related comments about the article. If these comments are placed at a "{{FULLPAGENAME}}/Comments" subpage, then this parameter will automatically display a note in the banner showing whether these comments exist or not. Eg: yes
    • COMMENTS_CAT– if this parameter is defined, articles which have comments are sorted into Category:COMMENTS_CAT. By default, these pages are categorised into PROJECT articles with comments. Eg: (alternate) Tulip and Daffodil articles with commentsCategory:Tulip and Daffodil articles with comments. A value of none results in no categorisation.
    • COMMENTS_FORCE– by default, if a comments subpage does not exist, no message is displayed. If this parameter is defined, then a message will be displayed requesting viewers to create the comment subpage. Eg: yes
Example
{{WPBannerMeta
|PROJECT             = Tulips
 |BANNER_NAME        = Template:WikiProject Tulips
 |substcheck=<includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly>
 |small={{{small|}}}
 |category={{{category|¬}}}
 |listas={{{listas|}}}
|IMAGE_LEFT          = Tulipa suaveolens floriade to Canberra.jpg
|QUALITY_SCALE       = yes
 |class={{{class|}}}
 |FULL_QUALITY_SCALE = yes
 |auto={{{auto|}}}
 |importance={{{importance|}}}
|ASSESSMENT_LINK     = Wikipedia:WikiProject Tulips/Article grading
|COMMENTS            = yes
 |COMMENTS_CAT       = 
 |COMMENTS_FORCE     = yes
}}
Produces:
WikiProject Tulips (Rated GA-class, Top-importance)
WikiProject iconThis लेख is within the scope of WikiProject Tulips, a collaborative effort to improve the coverage of Tulips articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 GA  This लेख does not require a rating on the project's quality scale.
 Top  This लेख has been rated as Top-importance on the project's importance scale.
 
This article has been rated but has no comments. If appropriate, please review the article and leave comments here to identify the strengths and weaknesses of the article and how best to improve it.

{{#assessment:Tulips|GA|Top}}

Alerts and notes

संपादन

Built into WPBannerMeta is the ability to display a number of other fields that contain useful information about the article or task-forces to which it is affiliated. There is also a predefined 'attention' field to flag articles in need of immediate attention and a 'needs-infobox' field for flagging articles in need of an infobox.

  • 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.
  • 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.
  • 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 ten notes can be specified in the core banner.
    • NOTE_1_TEXT (Required) – the text of note 1. Eg: This page has been marked as needing a photograph.
    • NOTE_1_IMAGE – an image can be defined for each note. Remember that all images must be free, not fair-use. Eg: Nuvola filesystems camera.png
    • NOTE_1_FORMAT – optional formatting (colour, etc.) for the table cell which contains the image, if any, for the note. Eg: style="background:blue"
    • NOTE_1_CAT – if defined, all articles displaying note 1 will be categorised into Category:NOTE_1_CAT. Eg: Floridiae taskforce articles needing photographsCategory:Floridiae taskforce articles needing photographs
  • 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
Example
{{WPBannerMeta
|PROJECT            = Tulips
 |BANNER_NAME       = Template:WikiProject Tulips
 |substcheck=<includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly>
 |small={{{small|}}}
 |category={{{category|¬}}}
 |listas={{{listas|}}}
|IMAGE_LEFT         = Tulipa suaveolens floriade to Canberra.jpg
|QUALITY_SCALE      = yes
 |class={{{class|}}}
|FULL_QUALITY_SCALE = yes
|ASSESSMENT_LINK    = Wikipedia:WikiProject Tulips/Article grading
|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      = Nuvola filesystems camera.png
 |NOTE_1_FORMAT     = style="background:blue"
 |NOTE_1_CAT        = Floridiae taskforce articles needing photographs
|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.png
 |NOTE_2_CAT        = Tulips articles with audio files
}}
Produces:
WikiProject Tulips (Rated C-class)
WikiProject iconThis लेख is within the scope of WikiProject Tulips, a collaborative effort to improve the coverage of Tulips articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
C-Class article C  This लेख does not require a rating on the project's quality scale.
 ???  This लेख has not yet received a rating on the project's importance scale.

{{#assessment:Tulips|C|Unknown}}

WPBannerMeta can accommodate up to five task forces, each with its own image, links and importance scale, if desired. 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 way the task force's name will appear in its piped link; redundant when |TF_1_TEXT= is used. 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 {{WikiProjectBannerShell}}. Eg: Floridiae
    • TF_1_TEXT – if defined, replaces the default "This page is supported by..." text. Eg: This page is within the scope of the [[Wikipedia:WikiProject Tulips/Task forces/Floridiae|Floridiae task force]]. New members are always welcome!
    • 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_SIZE – the size of the image used can be defined here; the default is 30px. Using a size greater than |IMAGE_LEFT_LARGE= will produce some... interesting... results. Eg: 40px
    • TF_1_QUALITY – if defined, enables the quality categorisations for the main project (eg: Category:FA-Class Tulips articles) to be duplicated for the task force. The options given in |class= and |FULL_QUALITY_SCALE= will be re-used; it is not possible to use a parameter like |floridiae-class=. Requires |QUALITY_SCALE=. Eg: yes
    • tf 1 importance– if defined, enables the use of a separate importance 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 articlesCategory:FA-Class Floridiae articles
    • TF_1_MAIN_CAT – if defined, all pages displaying "tf 1" will be categorised into Category:TF_1_MAIN_CAT. Eg: Floridiae articlesCategory:Floridiae articles
Example
{{WPBannerMeta
|PROJECT              = Tulips
 |BANNER_NAME         = Template:WikiProject Tulips
 |substcheck=<includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly>
 |small={{{small|}}}
 |category={{{category|¬}}}
 |listas={{{listas|}}}
|IMAGE_LEFT           = Tulipa suaveolens floriade to Canberra.jpg
|QUALITY_SCALE        = yes
 |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:

Advanced features

संपादन

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.

WPBannerMeta uses a mask to normalise the values given to the |class= parameter, to ensure that invalid inputs are discarded (eg |class=cheesecake) and that equivalent inputs appear the same (eg |class=FA and |class=fA). This mask effectivley controls which extended assessment scale values are accepted by the template (eg "Template-Class", "Redirect-Class", etc). Projects which want to use more obscure assessment classes (eg "Future-Class", "Bplus-Class", etc) or to not use all of the standard classes (eg not using "C-Class") can define their own custom mask, which will override WPBannerMeta's default.

This meta-template automatically categorises all instances (i.e. specific project banners) into Category:WikiProject banners. It is not necessary to include a category link in the documentation for each project banner.

Normal project banners, which are substituted rather than transcluded, usually show up in Category:WikiProject banners, allowing for a periodic cleanout. Banners using WPBannerMeta do not appear in this category when substituted, making it easier for them to get lost.

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:

  • Template:B – a convenience tool for frequent users of {{WPBannerMeta}}'s B_CHECKLIST and b1 through b6 features


mr:विपीमेटामथळाफलक