<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://culturality.museum/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ATransclusion_count</id>
	<title>Module:Transclusion count - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://culturality.museum/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ATransclusion_count"/>
	<link rel="alternate" type="text/html" href="https://culturality.museum/wiki/index.php?title=Module:Transclusion_count&amp;action=history"/>
	<updated>2026-04-04T10:12:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://culturality.museum/wiki/index.php?title=Module:Transclusion_count&amp;diff=130&amp;oldid=prev</id>
		<title>Iao: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://culturality.museum/wiki/index.php?title=Module:Transclusion_count&amp;diff=130&amp;oldid=prev"/>
		<updated>2024-04-09T09:57:07Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:57, 9 April 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Iao</name></author>
	</entry>
	<entry>
		<id>https://culturality.museum/wiki/index.php?title=Module:Transclusion_count&amp;diff=129&amp;oldid=prev</id>
		<title>wikipedia&gt;Isabelle Belato: Changed protection settings for &quot;Module:Transclusion count&quot;: Highly visible template; requested at WP:RfPP ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://culturality.museum/wiki/index.php?title=Module:Transclusion_count&amp;diff=129&amp;oldid=prev"/>
		<updated>2023-05-30T20:51:38Z</updated>

		<summary type="html">&lt;p&gt;Changed protection settings for &amp;quot;&lt;a href=&quot;/wiki/index.php/Module:Transclusion_count&quot; title=&quot;Module:Transclusion count&quot;&gt;Module:Transclusion count&lt;/a&gt;&amp;quot;: &lt;a href=&quot;/wiki/index.php?title=WP:High-risk_templates&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:High-risk templates (page does not exist)&quot;&gt;Highly visible template&lt;/a&gt;; requested at &lt;a href=&quot;/wiki/index.php?title=WP:RfPP&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:RfPP (page does not exist)&quot;&gt;WP:RfPP&lt;/a&gt; ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.fetch(frame)&lt;br /&gt;
	local template = nil&lt;br /&gt;
	local return_value = nil&lt;br /&gt;
&lt;br /&gt;
	-- Use demo parameter if it exists, otherswise use current template name&lt;br /&gt;
	local namespace = mw.title.getCurrentTitle().namespace&lt;br /&gt;
	if frame.args[&amp;quot;demo&amp;quot;] and frame.args[&amp;quot;demo&amp;quot;] ~= &amp;quot;&amp;quot; then&lt;br /&gt;
		template = mw.ustring.gsub(frame.args[&amp;quot;demo&amp;quot;],&amp;quot;^[Tt]emplate:&amp;quot;,&amp;quot;&amp;quot;)&lt;br /&gt;
	elseif namespace == 10 then -- Template namespace&lt;br /&gt;
		template = mw.title.getCurrentTitle().text&lt;br /&gt;
	elseif namespace == 828 then -- Module namespace&lt;br /&gt;
		template = (mw.site.namespaces[828].name .. &amp;quot;:&amp;quot; .. mw.title.getCurrentTitle().text)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- If in template or module namespace, look up count in /data&lt;br /&gt;
	if template ~= nil then&lt;br /&gt;
		namespace = mw.title.new(template, &amp;quot;Template&amp;quot;).namespace&lt;br /&gt;
		if namespace == 10 or namespace == 828 then&lt;br /&gt;
			template =  mw.ustring.gsub(template, &amp;quot;/doc$&amp;quot;, &amp;quot;&amp;quot;) -- strip /doc from end&lt;br /&gt;
			template =  mw.ustring.gsub(template, &amp;quot;/sandbox$&amp;quot;, &amp;quot;&amp;quot;) -- strip /sandbox from end&lt;br /&gt;
			local index = mw.ustring.sub(mw.title.new(template).text,1,1)&lt;br /&gt;
			local status, data = pcall(function () &lt;br /&gt;
				return(mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, &amp;quot;%a&amp;quot;) and index or &amp;quot;other&amp;quot;))) &lt;br /&gt;
			end)&lt;br /&gt;
			if status then&lt;br /&gt;
				return_value = tonumber(data[mw.ustring.gsub(template, &amp;quot; &amp;quot;, &amp;quot;_&amp;quot;)])&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- If database value doesn't exist, use value passed to template&lt;br /&gt;
	if return_value == nil and frame.args[1] ~= nil then&lt;br /&gt;
		local arg1=mw.ustring.match(frame.args[1], '[%d,]+')&lt;br /&gt;
		if arg1 and arg1 ~= '' then&lt;br /&gt;
			return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R'))&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return return_value	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Tabulate this data for [[Wikipedia:Database reports/Templates transcluded on the most pages]]&lt;br /&gt;
function p.tabulate(frame)&lt;br /&gt;
	local list = {}&lt;br /&gt;
	for i = 65, 91 do&lt;br /&gt;
		local data = mw.loadData('Module:Transclusion count/data/' .. ((i == 91) and 'other' or string.char(i)))&lt;br /&gt;
		for name, count in pairs(data) do&lt;br /&gt;
			table.insert(list, {mw.title.new(name, &amp;quot;Template&amp;quot;).fullText, count})	&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(list, function(a, b)&lt;br /&gt;
		return (a[2] == b[2]) and (a[1] &amp;lt; b[1]) or (a[2] &amp;gt; b[2])&lt;br /&gt;
	end)&lt;br /&gt;
	local lang = mw.getContentLanguage();&lt;br /&gt;
	for i = 1, #list do&lt;br /&gt;
		list[i] = ('|-\n| %d || [[%s]] || %s\n'):format(i, list[i][1]:gsub('_', ' '), lang:formatNum(list[i][2]))&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(list)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Isabelle Belato</name></author>
	</entry>
</feed>