Difference between revisions of "Module:High-use"

Jump to navigation Jump to search
per edit request on talk page - highlight transclusions on tool target page
m (1 revision imported: Content from Template:Information on Wikipedia)
(per edit request on talk page - highlight transclusions on tool target page)
Line 89: Line 89:
-- This retrieves the project URL automatically to simplify localiation.
-- This retrieves the project URL automatically to simplify localiation.
local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format(
local templateCount = ('on [https://linkcount.toolforge.org/?project=%s&page=%s#transclusions %s pages]'):format(
mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'),
mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'),
mw.uri.encode(title.fullText), p.num(frame, count))
mw.uri.encode(title.fullText), p.num(frame, count))
Line 148: Line 148:
local nocat = frame:getParent().args['nocat'] or frame.args['nocat']
local nocat = frame:getParent().args['nocat'] or frame.args['nocat']
local categorise = (nocat == '' or not yesno(nocat))
local categorise = (nocat == '' or not yesno(nocat))
if categorise then
if categorise and not mw.title.getCurrentTitle().isRedirect 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]]}}}}')
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
end

Navigation menu