440
edits
(Categorize like {{used in system}}) |
m (24 revisions imported from wikipedia:Module:High-use) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 60:
-- Only show the information about how this template gets updated if someone
-- is actually editing the page and maybe trying to update the count.
local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]]
if count == nil then count = _fetch(frame) end
Line 73:
end
local templateCount = ('on [https://templatecount.toolforge.org/index.php?lang=en&namespace=%s&name=%s %s pages]
mw.title.getCurrentTitle().namespace, mw.uri.encode(title.text), p.num(frame, count))
local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used ';
if systemMessages then
used_on_text = used_on_text .. systemMessages ..
((count and count > 2000) and (",''' and " .. templateCount) or ("
else
used_on_text = used_on_text .. templateCount .. "'''"
Line 90:
)
if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then
local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.'
if infoArg then
▲ if frame.args["info"] and frame.args["info"] ~= "" then
info = info .. "<br />" ..
end
sandbox_text = info .. '<br /> To avoid major disruption' ..
Line 100 ⟶ 101:
'The tested changes can be added to this page in a single edit. '
else
sandbox_text =
'hanges may be widely noticed. Test changes in the ' .. sandbox_text
end
Line 122 ⟶ 124:
image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]"
type_param = "content"
local
local categorise = (nocat == '' or not require('Module:Yesno')(nocat))
if categorise then
epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]
end
elseif (frame.args[1] == "risk" or (count and count >= 100000)) then
|