Difference between revisions of "Module:Portal maintenance status/doc"
test>AfroThundr3007730 m (oops) |
test>Evad37 (update) |
||
| 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| | + | This module searches a Portal_talk: page's portal page, and returns an appropriate message based if {{tl|Portal maintenance status}} is found in the page's wikitext, and which parameters are used. |
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). | 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). | ||
| Line 8: | Line 8: | ||
==Examples== | ==Examples== | ||
| + | '''If the portal contains {{tld|Portal maintenance status|2=manual=yes}}''' | ||
| + | |||
| + | {{#invoke:Portal maintenance status|main|demo=Portal maintenance status{{!}}manual=yes}} | ||
| + | ---- | ||
| + | '''If the portal contains {{tld|Portal maintenance status|2=nonstandard=yes}}''' | ||
| + | |||
| + | {{#invoke:Portal maintenance status|main|demo=Portal maintenance status{{!}}nonstandard=yes}} | ||
| + | ---- | ||
| + | '''If the portal contains {{tld|Portal maintenance status|2=manual=yes|3=nonstandard=yes}}''' | ||
| + | |||
| + | {{#invoke:Portal maintenance status|main|demo=Portal maintenance status{{!}}manual=yes{{!}}nonstandard=yes}} | ||
| + | ---- | ||
| + | '''If the portal contains {{tld|Portal maintenance status|2=subpages=single}}''' | ||
| + | |||
| + | {{#invoke:Portal maintenance status|main|demo=Portal maintenance status{{!}}subpages=single}} | ||
| + | ---- | ||
| + | '''If the portal contains {{tld|Portal maintenance status|2=subpages=checked}}''' | ||
| + | |||
| + | {{#invoke:Portal maintenance status|main|demo=Portal maintenance status{{!}}subpages=checked}} | ||
| + | ---- | ||
| + | '''If the portal contains {{tld|Portal maintenance status|2=manual=yes|3=nonstandard=yes|4=subpages=single}}''' | ||
| + | |||
| + | {{#invoke:Portal maintenance status|main|demo=Portal maintenance status{{!}}manual=yes{{!}}nonstandard=yes{{!}}subpages=single}} | ||
| + | ---- | ||
| + | '''If the portal contains {{tld|Portal maintenance status|2=manual=yes|3=nonstandard=yes|4=subpages=checked}}''' | ||
| + | |||
| + | {{#invoke:Portal maintenance status|main|demo=Portal maintenance status{{!}}manual=yes{{!}}nonstandard=yes{{!}}subpages=checked}} | ||
| + | ---- | ||
| + | '''If the portal does not contain the template, there should be no output''' | ||
| + | |||
| + | {{#invoke:Portal maintenance status|main|demo=Lorem ipsum}} | ||
| + | ---- | ||
| + | '''If used in the wrong namespace, an error should be reported''' | ||
| + | |||
| + | {{#invoke:Portal maintenance status|main}} | ||
| + | ---- | ||
| + | |||
| + | ===Deprecated examples=== | ||
'''''If the portal contains ''{{tld|Maintained portal flag}}'':''''' | '''''If the portal contains ''{{tld|Maintained portal flag}}'':''''' | ||
| Line 20: | Line 58: | ||
{{#invoke:Portal maintenance status|main|demo=Maintained portal flag|demo2=Non-standard portal flag}} | {{#invoke:Portal maintenance status|main|demo=Maintained portal flag|demo2=Non-standard portal flag}} | ||
---- | ---- | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
===See also=== | ===See also=== | ||
Revision as of 13:18, 10 June 2018
| 40x40px | 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 based if {{Portal maintenance status}} is found in the page's wikitext, and which parameters are used.
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 {{Portal maintenance status|manual=yes}}
If the portal contains {{Portal maintenance status|nonstandard=yes}}
If the portal contains {{Portal maintenance status|manual=yes|nonstandard=yes}}
If the portal contains {{Portal maintenance status|subpages=single}}
If the portal contains {{Portal maintenance status|subpages=checked}}
If the portal contains {{Portal maintenance status|manual=yes|nonstandard=yes|subpages=single}}
If the portal contains {{Portal maintenance status|manual=yes|nonstandard=yes|subpages=checked}}
If the portal does not contain the template, there should be no output
If used in the wrong namespace, an error should be reported
Lua error in Module:Portal_maintenance_status at line 45: attempt to index field '?' (a nil value).
Deprecated examples
If the portal contains {{Maintained portal flag}}:
If the portal contains {{Non-standard portal flag}}:
If the portal contains both {{Maintained portal flag}} and {{Non-standard portal flag}}:
See also