<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cern.ch/index.php?action=history&amp;feed=atom&amp;title=Module%3ACite</id>
	<title>Module:Cite - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cern.ch/index.php?action=history&amp;feed=atom&amp;title=Module%3ACite"/>
	<link rel="alternate" type="text/html" href="https://wiki.cern.ch/index.php?title=Module:Cite&amp;action=history"/>
	<updated>2026-04-04T23:02:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.cern.ch/index.php?title=Module:Cite&amp;diff=4755&amp;oldid=prev</id>
		<title>Bbergia: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.cern.ch/index.php?title=Module:Cite&amp;diff=4755&amp;oldid=prev"/>
		<updated>2025-12-01T10:29:19Z</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&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 10:29, 1 December 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&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>Bbergia</name></author>
	</entry>
	<entry>
		<id>https://wiki.cern.ch/index.php?title=Module:Cite&amp;diff=4754&amp;oldid=prev</id>
		<title>wikipedia&gt;Ahecht: simplify</title>
		<link rel="alternate" type="text/html" href="https://wiki.cern.ch/index.php?title=Module:Cite&amp;diff=4754&amp;oldid=prev"/>
		<updated>2025-05-14T20:15:34Z</updated>

		<summary type="html">&lt;p&gt;simplify&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require (&amp;#039;strict&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
local cfg = mw.loadData (&amp;#039;Module:Cite/config&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; S U B S T I T U T E &amp;gt;----------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Substitutes $1, $2, etc in &amp;lt;message&amp;gt; with data from &amp;lt;data_t&amp;gt;. Returns plain-text substituted string when&lt;br /&gt;
&amp;lt;data_t&amp;gt; not nil; returns &amp;lt;message&amp;gt; else.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function substitute (message, data_t)&lt;br /&gt;
	return data_t and mw.message.newRawMessage (message, data_t):plain() or message;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; M A K E _ E R R O R _ M S G &amp;gt;--------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Assembles an error message from module name, message text, help link, and error category.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function make_error_msg (frame, msg)&lt;br /&gt;
	local module_name = frame:getTitle();										-- get the module name for prefix and help-link label&lt;br /&gt;
	local namespace = mw.title.getCurrentTitle().namespace;						-- used for categorization&lt;br /&gt;
&lt;br /&gt;
	local category_link = (0 == namespace) and substitute (&amp;#039;[[Category:$1]]&amp;#039;, {cfg.settings_t.err_category}) or &amp;#039;&amp;#039;;&lt;br /&gt;
	return substitute (&amp;#039;&amp;lt;span style=&amp;quot;color:#d33&amp;quot;&amp;gt;Error: &amp;amp;#x7B;{[[$1|#invoke:$2]]}}: $3 ([[:$4|$5]])&amp;lt;/span&amp;gt;$6&amp;#039;,&lt;br /&gt;
		{&lt;br /&gt;
		module_name,															-- the module name with namespace&lt;br /&gt;
		module_name:gsub (&amp;#039;Module:&amp;#039;, &amp;#039;&amp;#039;),										-- the module name without namespace&lt;br /&gt;
		msg,																	-- the error message&lt;br /&gt;
		cfg.settings_t.help_text_link,											-- help wikilink to text at help page&lt;br /&gt;
		cfg.settings_t.help,													-- help wikilink display text&lt;br /&gt;
		category_link															-- link to error category (for main namespace errors only)&lt;br /&gt;
		})&lt;br /&gt;
end&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; C I T E &amp;gt;---------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Function to call Module:Citation/CS1/sandbox with appropriate parameters.  For use when an article exceeds the&lt;br /&gt;
post-expand include size limit.&lt;br /&gt;
&lt;br /&gt;
	{{#invoke:cite|book|title=Title}}&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function cite (frame, template)&lt;br /&gt;
	local args_t = require (&amp;#039;Module:Arguments&amp;#039;).getArgs (frame, {frameOnly=true});&lt;br /&gt;
&lt;br /&gt;
	template = template:lower();												-- lowercase for table indexes&lt;br /&gt;
	&lt;br /&gt;
	if not cfg.known_templates_t[template] then									-- do we recognize this template name?&lt;br /&gt;
		return make_error_msg (frame, substitute (cfg.settings_t.unknown_name, {template}));	-- nope; abandon with error message&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local config_t = {[&amp;#039;CitationClass&amp;#039;] = cfg.citation_classes_t[template] or template};	-- set CitationClass value&lt;br /&gt;
	return require (&amp;#039;Module:Citation/CS1&amp;#039;)._citation (nil, args_t, config_t);	-- go render the citation&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; E X P O R T S &amp;gt;---------------------------------------------------------------&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
return setmetatable({}, {__index =												-- returns an empty TABLE whose metatable has the __index set so that, for any given KEY, it returns&lt;br /&gt;
	function(_, template)														-- this anonymous function called as function(TABLE, KEY)&lt;br /&gt;
		return function (frame) return cite (frame, template) end;				-- which in turn returns a function that calls cite() with the KEY name&lt;br /&gt;
	end&lt;br /&gt;
})&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Ahecht</name></author>
	</entry>
</feed>