Difference between revisions of "Module:Portal maintenance status/doc"
test>Evad37 (start) |
test>Evad37 (description, examples) |
||
| Line 1: | Line 1: | ||
{{Module rating |pre-alpha}} | {{Module rating |pre-alpha}} | ||
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | ||
| + | This module searches a Portal_talk: page's portal page, and returns an appropriate message if {{tl|Maintained portal flag}} or {{tl|Non-standard portal flag}} is found in the page wikitext. | ||
| + | An error is reported if this module is used outside of the Portal_talk namespace. It can be demonstrated, in any namespace, with the {{para|demo}} and {{para|demo2}} parameters, which take the name of templates to "find" (instead of actually searching a page). | ||
| + | |||
== Usage == | == Usage == | ||
| + | <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''main''}}</code> | ||
| + | |||
| + | ==Examples== | ||
| + | '''''If the portal contains ''{{tld|Maintained portal flag}}'':''''' | ||
| + | |||
| + | {{#invoke:Portal flag talk auto|main|demo=Maintained portal flag}} | ||
| + | ---- | ||
| + | '''''If the portal contains ''{{tld|Non-standard portal flag}}'':''''' | ||
| + | |||
| + | {{#invoke:Portal flag talk auto|main|demo=Non-standard portal flag}} | ||
| + | ---- | ||
| + | '''''If the portal contains both ''{{tld|Maintained portal flag}}'' and ''{{tld|Non-standard portal flag}}'':''''' | ||
| + | |||
| + | {{#invoke:Portal flag talk auto|main|demo=Maintained portal flag|demo2=Non-standard portal flag}} | ||
| + | ---- | ||
| + | '''''If the portal contains neither template, there is no output:''''' | ||
| + | |||
| + | {{#invoke:Portal flag talk auto|main|demo=Lorem ipsum}} | ||
| + | ---- | ||
| + | '''''If used in the wrong namespace, an error is reported:''''' | ||
| − | + | {{#invoke:Portal flag talk auto|main}} | |
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | ||
Revision as of 17:34, 7 June 2018
| This module is rated as pre-alpha. It is unfinished, and may or may not be in active development. It should not be used from article namespace pages. Modules remain pre-alpha until the original editor (or someone who takes one over if it is abandoned for some time) is satisfied with the basic structure. |
This module searches a Portal_talk: page's portal page, and returns an appropriate message if {{Maintained portal flag}} or {{Non-standard portal flag}} is found in the page wikitext.
An error is reported if this module is used outside of the Portal_talk namespace. It can be demonstrated, in any namespace, with the |demo= and |demo2= parameters, which take the name of templates to "find" (instead of actually searching a page).
Usage
{{#invoke:Portal maintenance status|main}}
Examples
If the portal contains {{Maintained portal flag}}:
Script error: No such module "Portal flag talk auto".
If the portal contains {{Non-standard portal flag}}:
Script error: No such module "Portal flag talk auto".
If the portal contains both {{Maintained portal flag}} and {{Non-standard portal flag}}:
Script error: No such module "Portal flag talk auto".
If the portal contains neither template, there is no output:
Script error: No such module "Portal flag talk auto".
If used in the wrong namespace, an error is reported:
Script error: No such module "Portal flag talk auto".