<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://zh.enter-politics.com/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3ACategory_handler</id>
	<title>模块:Category handler - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://zh.enter-politics.com/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3ACategory_handler"/>
	<link rel="alternate" type="text/html" href="https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Category_handler&amp;action=history"/>
	<updated>2026-04-18T17:15:38Z</updated>
	<subtitle>本wiki的该页面的版本历史</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Category_handler&amp;diff=9933&amp;oldid=prev</id>
		<title>白龙：导入3个版本</title>
		<link rel="alternate" type="text/html" href="https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Category_handler&amp;diff=9933&amp;oldid=prev"/>
		<updated>2022-07-11T10:56:09Z</updated>

		<summary type="html">&lt;p&gt;导入3个版本&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2022年7月11日 (一) 10:56的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;zh&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;（没有差异）&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>白龙</name></author>
	</entry>
	<entry>
		<id>https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Category_handler&amp;diff=214&amp;oldid=prev</id>
		<title>One-Six：导入1个版本：受托导入数个模板；本次导入Infobox，来源为ZhWP</title>
		<link rel="alternate" type="text/html" href="https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Category_handler&amp;diff=214&amp;oldid=prev"/>
		<updated>2020-06-01T00:55:14Z</updated>

		<summary type="html">&lt;p&gt;导入1个版本：受托导入数个模板；本次导入Infobox，来源为ZhWP&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2020年6月1日 (一) 00:55的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;zh&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;（没有差异）&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>One-Six</name></author>
	</entry>
	<entry>
		<id>https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Category_handler&amp;diff=213&amp;oldid=prev</id>
		<title>zhwp&gt;Xiplus：已保护“模块:Category handler”：高风险模板（[编辑=仅管理员]（无限期）[移动=仅管理员]（无限期））</title>
		<link rel="alternate" type="text/html" href="https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Category_handler&amp;diff=213&amp;oldid=prev"/>
		<updated>2017-10-12T08:30:03Z</updated>

		<summary type="html">&lt;p&gt;已保护“&lt;a href=&quot;/wiki/%E6%A8%A1%E5%9D%97:Category_handler&quot; title=&quot;模块:Category handler&quot;&gt;模块:Category handler&lt;/a&gt;”：高风险模板（[编辑=仅管理员]（无限期）[移动=仅管理员]（无限期））&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2017年10月12日 (四) 08:30的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;zh&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;（没有差异）&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>zhwp&gt;Xiplus</name></author>
	</entry>
	<entry>
		<id>https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Category_handler&amp;diff=9932&amp;oldid=prev</id>
		<title>2015年9月2日 (三) 12:47 wiki:zh&gt;Koala0090</title>
		<link rel="alternate" type="text/html" href="https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Category_handler&amp;diff=9932&amp;oldid=prev"/>
		<updated>2015-09-02T12:47:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Category_handler&amp;amp;diff=9932&amp;amp;oldid=9931&quot;&gt;显示更改&lt;/a&gt;</summary>
		<author><name>wiki:zh&gt;Koala0090</name></author>
	</entry>
	<entry>
		<id>https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Category_handler&amp;diff=9931&amp;oldid=prev</id>
		<title>2014年1月27日 (一) 05:51 wiki:zh&gt;Quest for Truth</title>
		<link rel="alternate" type="text/html" href="https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Category_handler&amp;diff=9931&amp;oldid=prev"/>
		<updated>2014-01-27T05:51:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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;zh&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2014年1月27日 (一) 05:51的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l64&quot; &gt;第64行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第64行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;-- Other parts of the title can have either underscores or spaces.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;-- Other parts of the title can have either underscores or spaces.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;cfg.blacklist = {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;cfg.blacklist = {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    '^&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Main Page&lt;/del&gt;$', -- don't categorise the main page.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    '^&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Wikipedia:首页&lt;/ins&gt;$', -- don't categorise the main page.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    -- Don't categorise the following pages or their subpages.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    -- Don't categorise the following pages or their subpages.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l76&quot; &gt;第76行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第76行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    -- Don't categorise subpages of these pages, but allow&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    -- Don't categorise subpages of these pages, but allow&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    -- categorisation of the base page.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    -- categorisation of the base page.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    '^Wikipedia:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Template messages&lt;/del&gt;/.+$',&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    '^Wikipedia: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;模板消息&lt;/ins&gt;/.+$',&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'/[aA]rchive' &lt;/del&gt;-- Don't categorise archives.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;    -- Don't categorise archives.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;   '/存檔',&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;   '/存档',&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;   '/[aA]rchive'&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>wiki:zh&gt;Quest for Truth</name></author>
	</entry>
	<entry>
		<id>https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Category_handler&amp;diff=9930&amp;oldid=prev</id>
		<title>wiki:zh&gt;Quest for Truth：copy from :en:Module:Category handler</title>
		<link rel="alternate" type="text/html" href="https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Category_handler&amp;diff=9930&amp;oldid=prev"/>
		<updated>2014-01-19T07:12:29Z</updated>

		<summary type="html">&lt;p&gt;copy from &lt;a href=&quot;/index.php?title=En:Module:Category_handler&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;En:Module:Category handler（页面不存在）&quot;&gt;en:Module:Category handler&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;----------------------------------------------------------------------------------------------------------&lt;br /&gt;
--                                                                                                      --&lt;br /&gt;
--                                          CATEGORY HANDLER                                            --&lt;br /&gt;
--                                                                                                      --&lt;br /&gt;
--      This module implements the {{category handler}} template in Lua, with a few improvements: all   --&lt;br /&gt;
--      namespaces and all namespace aliases are supported, and namespace names are detected            --&lt;br /&gt;
--      automatically for the local wiki. This module requires [[Module:Namespace detect]] and          --&lt;br /&gt;
--      [[Module:Yesno]] to be available on the local wiki. It can be configured for different wikis    --&lt;br /&gt;
--      by altering the values in the &amp;quot;cfg&amp;quot; table.                                                      --&lt;br /&gt;
--                                                                                                      --&lt;br /&gt;
----------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------------&lt;br /&gt;
--                                          Configuration data                                          --&lt;br /&gt;
--                      Language-specific parameter names and values can be set here.                   --&lt;br /&gt;
----------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local cfg = {}&lt;br /&gt;
&lt;br /&gt;
-- The following config values set the names of parameters that suppress categorisation. They are used&lt;br /&gt;
-- with Module:Yesno, and work as follows:&lt;br /&gt;
--&lt;br /&gt;
-- cfg.nocat:&lt;br /&gt;
-- Result of yesno(args[cfg.nocat])         Effect&lt;br /&gt;
-- true                                     Categorisation is suppressed&lt;br /&gt;
-- false                                    Categorisation is allowed, and the blacklist check is skipped&lt;br /&gt;
-- nil                                      Categorisation is allowed&lt;br /&gt;
--&lt;br /&gt;
-- cfg.categories:&lt;br /&gt;
-- Result of yesno(args[cfg.categories])    Effect&lt;br /&gt;
-- true                                     Categorisation is allowed, and the blacklist check is skipped&lt;br /&gt;
-- false                                    Categorisation is suppressed&lt;br /&gt;
-- nil                                      Categorisation is allowed&lt;br /&gt;
cfg.nocat = 'nocat'    &lt;br /&gt;
cfg.categories = 'categories'&lt;br /&gt;
&lt;br /&gt;
-- The parameter name for the legacy &amp;quot;category2&amp;quot; parameter. This skips the blacklist if set to the&lt;br /&gt;
-- cfg.category2Yes value, and suppresses categorisation if present but equal to anything other than&lt;br /&gt;
-- cfg.category2Yes or cfg.category2Negative.&lt;br /&gt;
cfg.category2 = 'category2'&lt;br /&gt;
cfg.category2Yes = 'yes'&lt;br /&gt;
cfg.category2Negative = '¬'&lt;br /&gt;
&lt;br /&gt;
-- cfg.subpage is the parameter name to specify how to behave on subpages. cfg.subpageNo is the value to&lt;br /&gt;
-- specify to not categorise on subpages; cfg.only is the value to specify to only categorise on subpages.&lt;br /&gt;
cfg.subpage = 'subpage'&lt;br /&gt;
cfg.subpageNo = 'no'&lt;br /&gt;
cfg.subpageOnly = 'only'&lt;br /&gt;
&lt;br /&gt;
-- The parameter for data to return in all namespaces.&lt;br /&gt;
cfg.all = 'all'&lt;br /&gt;
&lt;br /&gt;
-- The parameter name for data to return if no data is specified for the namespace that is detected. This&lt;br /&gt;
-- must be the same as the cfg.other parameter in [[Module:Namespace detect]].&lt;br /&gt;
cfg.other = 'other'&lt;br /&gt;
&lt;br /&gt;
-- The parameter name used to specify a page other than the current page; used for testing and&lt;br /&gt;
-- demonstration. This must be the same as the cfg.page parameter in [[Module:Namespace detect]].&lt;br /&gt;
cfg.page = 'page'&lt;br /&gt;
&lt;br /&gt;
-- The categorisation blacklist. Pages that match Lua patterns in this list will not be categorised.&lt;br /&gt;
-- (However, see the explanation of cfg.nocat, cfg.categories and cfg.category2 for some exceptions.)&lt;br /&gt;
-- If the namespace name has a space in, it must be written with an underscore, e.g. &amp;quot;Wikipedia_talk&amp;quot;.&lt;br /&gt;
-- Other parts of the title can have either underscores or spaces.&lt;br /&gt;
cfg.blacklist = {&lt;br /&gt;
    '^Main Page$', -- don't categorise the main page.&lt;br /&gt;
    &lt;br /&gt;
    -- Don't categorise the following pages or their subpages.&lt;br /&gt;
    '^Wikipedia:Cascade%-protected items$',&lt;br /&gt;
    '^Wikipedia:Cascade%-protected items/.*$',&lt;br /&gt;
    '^User:UBX$', -- The userbox &amp;quot;template&amp;quot; space.&lt;br /&gt;
    '^User:UBX/.*$',&lt;br /&gt;
    '^User_talk:UBX$',&lt;br /&gt;
    '^User_talk:UBX/.*$',&lt;br /&gt;
    &lt;br /&gt;
    -- Don't categorise subpages of these pages, but allow&lt;br /&gt;
    -- categorisation of the base page.&lt;br /&gt;
    '^Wikipedia:Template messages/.+$',&lt;br /&gt;
    &lt;br /&gt;
    '/[aA]rchive' -- Don't categorise archives.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-- This is a table of namespaces to categorise by default. They should be in the format of parameter&lt;br /&gt;
-- names accepted by [[Module:Namespace detect]].&lt;br /&gt;
cfg.defaultNamespaces = {&lt;br /&gt;
    'main',&lt;br /&gt;
    'file',&lt;br /&gt;
    'help',&lt;br /&gt;
    'category'&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------------&lt;br /&gt;
--                                          End configuration data                                      --&lt;br /&gt;
----------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- Get dependent modules&lt;br /&gt;
local nsDetect = require('Module:Namespace detect')&lt;br /&gt;
local yesno = require('Module:Yesno')&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------------&lt;br /&gt;
--                                          Local functions                                             --&lt;br /&gt;
--      The following are internal functions, which we do not want to be accessible from other modules. --&lt;br /&gt;
----------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- Find whether we need to return a category or not.&lt;br /&gt;
local function needsCategory(pageObject, args)&lt;br /&gt;
    -- Don't categorise if the relevant options are set.&lt;br /&gt;
    if yesno(args[cfg.nocat])&lt;br /&gt;
        or yesno(args[cfg.categories]) == false&lt;br /&gt;
        or (&lt;br /&gt;
            args[cfg.category2] &lt;br /&gt;
            and args[cfg.category2] ~= cfg.category2Yes &lt;br /&gt;
            and args[cfg.category2] ~= cfg.category2Negative&lt;br /&gt;
        )&lt;br /&gt;
    then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    -- If there is no pageObject available, then that either means that we are over&lt;br /&gt;
    -- the expensive function limit or that the title specified was invalid. Invalid&lt;br /&gt;
    -- titles will probably only be a problem during testing, so we choose the best&lt;br /&gt;
    -- fallback for being over the expensive function limit. The fallback behaviour&lt;br /&gt;
    -- of the old template was to assume the page was not a subpage, so we will do&lt;br /&gt;
    -- the same here.&lt;br /&gt;
    if args[cfg.subpage] == cfg.subpageNo and pageObject and pageObject.isSubpage then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    if args[cfg.subpage] == cfg.subpageOnly &lt;br /&gt;
        and (not pageObject or (pageObject and not pageObject.isSubpage))&lt;br /&gt;
    then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return true&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Find whether we need to check the blacklist or not.&lt;br /&gt;
local function needsBlacklistCheck(args)&lt;br /&gt;
    if yesno(args[cfg.nocat]) == false&lt;br /&gt;
        or yesno(args[cfg.categories]) == true&lt;br /&gt;
        or args[cfg.category2] == cfg.category2Yes&lt;br /&gt;
    then&lt;br /&gt;
        return false&lt;br /&gt;
    else&lt;br /&gt;
        return true&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Find whether any namespace parameters have been specified.&lt;br /&gt;
-- Mappings is the table of parameter mappings taken from&lt;br /&gt;
-- [[Module:Namespace detect]].&lt;br /&gt;
local function nsParamsExist(mappings, args)&lt;br /&gt;
    if args[cfg.all] or args[cfg.other] then&lt;br /&gt;
        return true&lt;br /&gt;
    end&lt;br /&gt;
    for ns, params in pairs(mappings) do&lt;br /&gt;
        for i, param in ipairs(params) do&lt;br /&gt;
            if args[param] then&lt;br /&gt;
                return true&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------------&lt;br /&gt;
--                                          Global functions                                            --&lt;br /&gt;
--      The following functions are global, because we want them to be accessible from #invoke and      --&lt;br /&gt;
--      from other Lua modules.                                                                         --&lt;br /&gt;
----------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Find if a string matches the blacklist. Returns the match if one is found, or nil otherwise.&lt;br /&gt;
-- Input should be a page title with a namespace prefix, e.g. &amp;quot;Wikipedia talk:Articles for deletion&amp;quot;.&lt;br /&gt;
function p.matchesBlacklist(page)&lt;br /&gt;
    if type(page) ~= 'string' then return end&lt;br /&gt;
    for i, pattern in ipairs(cfg.blacklist) do&lt;br /&gt;
        local match = mw.ustring.match(page, pattern)&lt;br /&gt;
        if match then&lt;br /&gt;
            return match&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- The main structure of the module. Checks whether we need to categorise,&lt;br /&gt;
-- and then passes the relevant arguments to [[Module:Namespace detect]].&lt;br /&gt;
function p._main(args)&lt;br /&gt;
    -- Get the page object and argument mappings from&lt;br /&gt;
    -- [[Module:Namespace detect]], to save us from having to rewrite the&lt;br /&gt;
    -- code.&lt;br /&gt;
    local pageObject = nsDetect.getPageObject(args[cfg.page])&lt;br /&gt;
    local mappings = nsDetect.getParamMappings()&lt;br /&gt;
    &lt;br /&gt;
    if not needsCategory(pageObject, args) then return end&lt;br /&gt;
    &lt;br /&gt;
    local ret = ''&lt;br /&gt;
    -- Check blacklist if necessary.&lt;br /&gt;
    if not needsBlacklistCheck(args) or not p.matchesBlacklist(pageObject.prefixedText) then&lt;br /&gt;
        if not nsParamsExist(mappings, args) then&lt;br /&gt;
            -- No namespace parameters exist; basic usage. Pass args[1] to&lt;br /&gt;
            -- [[Module:Namespace detect]] using the default namespace&lt;br /&gt;
            -- parameters, and return the result.&lt;br /&gt;
            local ndargs = {}&lt;br /&gt;
            for _, ndarg in ipairs(cfg.defaultNamespaces) do&lt;br /&gt;
                ndargs[ndarg] = args[1]&lt;br /&gt;
            end&lt;br /&gt;
            ndargs.page = args.page&lt;br /&gt;
            ndargs.demospace = args.demospace&lt;br /&gt;
            local ndresult = nsDetect._main(ndargs)&lt;br /&gt;
            if ndresult then&lt;br /&gt;
                ret = ret .. ndresult&lt;br /&gt;
            end&lt;br /&gt;
        else&lt;br /&gt;
            -- Namespace parameters exist; advanced usage.&lt;br /&gt;
            -- If the all parameter is specified, return it.&lt;br /&gt;
            local all = args.all&lt;br /&gt;
            if type(all) == 'string' then&lt;br /&gt;
                ret = ret .. all&lt;br /&gt;
            end&lt;br /&gt;
            &lt;br /&gt;
            -- Get the arguments to pass to [[Module:Namespace detect]].&lt;br /&gt;
            local ndargs = {}&lt;br /&gt;
            for ns, params in pairs(mappings) do&lt;br /&gt;
                for _, param in ipairs(params) do&lt;br /&gt;
                    ndargs[param] = args[param] or args[cfg.other] or nil&lt;br /&gt;
                end&lt;br /&gt;
            end&lt;br /&gt;
            ndargs.other = args.other&lt;br /&gt;
            ndargs.page = args.page&lt;br /&gt;
            ndargs.demospace = args.demospace&lt;br /&gt;
            &lt;br /&gt;
            local data = nsDetect._main(ndargs)&lt;br /&gt;
            &lt;br /&gt;
            -- Work out what to return based on the result of the namespace detect call.&lt;br /&gt;
            local datanum = tonumber(data)&lt;br /&gt;
            if type(datanum) == 'number' then&lt;br /&gt;
                -- &amp;quot;data&amp;quot; is a number, so return that positional parameter.&lt;br /&gt;
                -- Remove non-positive integer values, as only positive integers&lt;br /&gt;
                -- from 1-10 were used with the old template.&lt;br /&gt;
                if datanum &amp;gt; 0 and math.floor(datanum) == datanum then&lt;br /&gt;
                    local dataArg = args[datanum]&lt;br /&gt;
                    if type(dataArg) == 'string' then&lt;br /&gt;
                        ret = ret .. dataArg&lt;br /&gt;
                    end&lt;br /&gt;
                end&lt;br /&gt;
            else&lt;br /&gt;
                -- &amp;quot;data&amp;quot; is not a number, so return it as it is.&lt;br /&gt;
                if type(data) == 'string' then&lt;br /&gt;
                    ret = ret .. data&lt;br /&gt;
                end&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
    -- If called via #invoke, use the args passed into the invoking&lt;br /&gt;
    -- template, or the args passed to #invoke if any exist. Otherwise&lt;br /&gt;
    -- assume args are being passed directly in.&lt;br /&gt;
    local origArgs&lt;br /&gt;
    if frame == mw.getCurrentFrame() then&lt;br /&gt;
        origArgs = frame:getParent().args&lt;br /&gt;
        for k, v in pairs(frame.args) do&lt;br /&gt;
            origArgs = frame.args&lt;br /&gt;
            break&lt;br /&gt;
        end&lt;br /&gt;
    else&lt;br /&gt;
        origArgs = frame&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- Trim whitespace and remove blank arguments for the following args:&lt;br /&gt;
    -- 1, 2, 3 etc., &amp;quot;nocat&amp;quot;, &amp;quot;categories&amp;quot;, &amp;quot;subpage&amp;quot;, and &amp;quot;page&amp;quot;.&lt;br /&gt;
    local args = {}&lt;br /&gt;
    for k, v in pairs(origArgs) do&lt;br /&gt;
        if type(v) == 'string' then&lt;br /&gt;
            v = mw.text.trim(v) -- Trim whitespace.&lt;br /&gt;
        end&lt;br /&gt;
        if type(k) == 'number'&lt;br /&gt;
            or k == cfg.nocat&lt;br /&gt;
            or k == cfg.categories&lt;br /&gt;
            or k == cfg.subpage&lt;br /&gt;
            or k == cfg.page&lt;br /&gt;
        then&lt;br /&gt;
            if v ~= '' then&lt;br /&gt;
                args[k] = v&lt;br /&gt;
            end&lt;br /&gt;
        else&lt;br /&gt;
            args[k] = v&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Lower-case &amp;quot;nocat&amp;quot;, &amp;quot;categories&amp;quot;, &amp;quot;category2&amp;quot;, and &amp;quot;subpage&amp;quot;. These&lt;br /&gt;
    -- parameters are put in lower case whenever they appear in the old&lt;br /&gt;
    -- template, so we can just do it once here and save ourselves some work.&lt;br /&gt;
    local lowercase = {cfg.nocat, cfg.categories, cfg.category2, cfg.subpage}&lt;br /&gt;
    for _, v in ipairs(lowercase) do&lt;br /&gt;
        local argVal = args[v]&lt;br /&gt;
        if type(argVal) == 'string' then&lt;br /&gt;
            args[v] = mw.ustring.lower(argVal)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wiki:zh&gt;Quest for Truth</name></author>
	</entry>
</feed>