<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FSwpb%2Fwrong-namespace</id>
	<title>Module:Sandbox/Swpb/wrong-namespace - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FSwpb%2Fwrong-namespace"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Swpb/wrong-namespace&amp;action=history"/>
	<updated>2026-05-27T13:20:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Sandbox/Swpb/wrong-namespace&amp;diff=146251&amp;oldid=prev</id>
		<title>imported&gt;Swpb: Swpb moved page Module:Sandbox/Swpb/multi to Module:Sandbox/Swpb/wrong-namespace without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Swpb/wrong-namespace&amp;diff=146251&amp;oldid=prev"/>
		<updated>2019-01-16T17:39:44Z</updated>

		<summary type="html">&lt;p&gt;Swpb moved page &lt;a href=&quot;/index.php?title=Module:Sandbox/Swpb/multi&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Module:Sandbox/Swpb/multi (page does not exist)&quot;&gt;Module:Sandbox/Swpb/multi&lt;/a&gt; to &lt;a href=&quot;/research/Module:Sandbox/Swpb/wrong-namespace&quot; title=&quot;Module:Sandbox/Swpb/wrong-namespace&quot;&gt;Module:Sandbox/Swpb/wrong-namespace&lt;/a&gt; without leaving a redirect&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--Implement Wrong namespace template&lt;br /&gt;
&lt;br /&gt;
local p={}&lt;br /&gt;
&lt;br /&gt;
function p.wrongns(frame)&lt;br /&gt;
--Get arguments and context&lt;br /&gt;
	local content = frame.args[1]&lt;br /&gt;
	local yes = frame.args[&amp;#039;yes&amp;#039;]&lt;br /&gt;
	local no = frame.args[&amp;#039;no&amp;#039;]&lt;br /&gt;
	local show = frame.args[&amp;#039;show&amp;#039;]&lt;br /&gt;
	local nowarn = frame.args[&amp;#039;nowarn&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
	local nstext = mw.title.getCurrentTitle().nsText&lt;br /&gt;
	local nsnum = mw.title.getCurrentTitle().namespace&lt;br /&gt;
&lt;br /&gt;
--Internal variables&lt;br /&gt;
	local istalk = math.fmod(nsnum,2)&lt;br /&gt;
	local isok = 0&lt;br /&gt;
&lt;br /&gt;
--Check if namespace is ok&lt;br /&gt;
	if yes then&lt;br /&gt;
		for space in mw.ustring.gmatch( yes, &amp;quot;[%s%d]+&amp;quot; ) do&lt;br /&gt;
			if space==nstext or space==nsnum then&lt;br /&gt;
				isok = 1&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if no and not isok then&lt;br /&gt;
		for space in mw.ustring.gmatch( no, &amp;quot;[%s%d]+&amp;quot; ) do&lt;br /&gt;
			if space == nstext or space == nsnum then&lt;br /&gt;
				isok = 0&lt;br /&gt;
				break&lt;br /&gt;
			elseif space==&amp;#039;notalk&amp;#039; then&lt;br /&gt;
				if istalk then isok = 0 end&lt;br /&gt;
			elseif space==&amp;#039;talkonly&amp;#039; then&lt;br /&gt;
				if istalk then isok = 1 end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
--Generate output&lt;br /&gt;
	local output = &amp;#039;&amp;#039;&lt;br /&gt;
	if isok==1 then&lt;br /&gt;
		output = content&lt;br /&gt;
	else&lt;br /&gt;
		if show==&amp;#039;yes&amp;#039; or show==&amp;#039;1&amp;#039; then&lt;br /&gt;
			output = content&lt;br /&gt;
		end&lt;br /&gt;
		if not (nowarn==&amp;#039;yes&amp;#039; or nowarn==&amp;#039;1&amp;#039;) then&lt;br /&gt;
			output = output .. frame:expandTemplate{ title = &amp;#039;error&amp;#039;, args = { &amp;#039;Error: This content is not intended for use in this [[Wikipedia:Namespace|namespace]]&amp;#039; } }&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return output&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Swpb</name></author>
	</entry>
</feed>