Module:High-use: Difference between revisions

Categorize like {{used in system}}
(Avoid displaying 0%)
(Categorize like {{used in system}})
Line 118:
local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]"
local type_param = "style"
local epilogue = ''
if frame.args['system'] and frame.args['system'] ~= '' then
image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]"
type_param = "content"
local categorise = frame:getParent().args['nocat'] == '' or require('Module:Yesno')(frame:getParent().args['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
image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]"
Line 134 ⟶ 139:
["expiry"] = (frame.args["expiry"] or "")
}
} .. epilogue
}
else
return require('Module:Message box').main('ombox', {
Line 141 ⟶ 146:
text = p.text(frame, count),
expiry = (frame.args["expiry"] or "")
}) .. epilogue
end
end
Anonymous user