http://proplan.55bet-pro.com/wiki/index.php?action=history&feed=atom&title=M%C3%B3dulo%3AHigh-use
Módulo:High-use - Histórico de revisão-55BET Pro
2026-03-14T12:04:34Z
Histórico de revisões para esta página neste wiki
MediaWiki 1.42.7
http://proplan.55bet-pro.com/wiki/index.php?title=M%C3%B3dulo:High-use&diff=161&oldid=prev
Módulo:High-use - Histórico de revisão-55BET Pro
2024-06-27T11:11:59Z
<p>uma edição</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="pt-BR">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Edição anterior</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Edição das 08h11min de 27 de junho de 2024</td>
</tr><tr><td colspan="2" class="diff-notice" lang="pt-BR"><div class="mw-diff-empty">(Sem diferença)</div>
</td></tr></table>
Henryzord
http://proplan.55bet-pro.com/wiki/index.php?title=M%C3%B3dulo:High-use&diff=160&oldid=prev
Módulo:High-use - Histórico de revisão-55BET Pro
2024-04-25T12:38:03Z
<p>per edit request on talk page - highlight transclusions on tool target page</p>
<p><b>Página nova</b></p><div>local p = {}<br />
<br />
-- _fetch looks at the "demo" argument.<br />
local _fetch = require('Module:Transclusion_count').fetch<br />
local yesno = require('Module:Yesno')<br />
<br />
function p.num(frame, count)<br />
if count == nil then<br />
if yesno(frame.args['fetch']) == false then<br />
if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end<br />
else<br />
count = _fetch(frame)<br />
end<br />
end<br />
<br />
-- Build output string<br />
local return_value = ""<br />
if count == nil then<br />
if frame.args[1] == "risk" then<br />
return "a very large number of"<br />
else<br />
return "many"<br />
end<br />
else<br />
-- Use 2 significant figures for smaller numbers and 3 for larger ones<br />
local sigfig = 2<br />
if count >= 100000 then<br />
sigfig = 3<br />
end<br />
<br />
-- Prepare to round to appropriate number of sigfigs<br />
local f = math.floor(math.log10(count)) - sigfig + 1<br />
<br />
-- Round and insert "approximately" or "+" when appropriate<br />
if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then<br />
-- Round down<br />
return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) )<br />
else<br />
-- Round to nearest<br />
return_value = string.format("approximately&#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) )<br />
end<br />
<br />
-- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes<br />
if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then<br />
local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5)<br />
if percent >= 1 then<br />
return_value = string.format("%s&#x20;pages, or roughly %s%% of all", return_value, percent)<br />
end<br />
end <br />
end<br />
<br />
return return_value<br />
end<br />
<br />
-- Actions if there is a large (greater than or equal to 100,000) transclusion count<br />
function p.risk(frame)<br />
if frame.args[1] == "risk" then<br />
return "risk"<br />
else<br />
local count = _fetch(frame)<br />
if count and count >= 100000 then<br />
return "risk"<br />
end<br />
end<br />
return ""<br />
end<br />
<br />
function p.text(frame, count)<br />
-- Only show the information about how this template gets updated if someone<br />
-- is actually editing the page and maybe trying to update the count.<br />
local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or ''<br />
<br />
if count == nil then<br />
if yesno(frame.args['fetch']) == false then<br />
if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end<br />
else<br />
count = _fetch(frame)<br />
end<br />
end<br />
local title = mw.title.getCurrentTitle()<br />
if title.subpageText == "doc" or title.subpageText == "sandbox" then<br />
title = title.basePageTitle<br />
end<br />
<br />
local systemMessages = frame.args['system']<br />
if frame.args['system'] == '' then<br />
systemMessages = nil<br />
end<br />
<br />
-- This retrieves the project URL automatically to simplify localiation.<br />
local templateCount = ('on [http://linkcount.toolforge.org/?project=%s&page=%s#transclusions %s pages]'):format(<br />
mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'),<br />
mw.uri.encode(title.fullText), p.num(frame, count))<br />
local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used ';<br />
if systemMessages then<br />
used_on_text = used_on_text .. systemMessages ..<br />
((count and count > 2000) and ("''', and " .. templateCount) or ("'''"))<br />
else<br />
used_on_text = used_on_text .. templateCount .. "'''"<br />
end<br />
<br />
<br />
local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages, or in your own [[%s]]. "):format(<br />
(mw.title.getCurrentTitle().namespace == 828 and "module" or "template"),<br />
title.fullText, title.fullText,<br />
mw.title.getCurrentTitle().namespace == 828 and "Module:Sandbox|module sandbox" or "Wikipedia:User pages#SUB|user subpage"<br />
)<br />
<br />
local infoArg = frame.args["info"] ~= "" and frame.args["info"]<br />
if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then<br />
local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.'<br />
if infoArg then<br />
info = info .. "<br />" .. infoArg<br />
end<br />
sandbox_text = info .. '<br /> To avoid major disruption' ..<br />
(count and count >= 100000 and ' and server load' or '') ..<br />
', any changes should be tested in the ' .. sandbox_text ..<br />
'The tested changes can be added to this page in a single edit. '<br />
else<br />
sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') ..<br />
'hanges may be widely noticed. Test changes in the ' .. sandbox_text<br />
end<br />
<br />
<br />
local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes '<br />
if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then<br />
discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"])<br />
else<br />
discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText )<br />
end<br />
<br />
return used_on_text .. sandbox_text .. discussion_text .. " before implementing them." .. bot_text<br />
end<br />
<br />
function p.main(frame)<br />
local count = nil<br />
if yesno(frame.args['fetch']) == false then<br />
if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end<br />
else<br />
count = _fetch(frame)<br />
end<br />
local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]"<br />
local type_param = "style"<br />
local epilogue = ''<br />
if frame.args['system'] and frame.args['system'] ~= '' then<br />
image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]"<br />
type_param = "content"<br />
local nocat = frame:getParent().args['nocat'] or frame.args['nocat']<br />
local categorise = (nocat == '' or not yesno(nocat))<br />
if categorise and not mw.title.getCurrentTitle().isRedirect then<br />
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]]}}}}')<br />
end<br />
elseif (frame.args[1] == "risk" or (count and count >= 100000)) then<br />
image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]"<br />
type_param = "content"<br />
end<br />
<br />
if frame.args["form"] == "editnotice" then<br />
return frame:expandTemplate{<br />
title = 'editnotice',<br />
args = {<br />
["image"] = image,<br />
["text"] = p.text(frame, count),<br />
["expiry"] = (frame.args["expiry"] or "")<br />
}<br />
} .. epilogue<br />
else<br />
return require('Module:Message box').main('ombox', {<br />
type = type_param,<br />
image = image,<br />
text = p.text(frame, count),<br />
expiry = (frame.args["expiry"] or "")<br />
}) .. epilogue<br />
end<br />
end<br />
<br />
return p</div>
infobox>Paine Ellsworth