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 &quot;<a href="/wiki/M%C3%B3dulo:Transclusion_count" title="Módulo:Transclusion count">Module:Transclusion count</a>&quot;: <a href="/wiki/index.php?title=WP:High-risk_templates&amp;action=edit&amp;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&amp;action=edit&amp;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[&quot;demo&quot;] and frame.args[&quot;demo&quot;] ~= &quot;&quot; then<br /> template = mw.ustring.gsub(frame.args[&quot;demo&quot;],&quot;^[Tt]emplate:&quot;,&quot;&quot;)<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 .. &quot;:&quot; .. 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, &quot;Template&quot;).namespace<br /> if namespace == 10 or namespace == 828 then<br /> template = mw.ustring.gsub(template, &quot;/doc$&quot;, &quot;&quot;) -- strip /doc from end<br /> template = mw.ustring.gsub(template, &quot;/sandbox$&quot;, &quot;&quot;) -- 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(&#039;Module:Transclusion_count/data/&#039; .. (mw.ustring.find(index, &quot;%a&quot;) and index or &quot;other&quot;))) <br /> end)<br /> if status then<br /> return_value = tonumber(data[mw.ustring.gsub(template, &quot; &quot;, &quot;_&quot;)])<br /> end<br /> end<br /> end<br /> <br /> -- If database value doesn&#039;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], &#039;[%d,]+&#039;)<br /> if arg1 and arg1 ~= &#039;&#039; then<br /> return_value = tonumber(frame:callParserFunction(&#039;formatnum&#039;, arg1, &#039;R&#039;))<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(&#039;Module:Transclusion count/data/&#039; .. ((i == 91) and &#039;other&#039; or string.char(i)))<br /> for name, count in pairs(data) do<br /> table.insert(list, {mw.title.new(name, &quot;Template&quot;).fullText, count}) <br /> end<br /> end<br /> table.sort(list, function(a, b)<br /> return (a[2] == b[2]) and (a[1] &lt; b[1]) or (a[2] &gt; b[2])<br /> end)<br /> local lang = mw.getContentLanguage();<br /> for i = 1, #list do<br /> list[i] = (&#039;|-\n| %d || [[%s]] || %s\n&#039;):format(i, list[i][1]:gsub(&#039;_&#039;, &#039; &#039;), lang:formatNum(list[i][2]))<br /> end<br /> return table.concat(list)<br /> end<br /> <br /> return p</div> infobox>Isabelle Belato