https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3ANUMBEROF%2Fother Module:NUMBEROF/other - Revision history 2025-06-05T18:08:11Z Revision history for this page on the wiki MediaWiki 1.45.0-wmf.3 https://en.wikipedia.org/w/index.php?title=Module:NUMBEROF/other&diff=1074215495&oldid=prev Johnuniq: minor tweak to match a change at meta 2022-02-27T02:32:10Z <p>minor tweak to match a change at meta</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 02:32, 27 February 2022</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 37:</td> <td colspan="2" class="diff-lineno">Line 37:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local result = {}</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local result = {}</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> for _, project in ipairs(projects) do</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> for _, project in ipairs(projects) do</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del style="font-weight: bold; text-decoration: none;">local file</del> = 'Wikipedia statistics/rank/' .. project .. '.tab'</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <ins style="font-weight: bold; text-decoration: none;">result[project]</ins> = <ins style="font-weight: bold; text-decoration: none;">getData(mw.ext.data.get(</ins>'Wikipedia statistics/rank/' .. project .. '.tab'<ins style="font-weight: bold; text-decoration: none;">))</ins></div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> result[project] = getData(mw.ext.data.get(file))</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> return result</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> return result</div></td> </tr> </table> Johnuniq https://en.wikipedia.org/w/index.php?title=Module:NUMBEROF/other&diff=1006210717&oldid=prev Xaosflux: Protected "Module:NUMBEROF/other": used in system messages (MediaWiki:Statistics-files-desc) ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) 2021-02-11T17:21:42Z <p>Protected &quot;<a href="/wiki/Module:NUMBEROF/other" title="Module:NUMBEROF/other">Module:NUMBEROF/other</a>&quot;: used in system messages (<a href="/wiki/MediaWiki:Statistics-files-desc" title="MediaWiki:Statistics-files-desc">MediaWiki:Statistics-files-desc</a>) ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <tr class="diff-title" lang="en"> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 17:21, 11 February 2021</td> </tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div> </td></tr></table> Xaosflux https://en.wikipedia.org/w/index.php?title=Module:NUMBEROF/other&diff=960506963&oldid=prev Johnuniq: per Template talk:Wikipedia rank by size 2020-06-03T10:03:43Z <p>per <a href="/wiki/Template_talk:Wikipedia_rank_by_size" title="Template talk:Wikipedia rank by size">Template talk:Wikipedia rank by size</a></p> <p><b>New page</b></p><div>-- Return a table of statistics to be accessed once per page using mw.loadData.<br /> -- For each sister project, the table ranks each site by its number of articles.<br /> <br /> local projects = {<br /> &#039;wikibooks&#039;,<br /> &#039;wikinews&#039;,<br /> &#039;wikiquote&#039;,<br /> &#039;wikisource&#039;,<br /> &#039;wikiversity&#039;,<br /> &#039;wikivoyage&#039;,<br /> &#039;wiktionary&#039;,<br /> }<br /> <br /> local function getData(statistics)<br /> local iSite, iArticles<br /> for i, v in ipairs(statistics.schema.fields) do<br /> if v.name == &#039;site&#039; then<br /> iSite = i<br /> elseif v.name == &#039;articles&#039; then<br /> iArticles = i<br /> end<br /> end<br /> local rankBySite, rankByIndex = {}, {}<br /> for _, v in ipairs(statistics.data) do<br /> rankBySite[v[iSite]] = v[iArticles] -- rank of site from number of articles<br /> rankByIndex[v[iArticles]] = v[iSite] -- inverse<br /> end<br /> return {<br /> rankByIndex = rankByIndex, -- rankByIndex[1] == &#039;en&#039;<br /> rankBySite = rankBySite, -- rankBySite[&#039;en&#039;] == 1<br /> }<br /> end<br /> <br /> local function makeData()<br /> -- For example, data to rank each language for sister project wikipedia is at<br /> -- https://commons.wikimedia.org/wiki/Data:Wikipedia_statistics/rank/wikipedia.tab<br /> local result = {}<br /> for _, project in ipairs(projects) do<br /> local file = &#039;Wikipedia statistics/rank/&#039; .. project .. &#039;.tab&#039;<br /> result[project] = getData(mw.ext.data.get(file))<br /> end<br /> return result<br /> end<br /> <br /> return makeData()</div> Johnuniq