Difference between revisions of "Module:No globals/doc"
m (1 revision imported) |
|
(No difference)
|
Latest revision as of 23:32, 23 March 2017
40px | This {{
|Module=Lua module
|#default=template
}} is used on {{#if:10,520,000+ pages, which is {{#expr:(1052454100/163) round 0}}% of all|10,520,000+ pages, which is {{#expr:(1,052,454,100/163) round 0}}% of all|a very large number of}} pages.
|Module=module |#default=template }} should first be tested in its [[{{
| doc | sandbox = Module:No globals | #default = Module:No globals/doc }}/sandbox|/sandbox]] or [[{{
| doc | sandbox = Module:No globals | #default = Module:No globals/doc }}/testcases|/testcases]] subpages{{
|Module=. |#default= or in your own user subpage. }} The tested changes can then be added to this page in one single edit. Please consider discussing any changes {{#if:|at [[{{{2}}}]]|on the [[{{
| doc | sandbox = Module talk:No globals | #default = Module talk:No globals/doc }}|talk page]]}} before implementing them. |
{{#switch:
{{#if: | | {{#ifeq:Module|Module | module | other }} }}| module =
{{#switch: protected
| pre-alpha | prealpha | pa = 40x40px | alpha | a = 26x26px | beta | b = 40x40px | release | r | general | g = 40x40px | protected | protect | p = [[File:Padlock{{#switch:Lua error in Module:Effective_protection_level at line 14: attempt to index local 'title' (a nil value).|autoconfirmed=-silver|accountcreator|templateeditor=-pink|}}.svg|40x40px|link=]]}} | {{#switch: protected
| pre-alpha | prealpha | pa = 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.{{#switch: doc|doc|sandbox= | {{#ifeq: | true | | }} }} | alpha | a = This module is rated as alpha. It is ready for third party input, and may be used on a few pages to see if problems arise, but should be watched. Suggestions for new features or changes in their input and output mechanisms are welcome.{{#switch: doc|doc|sandbox= | {{#ifeq: | true | | }} }} | beta | b = This module is rated as beta, and is ready for widespread use. It is still new and should be used with some caution to ensure the results are as expected.{{#switch: doc|doc|sandbox= | {{#ifeq: | true | | }} }} | release | r | general | g = This module is rated as ready for general use. It has reached a mature form and is thought to be bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by sandbox testing rather than repeated trial-and-error editing.{{#switch: doc|doc|sandbox= | {{#ifeq: | true | | }} }} | protected | protect | p = This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing.{{#switch: doc|doc|sandbox= | {{#ifeq: | true | | }} }} | #default = Template:Error}} |
| other | #default = Template:Error }}
This module causes an error if any nil global is read or if any global is written to, with the exception of arg. To use, add <syntaxhighlight lang="lua" inline>require('Module:No globals')</syntaxhighlight> to the top of the module using it. The arg variable is excluded because it is necessary for Scribunto's require function to work properly. (See the Scribunto source code here.)