Template:Module rating/doc
{{#ifeq:doc |doc
|
{{#ifeq:show |show
|
![]() | This is a documentation subpage for Template:Module rating{{#if:||.}} It contains usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:Template |User |template template page |{{#if:Template |template page|article}}}}}}}}. |
}}{{#if: | | {{#ifexist:Template:Module rating | [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | }} }} | }}
This template is used to rate Lua modules by quality. It is placed at the top of the module's /doc subpage. It produces a message informing users about the rating system, and it also places the module into a tracking category.
Usage
Basic usage:
{{#if:{{[[{{#if:|{{{SISTER}}}Template|Template}}:module rating|module rating]]{{#if:rating||rating}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}|{{[[{{#if:|{{{SISTER}}}Template|Template}}:module rating|module rating]]{{#if:rating||rating}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}}}{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||{{{16}}}}}{{#if:||{{{17}}}}}{{#if:||{{{18}}}}}{{#if:||{{{19}}}}}{{#if:||{{{20}}}}}
Without categories:
{{#if:{{[[{{#if:|{{{SISTER}}}Template|Template}}:module rating|module rating]]{{#if:rating||rating}}{{#if:nocat=true||nocat=true}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}|{{[[{{#if:|{{{SISTER}}}Template|Template}}:module rating|module rating]]{{#if:rating||rating}}{{#if:nocat=true||nocat=true}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}}}{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||{{{16}}}}}{{#if:||{{{17}}}}}{{#if:||{{{18}}}}}{{#if:||{{{19}}}}}{{#if:||{{{20}}}}}
If {{[[{{#if:|{{{SISTER}}}Template|Template}}:Module rating|Module rating]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}} is used outside the Module namespace, an error message is displayed instead and will be categorized under Category:Pages with templates in the wrong namespace.
If the documentation subpage is also protected:
{{#if:{{[[{{#if:|{{{SISTER}}}Template|Template}}:module rating|module rating]]{{#if:rating||rating}}{{#if:reason for documentation protection||reason for documentation protection}}{{#if:action for documentation protection||action for documentation protection}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}|{{[[{{#if:|{{{SISTER}}}Template|Template}}:module rating|module rating]]{{#if:rating||rating}}{{#if:reason for documentation protection||reason for documentation protection}}{{#if:action for documentation protection||action for documentation protection}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}}}{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||{{{16}}}}}{{#if:||{{{17}}}}}{{#if:||{{{18}}}}}{{#if:||{{{19}}}}}{{#if:||{{{20}}}}}
The second and third unnamed arguments correspond to reason and action of {{Pp}} which gets included on the documentation subpage if at least the second unnamed argument is present.
Ratings
The rating should be placed in the first positional parameter. There are six different ratings: pre-alpha, alpha, beta, release, and protected, and semiprotected. There are also short alias codes for each of the ratings.
Rating | Aliases | Result | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pre-alpha
|
prealpha pa
|
doc|{{#if:|Template:Pp}}|{{#switch:
{{#if:Module |
module | Module | module | other
}} }} |
module =
|
other | #default = Script error: No such module "Error".
}}}} | |||||||||||||||||||||
alpha
|
a
|
doc|{{#if:|Template:Pp}}|{{#switch:
{{#if:module |
module | Module | module | other
}} }} |
module =
|
other | #default = Script error: No such module "Error".
}}}} | |||||||||||||||||||||
beta
|
b
|
doc|{{#if:|Template:Pp}}|{{#switch:
{{#if:module |
module | Module | module | other
}} }} |
module =
|
other | #default = Script error: No such module "Error".
}}}} | |||||||||||||||||||||
release
|
r general g
|
doc|{{#if:|Template:Pp}}|{{#switch:
{{#if:module |
module | Module | module | other
}} }} |
module =
|
other | #default = Script error: No such module "Error".
}}}} | |||||||||||||||||||||
protected
|
protect p
|
doc|{{#if:|Template:Pp}}|{{#switch:
{{#if:module |
module | Module | module | other
}} }} |
module =
|
other | #default = Script error: No such module "Error".
}}}} | |||||||||||||||||||||
semiprotected
|
semiprotect semi
|
doc|{{#if:|Template:Pp}}|{{#switch:
{{#if:module |
module | Module | module | other
}} }} |
module =
|
other | #default = Script error: No such module "Error".
}}}} | |||||||||||||||||||||
Anything else or if missing | doc|{{#if:|Template:Pp}}|{{#switch:
{{#if:module |
module | Module | module | other
}} }} |
module =
|
other | #default = Script error: No such module "Error".
}}}} |
TemplateData
{{#ifeq:{{safesubst:#switch: {{{header}}}
|no |n |f |false |off |0 = no | = yes |¬ = yes |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|
|=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3A%7C%7CModule+rating%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|C|c}}lick here] to see a monthly parameter usage report for {{#if:|[[Template:]]|this template}}{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:|its|this}} TemplateData}}.
|None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3A%7C%7CModule+rating%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report]{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:|its|this}} TemplateData}}
|for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3A%7C%7CModule+rating%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report] for {{#if:|[[Template:]]|Template:Module rating}}{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:|its|this}} TemplateData}}.
|#default=[1]{{#ifeq:{{safesubst:#switch: y |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:|its|this}} TemplateData}} }}|This is the {{#if:|TemplateData|TemplateData}} for this template used by TemplateWizard, VisualEditor and other tools. {{#switch:
|=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3A%7C%7CModule+rating%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|C|c}}lick here] to see a monthly parameter usage report for {{#if:|[[Template:]]|this template}}{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:|its|this}} TemplateData}}.
|None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3A%7C%7CModule+rating%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report]{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:|its|this}} TemplateData}}
|for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3A%7C%7CModule+rating%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report] for {{#if:|[[Template:]]|Template:Module rating}}{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:|its|this}} TemplateData}}.
|#default=[2]{{#ifeq:{{safesubst:#switch: y |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:|its|this}} TemplateData}} }}}}
TemplateData for Module rating
{{#switch:
{{#if: | {{{demospace}}} | {{#ifeq:Template|Template | template | other }} }}
| template = {{#if:{{#ifeq:doc|sandbox|1}}{{#ifeq:doc|doc|1}}||
}} | other | #default = }} }}Script error: No such module "Format TemplateData".
Categories
The template will put modules in one of the following categories, according to the rating specified:
- Category:Modules in pre-alpha development
- Category:Modules in alpha
- Category:Modules in beta
- Category:Modules for general use
- Category:Modules subject to page protection
These categories are suppressed on pages ending with /doc. To suppress categories on all pages, you can use the code |{{SAFESUBST:#if:nocat|nocat=}}true
.
See also