Module:High-use: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Undid revision 1037001710 by Trappist the monk (talk) - this would present very misleading data, as it would be comparing the number of transclusions on all PAGES against the number of ARTICLES. Wait to implement until there is actually a data source to match.
(+support for |article-space=yes;)
(Undid revision 1037001710 by Trappist the monk (talk) - this would present very misleading data, as it would be comparing the number of transclusions on all PAGES against the number of ARTICLES. Wait to implement until there is actually a data source to match.)
Line 43:
-- Insert percentage of pages if that is likely to be >= 1%
if count and count > 250000 then
local magic_wordpercent = yesnomath.floor( ( (count/frame:getParentcallParserFunction().args['article-spaceNUMBEROFPAGES']) and, 'NUMBEROFARTICLESR') or) 'NUMBEROFPAGES';* 100) + 0.5)
local percent = math.floor( ( (count/frame:callParserFunction(magic_word, 'R') ) * 100) + 0.5)
 
if percent >= 1 then
return_value = string.format("%s pages, or roughly %s%% of all", return_value, percent)
Line 88 ⟶ 86:
end
local templateCount = ('on [https://templatecount.toolforge.org/index.php?lang=en&namespace=%s&name=%s %s %spages]'):format(
mw.title.getCurrentTitle().namespace, mw.uri.encode(title.text), p.num(frame, count), yesno (frame:getParent().args['article-space']) and 'articles' or 'pages')
local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used ';
if systemMessages then
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu