Module:Sandbox/Ahecht/sandbox: Difference between revisions
Appearance
< Module:Sandbox | Ahecht
Content deleted Content added
rm unused variable |
update |
||
Line 6: | Line 6: | ||
function p.main(frame) |
function p.main(frame) |
||
local |
local mwSite, mwSiteStats = '', '' |
||
for k,v in pairs(mw.site |
for k,v in pairs(mw.site) do if type(v) == 'string' then mwSite = mwSite .. '\n*' .. k .. ': ' .. v end end |
||
for k,v in pairs(mw.site.stats) do if type(v) ~= 'function' then mwSiteStats = mwSiteStats .. '\n**' .. k .. ': ' .. v end end |
|||
local output = '*Version: ' .. mw.site.currentVersion .. '\n*$wgScriptPath: ' .. mw.site.scriptPath .. '\n*$wgServer: ' .. mw.site.server .. '\n*$wgSitename: ' .. mw.site.siteName .. '\n*$wgStylePath: ' .. mw.site.stylePath .. '\n*mw.site.stats: ' .. siteStats |
|||
return 'mw.site: ' .. mwSite .. '\n*mw.site.stats: ' .. mwSiteStats |
|||
return output |
|||
end |
end |
||
Revision as of 16:58, 21 March 2018
![]() | This is the module sandbox page for Module:Sandbox/Ahecht (diff). |
{{Module rating }}
Usage
{{#invoke:Sandbox/Ahecht/sandbox|main}}
Output
mw.site:
- siteName: Wikipedia
- currentVersion: 1.45.0-wmf.4 (146aca8)
- scriptPath: /w
- server: //en.wikipedia.org
- stylePath: /w/skins
- mw.site.stats:
- articles: 7007638
- admins: 839
- edits: 1290471060
- users: 49267817
- files: 938128
- pages: 63322095
- activeUsers: 114277
See also
- Sandbox/Ahecht
- Sandbox/Ahecht/Catalog lookup link
- Sandbox/Ahecht/Cite DNV
- Sandbox/Ahecht/Gridiron color
- Sandbox/Ahecht/benchmark
- Sandbox/Ahecht/cite
- Sandbox/Ahecht/doc
- Sandbox/Ahecht/flag
- Sandbox/Ahecht/flag/doc
- Sandbox/Ahecht/flag/redirects
- Sandbox/Ahecht/flag/redirects/doc
- Sandbox/Ahecht/interwiki
- Sandbox/Ahecht/interwiki/doc
- Sandbox/Ahecht/min
- Sandbox/Ahecht/modsandbox
- Sandbox/Ahecht/navboxtolua
- Sandbox/Ahecht/navboxtolua/doc
- Sandbox/Ahecht/sandbox
- Sandbox/Ahecht/sandbox2
- Sandbox/Ahecht/sandbox2/doc
- Sandbox/Ahecht/trim date
- Sandbox/Ahecht/url-access
- Sandbox/Ahecht/wikibase
local p = {}
local function _main(args)
return true
end
function p.main(frame)
local mwSite, mwSiteStats = '', ''
for k,v in pairs(mw.site) do if type(v) == 'string' then mwSite = mwSite .. '\n*' .. k .. ': ' .. v end end
for k,v in pairs(mw.site.stats) do if type(v) ~= 'function' then mwSiteStats = mwSiteStats .. '\n**' .. k .. ': ' .. v end end
return 'mw.site: ' .. mwSite .. '\n*mw.site.stats: ' .. mwSiteStats
end
return p