http://proplan.55bet-pro.com/wiki/index.php?action=history&feed=atom&title=M%C3%B3dulo%3ATransclusion_count
Módulo:Transclusion count - Histórico de revisão-55BET Pro
2026-03-12T21:40:36Z
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:Transclusion_count&diff=163&oldid=prev
Módulo:Transclusion count - 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:Transclusion_count&diff=162&oldid=prev
Módulo:Transclusion count - Histórico de revisão-55BET Pro
2023-05-30T20:51:38Z
<p>Changed protection settings for "<a href="/wiki/M%C3%B3dulo:Transclusion_count" title="Módulo:Transclusion count">Module:Transclusion count</a>": <a href="/wiki/index.php?title=WP:High-risk_templates&action=edit&redlink=1" class="new" title="WP:High-risk templates (página inexistente)">Highly visible template</a>; requested at <a href="/wiki/index.php?title=WP:RfPP&action=edit&redlink=1" class="new" title="WP:RfPP (página inexistente)">WP:RfPP</a> ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</p>
<p><b>Página nova</b></p><div>local p = {}<br />
<br />
function p.fetch(frame)<br />
local template = nil<br />
local return_value = nil<br />
<br />
-- Use demo parameter if it exists, otherswise use current template name<br />
local namespace = mw.title.getCurrentTitle().namespace<br />
if frame.args["demo"] and frame.args["demo"] ~= "" then<br />
template = mw.ustring.gsub(frame.args["demo"],"^[Tt]emplate:","")<br />
elseif namespace == 10 then -- Template namespace<br />
template = mw.title.getCurrentTitle().text<br />
elseif namespace == 828 then -- Module namespace<br />
template = (mw.site.namespaces[828].name .. ":" .. mw.title.getCurrentTitle().text)<br />
end<br />
<br />
-- If in template or module namespace, look up count in /data<br />
if template ~= nil then<br />
namespace = mw.title.new(template, "Template").namespace<br />
if namespace == 10 or namespace == 828 then<br />
template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end<br />
template = mw.ustring.gsub(template, "/sandbox$", "") -- strip /sandbox from end<br />
local index = mw.ustring.sub(mw.title.new(template).text,1,1)<br />
local status, data = pcall(function () <br />
return(mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))) <br />
end)<br />
if status then<br />
return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")])<br />
end<br />
end<br />
end<br />
<br />
-- If database value doesn't exist, use value passed to template<br />
if return_value == nil and frame.args[1] ~= nil then<br />
local arg1=mw.ustring.match(frame.args[1], '[%d,]+')<br />
if arg1 and arg1 ~= '' then<br />
return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R'))<br />
end<br />
end<br />
<br />
return return_value <br />
end<br />
<br />
-- Tabulate this data for [[Wikipedia:Database reports/Templates transcluded on the most pages]]<br />
function p.tabulate(frame)<br />
local list = {}<br />
for i = 65, 91 do<br />
local data = mw.loadData('Module:Transclusion count/data/' .. ((i == 91) and 'other' or string.char(i)))<br />
for name, count in pairs(data) do<br />
table.insert(list, {mw.title.new(name, "Template").fullText, count}) <br />
end<br />
end<br />
table.sort(list, function(a, b)<br />
return (a[2] == b[2]) and (a[1] < b[1]) or (a[2] > b[2])<br />
end)<br />
local lang = mw.getContentLanguage();<br />
for i = 1, #list do<br />
list[i] = ('|-\n| %d || [[%s]] || %s\n'):format(i, list[i][1]:gsub('_', ' '), lang:formatNum(list[i][2]))<br />
end<br />
return table.concat(list)<br />
end<br />
<br />
return p</div>
infobox>Isabelle Belato