Template:WPBannerMeta/doc: Difference between revisions

no edit summary
(→‎Syntax: remove PORTAL references, change Tulips to Idaho)
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:
{{tocleft}}
{{tocleft}}


'''WPBannerMeta''' is a meta-template, which can be used to create [[:Category:WikiProject banners|WikiProject banners]], enabling new projects to easily create a banner to place on article [[WP:TALK|talk pages]], ensuring standardisation between projects.  A list of all WikiProject banners using this meta-template can be found at [http://en.wikipedia.org/w/index.php?title=Special:WhatLinksHere&target=Template%3AWPBannerMeta&limit=50&namespace=10 What links here: WPBannerMeta]
'''WPBannerMeta''' is a meta-template, which can be used to create [[:Category:WikiProject banners|WikiProject banners]], enabling new projects to easily create a banner to place on article [[FamilySearch Wiki:TALK|talk pages]], ensuring standardisation between projects.  A list of all WikiProject banners using this meta-template can be found at [http://en.wikipedia.org/w/index.php?title=Special:WhatLinksHere&target=Template%3AWPBannerMeta&limit=50&namespace=10 What links here: WPBannerMeta]
{{clear}}
{{clear}}


Line 211: Line 211:
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. <code><nowiki>|PROJECT=</nowiki></code> and <code><nowiki>|NOTE_1_CAT= </nowiki></code>). 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 (<code><nowiki>|class=</nowiki></code>, <code><nowiki>|importance=</nowiki></code>, etc.) and they must be 'passed through' the project banner to the meta-template underneath. To 'pass' the parameter <code>foo</code>, you need to include the code {{nowrap|<code><nowiki>foo={{{foo|}}}</nowiki></code>}}.
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. <code><nowiki>|PROJECT=</nowiki></code> and <code><nowiki>|NOTE_1_CAT= </nowiki></code>). 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 (<code><nowiki>|class=</nowiki></code>, <code><nowiki>|importance=</nowiki></code>, etc.) and they must be 'passed through' the project banner to the meta-template underneath. To 'pass' the parameter <code>foo</code>, you need to include the code {{nowrap|<code><nowiki>foo={{{foo|}}}</nowiki></code>}}.


In the examples below, a WikiProject banner will be constructed for the (currently) nonexistent [[Wikipedia:WikiProject Tulips|WikiProject Tulips]].   
In the examples below, a WikiProject banner will be constructed for the [[FamilySearch Wiki:WikiProject Idaho|WikiProject Idaho]].   


===Simple options===
===Simple options===
*<code>'''PROJECT'''</code> ''(Required)''&nbsp;– the name of the project without the word "WikiProject", used in a variety of contexts; first letter should usually be capitalised. {{nowrap|''Eg: <code>'''Tulips'''</code>''}}
*<code>'''PROJECT'''</code> ''(Required)'' – the name of the project without the word "WikiProject", used in a variety of contexts; first letter should usually be capitalised. {{nowrap|''Eg: <code>'''Tulips'''</code>''}}
**<code>'''substcheck'''</code> &ndash; this allows the template to detect if it has been substituted instead of transcluded and give an error message. '''''<code><nowiki>substcheck=<includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly></nowiki></code>'''''
**<code>'''substcheck'''</code> &ndash; this allows the template to detect if it has been substituted instead of transcluded and give an error message. '''''<code><nowiki>substcheck=<includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly></nowiki></code>'''''
**<code>'''small'''</code> ''(Required)'' &ndash; the size parameter ''must'' be passed through the template to enable the correct display. {{nowrap|''Eg: '''<code><nowiki>small={{{small|}}}</nowiki></code>'''''}}
**<code>'''small'''</code> ''(Required)'' &ndash; the size parameter ''must'' be passed through the template to enable the correct display. {{nowrap|''Eg: '''<code><nowiki>small={{{small|}}}</nowiki></code>'''''}}
Line 221: Line 221:
**<code>'''<code><nowiki>BANNER_NAME={{subst:FULLPAGENAME}}</nowiki></code>'''</code> ''(Required)'' &ndash; the full page name of the banner. {{nowrap|''Eg: '''<code><nowiki>Template:WikiProject Tulips</nowiki></code>'''''}}
**<code>'''<code><nowiki>BANNER_NAME={{subst:FULLPAGENAME}}</nowiki></code>'''</code> ''(Required)'' &ndash; the full page name of the banner. {{nowrap|''Eg: '''<code><nowiki>Template:WikiProject Tulips</nowiki></code>'''''}}
*<code>'''PROJECT_LINK'''</code> &ndash; it is assumed that the project is located at '''<code>"Wikipedia:WikiProject &lt;PROJECT>"</code>'''. If this is not the case, then define the full link to the project page in this parameter. {{nowrap|''Eg: '''<code>Wikipedia:WikiProject Tulips</code>'''''}}
*<code>'''PROJECT_LINK'''</code> &ndash; it is assumed that the project is located at '''<code>"Wikipedia:WikiProject &lt;PROJECT>"</code>'''. If this is not the case, then define the full link to the project page in this parameter. {{nowrap|''Eg: '''<code>Wikipedia:WikiProject Tulips</code>'''''}}
*<code>'''IMAGE_LEFT'''</code> &ndash; 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&nbsp;– [[WP:FU|fair use]] images are '''''not''''' permitted. {{nowrap|''Eg: '''<code>[[:Image:Tulip - floriade canberra.jpg|Tulip - floriade canberra.jpg]]</code>'''''}}
*<code>'''IMAGE_LEFT'''</code> &ndash; 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 – [[WP:FU|fair use]] images are '''''not''''' permitted. {{nowrap|''Eg: '''<code>[[:Image:Tulip - floriade canberra.jpg|Tulip - floriade canberra.jpg]]</code>'''''}}
**<code>'''IMAGE_LEFT_SMALL'''</code> &ndash; the size of <code>IMAGE_LEFT</code>, when the banner is displayed in 'small style'. Default is 40px. {{nowrap|''Eg: '''<code><nowiki>25px</nowiki></code>'''''}}
**<code>'''IMAGE_LEFT_SMALL'''</code> &ndash; the size of <code>IMAGE_LEFT</code>, when the banner is displayed in 'small style'. Default is 40px. {{nowrap|''Eg: '''<code><nowiki>25px</nowiki></code>'''''}}
**<code>'''IMAGE_LEFT_LARGE'''</code> &ndash; the size of <code>IMAGE_LEFT</code> in normal display. Default is 80px. {{nowrap|''Eg: '''<code><nowiki>50px</nowiki></code>'''''}}
**<code>'''IMAGE_LEFT_LARGE'''</code> &ndash; the size of <code>IMAGE_LEFT</code> in normal display. Default is 80px. {{nowrap|''Eg: '''<code><nowiki>50px</nowiki></code>'''''}}
*<code>'''IMAGE_RIGHT'''</code> &ndash; 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&nbsp;– [[WP:FU|fair use]] images are '''''not''''' permitted. {{nowrap|''Eg: '''<code>[[:Image:Tulip - floriade canberra.jpg|Tulip - floriade canberra.jpg]]</code>'''''}}
*<code>'''IMAGE_RIGHT'''</code> &ndash; 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 – [[WP:FU|fair use]] images are '''''not''''' permitted. {{nowrap|''Eg: '''<code>[[:Image:Tulip - floriade canberra.jpg|Tulip - floriade canberra.jpg]]</code>'''''}}
**<code>'''IMAGE_RIGHT_SMALL'''</code> &ndash; the size of <code>IMAGE_RIGHT</code>, when the banner is displayed in 'small style'. Default is 40px. {{nowrap|''Eg: '''<code><nowiki>25px</nowiki></code>'''''}}
**<code>'''IMAGE_RIGHT_SMALL'''</code> &ndash; the size of <code>IMAGE_RIGHT</code>, when the banner is displayed in 'small style'. Default is 40px. {{nowrap|''Eg: '''<code><nowiki>25px</nowiki></code>'''''}}
**<code>'''IMAGE_RIGHT_LARGE'''</code> &ndash; the size of <code>IMAGE_RIGHT</code> in normal display. Default is 80px. {{nowrap|''Eg: '''<code><nowiki>50px</nowiki></code>'''''}}
**<code>'''IMAGE_RIGHT_LARGE'''</code> &ndash; the size of <code>IMAGE_RIGHT</code> in normal display. Default is 80px. {{nowrap|''Eg: '''<code><nowiki>50px</nowiki></code>'''''}}
Line 274: Line 274:
**:<code><nowiki>|auto=inherit</nowiki></code>, to show that the class has automatically been inherited from other WikiProject's assessments on the same page;
**:<code><nowiki>|auto=inherit</nowiki></code>, to show that the class has automatically been inherited from other WikiProject's assessments on the same page;
**:<code><nowiki>|auto=length</nowiki></code>, to show that the class has automatically been deduced from the length of the article.
**:<code><nowiki>|auto=length</nowiki></code>, to show that the class has automatically been deduced from the length of the article.
***<code>'''AUTO_ASSESS_CAT'''</code>&nbsp;– if defined, all articles with the {{para|auto}} parameter will be categorised into [[:Category:AUTO_ASSESS_CAT|Category:<code>AUTO_ASSESS_CAT</code>]]. By default, they are categorised into [[:Category:Automatically assessed PROJECT articles|Category:Automatically assessed <code>PROJECT</code> articles]]. {{nowrap|''Eg: '''<code><nowiki>Automatically assessed Tulip and Daffodil articles</nowiki></code>''' → [[:Category:Automatically assessed Tulip and Daffodil articles]]''}}
***<code>'''AUTO_ASSESS_CAT'''</code> – if defined, all articles with the {{para|auto}} parameter will be categorised into [[:Category:AUTO_ASSESS_CAT|Category:<code>AUTO_ASSESS_CAT</code>]]. By default, they are categorised into [[:Category:Automatically assessed PROJECT articles|Category:Automatically assessed <code>PROJECT</code> articles]]. {{nowrap|''Eg: '''<code><nowiki>Automatically assessed Tulip and Daffodil articles</nowiki></code>''' → [[:Category:Automatically assessed Tulip and Daffodil articles]]''}}
**<code>'''b1'''</code>, <code>'''b2'''</code>, <code>'''b3'''</code>, <code>'''b4'''</code>, <code>'''b5'''</code>, <code>'''b6'''</code> &ndash; the six B-class criteria parameters should only be passed through if the [[Template:WPBannerMeta/hooks/bchecklist|B-class checklist hook]] is used.
**<code>'''b1'''</code>, <code>'''b2'''</code>, <code>'''b3'''</code>, <code>'''b4'''</code>, <code>'''b5'''</code>, <code>'''b6'''</code> &ndash; the six B-class criteria parameters should only be passed through if the [[Template:WPBannerMeta/hooks/bchecklist|B-class checklist hook]] is used.
*<code>'''importance'''</code>&ndash; if defined, enables the standard importance scale (Top, High, Mid, Low, NA, Unknown). {{nowrap|''Eg: '''<code><nowiki>importance={{{importance|}}}</nowiki></code>'''''}}
*<code>'''importance'''</code>&ndash; if defined, enables the standard importance scale (Top, High, Mid, Low, NA, Unknown). {{nowrap|''Eg: '''<code><nowiki>importance={{{importance|}}}</nowiki></code>'''''}}
Line 402: Line 402:
**<code>'''TF_1_NAME'''</code> &ndash; the way the task force's name will appear in its piped link; redundant when {{para|TF_1_TEXT}} is used. {{nowrap|''Eg: '''<code><nowiki>the Floridiae task force</nowiki></code>'''''}}
**<code>'''TF_1_NAME'''</code> &ndash; the way the task force's name will appear in its piped link; redundant when {{para|TF_1_TEXT}} is used. {{nowrap|''Eg: '''<code><nowiki>the Floridiae task force</nowiki></code>'''''}}
**<code>'''TF_1_NESTED'''</code> &ndash; if defined, a link of the form "'''/ <nowiki>[[{{{TF_1_LINK}}}|{{{TF_1_NESTED}}}]]</nowiki>'''" is added after the main project's name when the banner is collapsed inside a {{tl|WikiProjectBannerShell}}. {{nowrap|''Eg: '''<code><nowiki>Floridiae</nowiki></code>'''''}}
**<code>'''TF_1_NESTED'''</code> &ndash; if defined, a link of the form "'''/ <nowiki>[[{{{TF_1_LINK}}}|{{{TF_1_NESTED}}}]]</nowiki>'''" is added after the main project's name when the banner is collapsed inside a {{tl|WikiProjectBannerShell}}. {{nowrap|''Eg: '''<code><nowiki>Floridiae</nowiki></code>'''''}}
**<code>'''TF_1_TEXT'''</code> &ndash; if defined, replaces the default "This page is supported by..." text. ''Eg:&nbsp;'''<code><nowiki>This page is within the scope of the [[Wikipedia:WikiProject Idaho/Task forces/Floridiae|Floridiae task force]]. New members are always welcome!</nowiki></code>''''' If defined to be "none", then no output will be displayed, although appropriate categories will still be added.
**<code>'''TF_1_TEXT'''</code> &ndash; if defined, replaces the default "This page is supported by..." text. ''Eg: '''<code><nowiki>This page is within the scope of the [[Wikipedia:WikiProject Idaho/Task forces/Floridiae|Floridiae task force]]. New members are always welcome!</nowiki></code>''''' If defined to be "none", then no output will be displayed, although appropriate categories will still be added.
**<code>'''TF_1_IMAGE'''</code> &ndash; an image can be defined for each task force. Remember that all images '''''must''''' be free, not fair-use. {{nowrap|''Eg: '''<code><nowiki>Idaho.jpg</nowiki></code>'''''}}
**<code>'''TF_1_IMAGE'''</code> &ndash; an image can be defined for each task force. Remember that all images '''''must''''' be free, not fair-use. {{nowrap|''Eg: '''<code><nowiki>Idaho.jpg</nowiki></code>'''''}}
**<code>'''TF_1_QUALITY'''</code> &ndash; if defined, enables the quality categorisations for the main project (eg: [[:Category:FA-Class Idaho articles]]) to be duplicated for the task force. The class arising from {{para|class}} and {{para|QUALITY_SCALE}} will be used; {{nowrap|''Eg: '''<code><nowiki>yes</nowiki></code>'''''}}
**<code>'''TF_1_QUALITY'''</code> &ndash; if defined, enables the quality categorisations for the main project (eg: [[:Category:FA-Class Idaho articles]]) to be duplicated for the task force. The class arising from {{para|class}} and {{para|QUALITY_SCALE}} will be used; {{nowrap|''Eg: '''<code><nowiki>yes</nowiki></code>'''''}}