Module:High-use: Difference between revisions

317 bytes removed ,  4 years ago
(1) The wiki this is copied to probably won't have a transclusion count bot (2) templatecount is a wmf-specific tool (3) remove unnecessary link to wikipedia
imported>CFCF
(Restored older version)
((1) The wiki this is copied to probably won't have a transclusion count bot (2) templatecount is a wmf-specific tool (3) remove unnecessary link to wikipedia)
Line 1:
local p = {}
 
local _fetch = require('Module:Transclusion_count').fetch
 
function p.num(frame, count)
Line 63 ⟶ 61:
end
local used_on_text = string.format("'''This %s is used on [%s %s pages]'''",
local templatecount = string.format("https://tools.wmflabs.org/templatecount/index.php?lang=en&namespace=%s&name=%s",mw.title.getCurrentTitle().namespace,mw.uri.encode(title.text))
local used_on_text = string.format("'''This %s is used on [%s %s pages]'''",
(mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template"),
templatecount,
p.num(frame, count)
)
Line 74 ⟶ 69:
(mw.title.getCurrentTitle().namespace == 828 and "module" or "template"),
title.fullText, title.fullText,
(mw.title.getCurrentTitle().namespace == 828 and "." or ", or in your own [[Wikipedia:Subpages#How to create user subpages|user subpage]].")
)
0

edits