http://proplan.55bet-pro.com/wiki/index.php?action=history&feed=atom&title=M%C3%B3dulo%3ASuppress_categories Módulo:Suppress categories - Histórico de revisão-55BET Pro 2026-03-28T03:00:04Z 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:Suppress_categories&diff=177&oldid=prev Módulo:Suppress categories - Histórico de revisão-55BET Pro 2024-06-27T11:12:00Z <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 08h12min 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:Suppress_categories&diff=176&oldid=prev Módulo:Suppress categories - Histórico de revisão-55BET Pro 2021-10-26T17:25:37Z <p>Changed protection settings for &quot;<a href="/wiki/M%C3%B3dulo:Suppress_categories" title="Módulo:Suppress categories">Module:Suppress categories</a>&quot;: <a href="http://en.wikipedia.org/wiki/High-risk_templates" class="extiw" title="wikipedia:High-risk templates">High-risk template or module</a>: 2510 transclusions (<a href="/wiki/index.php?title=Usu%C3%A1rio:MusikBot_II/TemplateProtector&amp;action=edit&amp;redlink=1" class="new" title="Usuário:MusikBot II/TemplateProtector (página inexistente)">more info</a>) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite))</p> <p><b>Página nova</b></p><div>-- This is a simple module to strip categories from wikitext. It does<br /> -- not support nested links or magic words like __TOC__, etc. Even so,<br /> -- it should still handle most categories.<br /> <br /> local p = {}<br /> <br /> -- Detects if a category link is valid or not. If it is valid,<br /> -- the function returns the blank string. If not, the input<br /> -- is returned with no changes.<br /> local function processCategory( all, submatch )<br /> local beforePipe = mw.ustring.match( submatch, &#039;^(.-)[%s_]*|[%s_]*.-$&#039; )<br /> beforePipe = beforePipe or submatch<br /> if mw.ustring.match( beforePipe, &#039;[%[%]&lt;&gt;{}%c\n]&#039; ) then<br /> return all<br /> else<br /> return &#039;&#039;<br /> end<br /> end<br /> <br /> -- Preprocess the content if we aren&#039;t being called from #invoke,<br /> -- and pass it to gsub to remove valid category links.<br /> local function suppress( content, isPreprocessed )<br /> if not isPreprocessed then<br /> content = mw.getCurrentFrame():preprocess( content )<br /> end<br /> content = mw.ustring.gsub(<br /> content,<br /> &#039;(%[%[[%s_]*[cC][aA][tT][eE][gG][oO][rR][yY][%s_]*:[%s_]*(.-)[%s_]*%]%])&#039;,<br /> processCategory<br /> )<br /> return content<br /> end<br /> <br /> -- Get the content to suppress categories from, and find<br /> -- whether the content has already been preprocessed. (If the<br /> -- module is called from #invoke, it has been preprocessed already.)<br /> function p.main( frame )<br /> local content, isPreprocessed<br /> if frame == mw.getCurrentFrame() then<br /> content = frame:getParent().args[1]<br /> if frame.args[1] then<br /> content = frame.args[1]<br /> end<br /> isPreprocessed = true<br /> else<br /> content = frame<br /> isPreprocessed = false<br /> end<br /> return suppress( content, isPreprocessed )<br /> end<br /> <br /> return p</div> infobox>MusikBot II