<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ban-covert-modeling.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AMain</id>
	<title>Module:Main - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ban-covert-modeling.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AMain"/>
	<link rel="alternate" type="text/html" href="https://wiki.ban-covert-modeling.org/w/index.php?title=Module:Main&amp;action=history"/>
	<updated>2026-04-10T03:25:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki.ban-covert-modeling.org/w/index.php?title=Module:Main&amp;diff=1311&amp;oldid=prev</id>
		<title>Juho Kunsola: 1 revision imported: Importing CS-1 templates and Template:Citation with the &quot;include templates ticked&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.ban-covert-modeling.org/w/index.php?title=Module:Main&amp;diff=1311&amp;oldid=prev"/>
		<updated>2020-12-06T19:17:30Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported: Importing CS-1 templates and Template:Citation with the &amp;quot;include templates ticked&amp;quot;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:17, 6 December 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&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;!-- diff cache key bcmenwiki:diff:1.41:old-1310:rev-1311 --&gt;
&lt;/table&gt;</summary>
		<author><name>Juho Kunsola</name></author>
	</entry>
	<entry>
		<id>https://wiki.ban-covert-modeling.org/w/index.php?title=Module:Main&amp;diff=1310&amp;oldid=prev</id>
		<title>w&gt;Jonesey95: fix punctuation in category/talk space</title>
		<link rel="alternate" type="text/html" href="https://wiki.ban-covert-modeling.org/w/index.php?title=Module:Main&amp;diff=1310&amp;oldid=prev"/>
		<updated>2020-10-16T04:37:31Z</updated>

		<summary type="html">&lt;p&gt;fix punctuation in category/talk space&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[[&lt;br /&gt;
-- This module produces a link to a main article or articles. It implements the&lt;br /&gt;
-- template {{main}}.&lt;br /&gt;
-- &lt;br /&gt;
-- If the module is used in category or category talk space, it produces &amp;quot;The&lt;br /&gt;
-- main article for this category is xxx.&amp;quot; Otherwise, it produces&lt;br /&gt;
-- &amp;quot;Main article: xxx&amp;quot;.&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
local mHatnote = require(&amp;#039;Module:Hatnote&amp;#039;)&lt;br /&gt;
local mHatlist = require(&amp;#039;Module:Hatnote list&amp;#039;)&lt;br /&gt;
local mArguments -- lazily initialise&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	mArguments = require(&amp;#039;Module:Arguments&amp;#039;)&lt;br /&gt;
	local args = mArguments.getArgs(frame, {parentOnly = true})&lt;br /&gt;
	local pages = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		if type(k) == &amp;#039;number&amp;#039; then&lt;br /&gt;
			local display = args[&amp;#039;label &amp;#039; .. k] or args[&amp;#039;l&amp;#039; .. k]&lt;br /&gt;
			local page = display and&lt;br /&gt;
				string.format(&amp;#039;%s|%s&amp;#039;, string.gsub(v, &amp;#039;|.*$&amp;#039;, &amp;#039;&amp;#039;), display) or v&lt;br /&gt;
			pages[#pages + 1] = page&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if #pages == 0 and mw.title.getCurrentTitle().namespace == 0 then&lt;br /&gt;
		return mHatnote.makeWikitextError(&lt;br /&gt;
			&amp;#039;no page names specified&amp;#039;,&lt;br /&gt;
			&amp;#039;Template:Main#Errors&amp;#039;,&lt;br /&gt;
			args.category&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	local options = {&lt;br /&gt;
		selfref = args.selfref&lt;br /&gt;
	}&lt;br /&gt;
	return p._main(pages, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args, options)&lt;br /&gt;
	-- Get the list of pages. If no first page was specified we use the current&lt;br /&gt;
	-- page name.&lt;br /&gt;
	local currentTitle = mw.title.getCurrentTitle()&lt;br /&gt;
	if #args == 0 then args = {currentTitle.text} end&lt;br /&gt;
	local firstPage = string.gsub(args[1], &amp;#039;|.*$&amp;#039;, &amp;#039;&amp;#039;)&lt;br /&gt;
	-- Find the pagetype.&lt;br /&gt;
	local pageType = mHatnote.findNamespaceId(firstPage) == 0 and &amp;#039;article&amp;#039; or &amp;#039;page&amp;#039;&lt;br /&gt;
	-- Make the formatted link text&lt;br /&gt;
	list = mHatlist.andList(args, true)&lt;br /&gt;
	-- Build the text.&lt;br /&gt;
	local isPlural = #args &amp;gt; 1&lt;br /&gt;
	local mainForm&lt;br /&gt;
	local curNs = currentTitle.namespace&lt;br /&gt;
	if (curNs == 14) or (curNs == 15) then --category/talk namespaces&lt;br /&gt;
		mainForm = isPlural and&lt;br /&gt;
			&amp;#039;The main %ss for this [[Help:Categories|category]] are %s.&amp;#039;&lt;br /&gt;
			or&lt;br /&gt;
			&amp;#039;The main %s for this [[Help:Categories|category]] is %s.&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		mainForm = isPlural and &amp;#039;Main %ss: %s&amp;#039; or &amp;#039;Main %s: %s&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	local text = string.format(mainForm, pageType, list)&lt;br /&gt;
	-- Process the options and pass the text to the _rellink function in&lt;br /&gt;
	-- [[Module:Hatnote]].&lt;br /&gt;
	options = options or {}&lt;br /&gt;
	local hnOptions = {&lt;br /&gt;
		selfref = options.selfref&lt;br /&gt;
	}&lt;br /&gt;
	return mHatnote._hatnote(text, hnOptions)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>w&gt;Jonesey95</name></author>
	</entry>
</feed>