<?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%2FBrownHairedGirl%2FGAAByCountyCatNav01</id>
	<title>Module:Sandbox/BrownHairedGirl/GAAByCountyCatNav01 - 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%2FBrownHairedGirl%2FGAAByCountyCatNav01"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/BrownHairedGirl/GAAByCountyCatNav01&amp;action=history"/>
	<updated>2026-04-17T18:48:39Z</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/BrownHairedGirl/GAAByCountyCatNav01&amp;diff=145220&amp;oldid=prev</id>
		<title>imported&gt;BrownHairedGirl: local myTable = &#039;&lt;table class=&quot;&#039; .. tableClass .. &#039;&quot;&#039; 	myTable = myTable .. &#039; style=&quot;&#039; .. tableStyle .. &#039;; font-size:&#039; .. textSize .. &#039;; max-width:&#039; .. tableFallbackMaxWidth .. &#039;; max-width:&#039; .. tableMaxWidth ..&#039;&quot;&gt;\n&#039;</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/BrownHairedGirl/GAAByCountyCatNav01&amp;diff=145220&amp;oldid=prev"/>
		<updated>2018-05-14T22:15:33Z</updated>

		<summary type="html">&lt;p&gt;local myTable = &amp;#039;&amp;lt;table class=&amp;quot;&amp;#039; .. tableClass .. &amp;#039;&amp;quot;&amp;#039; 	myTable = myTable .. &amp;#039; style=&amp;quot;&amp;#039; .. tableStyle .. &amp;#039;; font-size:&amp;#039; .. textSize .. &amp;#039;; max-width:&amp;#039; .. tableFallbackMaxWidth .. &amp;#039;; max-width:&amp;#039; .. tableMaxWidth ..&amp;#039;&amp;quot;&amp;gt;\n&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[[ GAA v0, forked from v20&lt;br /&gt;
&lt;br /&gt;
 each title consists of 3 parts&lt;br /&gt;
    * prefix&lt;br /&gt;
    * county name&lt;br /&gt;
    * suffix&lt;br /&gt;
 e.g. &amp;quot;Foo in Mayo&amp;quot;&lt;br /&gt;
    * prefix = &amp;quot;Foo in &amp;quot;&lt;br /&gt;
    * county name = Mayo&amp;quot;&lt;br /&gt;
    * suffix = &amp;quot;&amp;quot;&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
-- config&lt;br /&gt;
local textSize = &amp;#039;90%&amp;#039;&lt;br /&gt;
local tableClass=&amp;quot;toc&amp;quot;&lt;br /&gt;
local tableFallbackMaxWidth=&amp;quot;auto&amp;quot;&lt;br /&gt;
local tableMaxWidth=&amp;quot;calc(100% - 25em)&amp;quot; -- Template:GeoGroup has width: 23em&amp;lt;&lt;br /&gt;
-- local tableStyle=&amp;quot;margin-left:0; margin-right:auto; clear:left !important; margin-top:0 !important; float:left; width:auto;&amp;quot;&lt;br /&gt;
local tableStyle=&amp;quot;margin-left:0; margin-right:auto; clear:left !important; margin-top:0 !important; width:auto;&amp;quot;&lt;br /&gt;
local evenRowStyle = &amp;quot;vertical-align:top; background-color:#f3f3f3;&amp;quot;&lt;br /&gt;
local oddRowStyle = &amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
local labelStyle = &amp;quot;text-align:right; font-weight: bold; padding: 0.25em 0.5em 0.25em 0.5em;&amp;quot;&lt;br /&gt;
local listStyle = &amp;quot;text-align:left; font-weight: normal; padding: 0.25em 0.5em 0.25em 0.5em;&amp;quot;&lt;br /&gt;
local greyLinkColor = &amp;quot;#888&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- globals for this module&lt;br /&gt;
local debugging = false&lt;br /&gt;
local debugmsg = &amp;quot;&amp;quot;&lt;br /&gt;
local tableRowNum = 0&lt;br /&gt;
local title_prefix = &amp;quot;&amp;quot;&lt;br /&gt;
local title_suffix = &amp;quot;&amp;quot;&lt;br /&gt;
local thisPageCounty&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
local yesno = require(&amp;#039;Module:Yesno&amp;#039;)&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
local IrishGAACounties = {&lt;br /&gt;
	&amp;#039;Antrim&amp;#039;,&lt;br /&gt;
	&amp;#039;Armagh&amp;#039;,&lt;br /&gt;
	&amp;#039;Carlow&amp;#039;,&lt;br /&gt;
	&amp;#039;Cavan&amp;#039;,&lt;br /&gt;
	&amp;#039;Clare&amp;#039;,&lt;br /&gt;
	&amp;#039;Cork&amp;#039;,&lt;br /&gt;
	&amp;#039;Donegal&amp;#039;,&lt;br /&gt;
	&amp;#039;Derry&amp;#039;,&lt;br /&gt;
	&amp;#039;Down&amp;#039;,&lt;br /&gt;
	&amp;#039;Dublin&amp;#039;,&lt;br /&gt;
	&amp;#039;Fermanagh&amp;#039;,&lt;br /&gt;
	&amp;#039;Galway&amp;#039;,&lt;br /&gt;
	&amp;#039;Kerry&amp;#039;,&lt;br /&gt;
	&amp;#039;Kildare&amp;#039;,&lt;br /&gt;
	&amp;#039;Kilkenny&amp;#039;,&lt;br /&gt;
	&amp;#039;Laois&amp;#039;,&lt;br /&gt;
	&amp;#039;Leitrim&amp;#039;,&lt;br /&gt;
	&amp;#039;Limerick&amp;#039;,&lt;br /&gt;
	&amp;#039;Longford&amp;#039;,&lt;br /&gt;
	&amp;#039;Louth&amp;#039;,&lt;br /&gt;
	&amp;#039;Mayo&amp;#039;,&lt;br /&gt;
	&amp;#039;Meath&amp;#039;,&lt;br /&gt;
	&amp;#039;Monaghan&amp;#039;,&lt;br /&gt;
	&amp;#039;Offaly&amp;#039;,&lt;br /&gt;
	&amp;#039;Roscommon&amp;#039;,&lt;br /&gt;
	&amp;#039;Sligo&amp;#039;,&lt;br /&gt;
	&amp;#039;Tipperary&amp;#039;,&lt;br /&gt;
	&amp;#039;Tyrone&amp;#039;,&lt;br /&gt;
	&amp;#039;Waterford&amp;#039;,&lt;br /&gt;
	&amp;#039;Westmeath&amp;#039;,&lt;br /&gt;
	&amp;#039;Wexford&amp;#039;,&lt;br /&gt;
	&amp;#039;Wicklow&amp;#039;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local OverseasGAACounties = {&lt;br /&gt;
	&amp;#039;London&amp;#039;,&lt;br /&gt;
	&amp;#039;New York&amp;#039;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function makeTableRow(rowLabel, useCountyWord, countyList)&lt;br /&gt;
	debugLog(2, &amp;quot;makeTableRow, label: &amp;quot;)&lt;br /&gt;
	if (rowLabel == nil) then&lt;br /&gt;
		rowLabel = &amp;quot;By&amp;amp;nbsp;county&amp;quot;&lt;br /&gt;
		debugLog(nil, rowLabel)&lt;br /&gt;
	else&lt;br /&gt;
		rowLabel = mw.text.trim(rowLabel)&lt;br /&gt;
		debugLog(nil, &amp;quot; [&amp;quot; .. rowLabel .. &amp;quot;]&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	tableRowNum = tableRowNum + 1&lt;br /&gt;
	local thisRow&lt;br /&gt;
	if (tableRowNum % 2) == 0 then&lt;br /&gt;
		debugLog(3, &amp;quot;Even-numbered&amp;quot;)&lt;br /&gt;
		thisRow = &amp;#039;&amp;lt;tr style=&amp;quot;&amp;#039; .. evenRowStyle .. &amp;#039;&amp;quot;&amp;gt;\n&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		debugLog(3, &amp;quot;Odd-numbered&amp;quot;)&lt;br /&gt;
		thisRow = &amp;#039;&amp;lt;tr style=&amp;quot;&amp;#039; .. oddRowStyle .. &amp;#039;&amp;quot;&amp;gt;\n&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	if not ((rowLabel == nil) or (rowLabel ==&amp;quot;&amp;quot;)) then&lt;br /&gt;
		thisRow = thisRow .. &amp;#039;&amp;lt;td style=&amp;quot;&amp;#039; .. labelStyle .. &amp;#039;&amp;quot;&amp;gt;&amp;#039; .. rowLabel .. &amp;#039;: &amp;lt;/td&amp;gt;\n&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	-- now begin making the row contents&lt;br /&gt;
	thisRow = thisRow .. &amp;#039;&amp;lt;td style=&amp;quot;&amp;#039; .. listStyle .. &amp;#039;;&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;hlist&amp;quot;&amp;gt;\n&amp;#039;&lt;br /&gt;
	local i, aCounty&lt;br /&gt;
		debugLog(3, &amp;quot;Process countyList&amp;quot;)&lt;br /&gt;
	for i, aCounty in ipairs(countyList) do&lt;br /&gt;
		debugLog(4, &amp;quot;No. [&amp;quot; .. tostring(i) .. &amp;quot;: [&amp;quot; .. aCounty .. &amp;quot;]&amp;quot;)&lt;br /&gt;
		myCatName = makeCatName(aCounty, title_prefix, title_suffix)&lt;br /&gt;
		thisRow = thisRow .. &amp;quot;* &amp;quot; .. makeCatLink(myCatName, aCounty) .. &amp;quot;\n&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	thisRow = thisRow .. &amp;#039;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;\n&amp;lt;/tr&amp;gt;&amp;#039;&lt;br /&gt;
	return thisRow&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function makeTable()&lt;br /&gt;
	debugLog(1, &amp;quot;makeTable&amp;quot;)&lt;br /&gt;
	tableRowNum = 0&lt;br /&gt;
	local myTable = &amp;#039;&amp;lt;table class=&amp;quot;&amp;#039; .. tableClass .. &amp;#039;&amp;quot;&amp;#039;&lt;br /&gt;
	myTable = myTable .. &amp;#039; style=&amp;quot;&amp;#039; .. tableStyle .. &amp;#039;; font-size:&amp;#039; .. textSize .. &amp;#039;; max-width:&amp;#039; .. tableFallbackMaxWidth .. &amp;#039;; max-width:&amp;#039; .. tableMaxWidth ..&amp;#039;&amp;quot;&amp;gt;\n&amp;#039;&lt;br /&gt;
	myTable = myTable .. makeTableRow(&amp;quot;Irish&amp;amp;nbsp;GAA&amp;amp;nbsp;Counties&amp;quot;, useCountyWord, IrishGAACounties)&lt;br /&gt;
	myTable = myTable .. makeTableRow(&amp;quot;Overseas&amp;amp;nbsp;GAA&amp;amp;nbsp;Counties&amp;quot;, useCountyWord, OverseasGAACounties)&lt;br /&gt;
	myTable = myTable .. &amp;quot;&amp;lt;/table&amp;gt;\n&amp;quot;&lt;br /&gt;
	return myTable&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Make a piped link to a category, if it exists&lt;br /&gt;
-- If it doesn&amp;#039;t exist, just display the greyed the link title without linking&lt;br /&gt;
function makeCatLink(catname, disp)&lt;br /&gt;
	local displaytext&lt;br /&gt;
	if (disp ~= &amp;quot;&amp;quot;) and (disp ~= nil) then&lt;br /&gt;
		-- use &amp;#039;disp&amp;#039; parameter, but strip any trailing disambiguator&lt;br /&gt;
		displaytext = mw.ustring.gsub(disp, &amp;quot;%s+%(.+$&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		displaytext = catname&lt;br /&gt;
	end&lt;br /&gt;
	local fmtlink&lt;br /&gt;
	local catPage = mw.title.new( catname, &amp;quot;Category&amp;quot; )&lt;br /&gt;
	if (catPage.exists) then&lt;br /&gt;
		fmtlink = &amp;quot;[[:Category:&amp;quot; .. catname .. &amp;quot;|&amp;quot; .. displaytext .. &amp;quot;]]&amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
		fmtlink = &amp;#039;&amp;lt;span style=&amp;quot;color:&amp;#039; .. greyLinkColor .. &amp;#039;&amp;quot;&amp;gt;&amp;#039; .. displaytext .. &amp;quot;&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return fmtlink&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function makeCatName(countyName, prefix, suffix)&lt;br /&gt;
	local this_cat_name = &amp;#039;&amp;#039;;&lt;br /&gt;
	this_cat_name = this_cat_name .. prefix&lt;br /&gt;
	this_cat_name = this_cat_name .. countyName&lt;br /&gt;
	this_cat_name = this_cat_name .. suffix&lt;br /&gt;
	return this_cat_name&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function patternSearchEncode(s)&lt;br /&gt;
	return mw.ustring.gsub(s, &amp;quot;([%W])&amp;quot;, &amp;quot;%%%1&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Does the pagename include a county name?&lt;br /&gt;
function findCountyNameInPagename(pn, countylist, description)&lt;br /&gt;
	local i, aCounty&lt;br /&gt;
	debugLog(2, &amp;quot;checking [&amp;quot; .. pn ..&amp;quot;] for a county name in county set: &amp;quot; .. description)&lt;br /&gt;
	for i, aCounty in ipairs(countylist) do&lt;br /&gt;
		debugLog(3, &amp;quot;testing: [&amp;quot;  .. aCounty .. &amp;quot;]&amp;quot;)&lt;br /&gt;
		local testCountyEncoded = patternSearchEncode(aCounty)&lt;br /&gt;
		-- For efficiency, the first test is a simple match as a a screening test&lt;br /&gt;
		-- If the bare county name is nowhere in the pagename, then no need for&lt;br /&gt;
		-- more precise checks&lt;br /&gt;
		-- This check would be one line in regex, but Lua pattern matching is cruder,&lt;br /&gt;
		--so we need several passes to ensure that any match is of a complete word&lt;br /&gt;
		debugLog(4, &amp;quot;simple match? &amp;quot;)&lt;br /&gt;
		if (not mw.ustring.match(pn, testCountyEncoded)) then&lt;br /&gt;
			debugLog(nil, &amp;quot;Fail&amp;quot;)&lt;br /&gt;
		else&lt;br /&gt;
			debugLog(nil, &amp;quot;Success&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
			debugLog(4, &amp;quot;match at start, followed by separator? &amp;quot;)&lt;br /&gt;
			if mw.ustring.match(pn, &amp;quot;^&amp;quot; .. testCountyEncoded .. &amp;quot;[^%w]&amp;quot;) then&lt;br /&gt;
				debugLog(nil, &amp;quot;Yes&amp;quot;)&lt;br /&gt;
				return aCounty&lt;br /&gt;
			end&lt;br /&gt;
			debugLog(nil, &amp;quot;No&amp;quot;)&lt;br /&gt;
			&lt;br /&gt;
			debugLog(4, &amp;quot;match at end, preceded by separator? &amp;quot;)&lt;br /&gt;
			if mw.ustring.match(pn, &amp;quot;[^%w]&amp;quot; .. testCountyEncoded .. &amp;quot;$&amp;quot;) then&lt;br /&gt;
				debugLog(nil, &amp;quot;Yes&amp;quot;)&lt;br /&gt;
				return aCounty&lt;br /&gt;
			end&lt;br /&gt;
			debugLog(nil, &amp;quot;No&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
			debugLog(4, &amp;quot;match anywhere, preceded and followed by separator? &amp;quot;)&lt;br /&gt;
			if mw.ustring.match(pn, &amp;quot;[^%w]&amp;quot; .. testCountyEncoded .. &amp;quot;[^%w]&amp;quot;) then&lt;br /&gt;
				debugLog(nil, &amp;quot;Yes&amp;quot;)&lt;br /&gt;
				return aCounty&lt;br /&gt;
			end&lt;br /&gt;
			debugLog(nil, &amp;quot;No&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- parse the pagename to find 3 parts: prefix, county name, suffix&lt;br /&gt;
function parsePagename(pn)&lt;br /&gt;
	debugLog(1, &amp;quot;parsePagename: [&amp;quot; .. pn .. &amp;quot;]&amp;quot;)&lt;br /&gt;
	if mw.ustring.match(pn, &amp;quot;^County%s+&amp;quot;) ~= nil then&lt;br /&gt;
		debugLog(2, &amp;#039;Invalid. [&amp;#039; .. pn .. &amp;#039;] includes word &amp;quot;County&amp;quot;&amp;#039;)&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local validCountyName&lt;br /&gt;
	validCountyName = findCountyNameInPagename(pn, IrishGAACounties, &amp;quot;Irish GAA Counties&amp;quot;)&lt;br /&gt;
	if (validCountyName == nil) then&lt;br /&gt;
		validCountyName = findCountyNameInPagename(pn, OverseasGAACounties, &amp;quot;Overseas GAA Counties&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	if validCountyName == nil then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- if we get here, the page name &amp;quot;pn&amp;quot; includes a validCountyName&lt;br /&gt;
	-- so now we need to split the string&lt;br /&gt;
	&lt;br /&gt;
	debugLog(2, &amp;quot;split pagename around [&amp;quot; .. validCountyName .. &amp;quot;]&amp;quot;)&lt;br /&gt;
	local validCountyEncoded = mw.ustring.gsub(validCountyName, &amp;quot;([%W])&amp;quot;, &amp;quot;%%%1&amp;quot;)&lt;br /&gt;
	match_prefix, match_county, match_suffix = mw.ustring.match(pn, &amp;quot;^(.*)(&amp;quot; .. validCountyEncoded .. &amp;quot;)(.*)$&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	title_prefix = match_prefix&lt;br /&gt;
	title_suffix = match_suffix&lt;br /&gt;
	thisPageCounty = match_county&lt;br /&gt;
	debugLog(2, &amp;quot;parse successful&amp;quot;)&lt;br /&gt;
	debugLog(3, &amp;quot;title_prefix = [&amp;quot; .. title_prefix .. &amp;quot;]&amp;quot;)&lt;br /&gt;
	debugLog(3, &amp;quot;thisPageCounty = [&amp;quot; .. thisPageCounty .. &amp;quot;]&amp;quot;)&lt;br /&gt;
	debugLog(3, &amp;quot;title_suffix = [&amp;quot; .. title_suffix .. &amp;quot;]&amp;quot;)&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function publishDebugLog()&lt;br /&gt;
	if not debugging then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;==Debugging ==\n\n&amp;quot; .. debugmsg .. &amp;quot;\n== Output ==\n&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- debugLog builds a log which can be output if debuging is enabled&lt;br /&gt;
-- each log entry is given a level, so that the output is not simply a flat list&lt;br /&gt;
-- a debug msg may be appended to the previous msg by setting the level to nil&lt;br /&gt;
function debugLog(level, msg)&lt;br /&gt;
&lt;br /&gt;
	if (debugmsg == nil) then&lt;br /&gt;
		debugmsg = &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if (level ~= nil) then&lt;br /&gt;
		-- not appending, so make a new line&lt;br /&gt;
		debugmsg = debugmsg .. &amp;quot;\n&amp;quot;&lt;br /&gt;
		-- then add the level&lt;br /&gt;
		local i&lt;br /&gt;
		for i = 1, level do&lt;br /&gt;
			if (i % 2) == 1 then&lt;br /&gt;
				debugmsg = debugmsg .. &amp;quot;#&amp;quot;&lt;br /&gt;
			else&lt;br /&gt;
				debugmsg = debugmsg .. &amp;quot;*&amp;quot;&lt;br /&gt;
			end&lt;br /&gt;
		end &lt;br /&gt;
	end&lt;br /&gt;
	debugmsg = debugmsg .. &amp;quot; &amp;quot; .. msg&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function getYesNoParam(args, thisParamName, defaultVal)&lt;br /&gt;
	local returnValue&lt;br /&gt;
	debugLog(2, &amp;quot;Evaluate yes/no parameter: [&amp;quot; .. thisParamName .. &amp;quot;] = [&amp;quot; .. (((args[thisParamName] == nil) and &amp;quot;&amp;quot;) or args[thisParamName]) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
	debugLog(3, &amp;quot;default = &amp;quot; .. ((defaultVal and &amp;quot;Yes&amp;quot;) or &amp;quot;No&amp;quot;))&lt;br /&gt;
	debugLog(3, &amp;quot;Evaluate as: &amp;quot;)&lt;br /&gt;
	returnValue = yesno(args[thisParamName], defaultVal)&lt;br /&gt;
	if (returnValue) then&lt;br /&gt;
		debugLog(nil, &amp;quot;Yes&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		debugLog(nil, &amp;quot;No&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	return returnValue&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	debugLog(1, &amp;quot;Check parameters&amp;quot;)&lt;br /&gt;
	debugging = getYesNoParam(frame.args, &amp;quot;debug&amp;quot;, false)&lt;br /&gt;
&lt;br /&gt;
	-- get the page title&lt;br /&gt;
	thispage = mw.title.getCurrentTitle()&lt;br /&gt;
	thispagename = thispage.text;&lt;br /&gt;
	&lt;br /&gt;
	debugLog(1, &amp;quot;mw.title.getCurrentTitle()&amp;quot;)&lt;br /&gt;
	debugLog(2, &amp;quot;thispage.text = [&amp;quot; .. thispage.text ..&amp;quot;]&amp;quot;)&lt;br /&gt;
	debugLog(2, &amp;quot;thispage.namespace = [&amp;quot; .. thispage.namespace ..&amp;quot;]&amp;quot;)&lt;br /&gt;
	debugLog(2, &amp;quot;thispage.nsText = [&amp;quot; .. thispage.nsText ..&amp;quot;]&amp;quot;)&lt;br /&gt;
	debugLog(2, &amp;quot;is it a cat? using (thispage:inNamespace(14)): &amp;quot;)&lt;br /&gt;
	if not (thispage:inNamespace(14)) then&lt;br /&gt;
		debugLog(nil, &amp;quot;No, this is not a category&amp;quot;)&lt;br /&gt;
		debugLog(1, &amp;quot;Not a category, so no output&amp;quot;)&lt;br /&gt;
		return publishDebugLog()&lt;br /&gt;
	end&lt;br /&gt;
	debugLog(nil, &amp;quot;Yes, this is a category&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	if not parsePagename(thispagename) then&lt;br /&gt;
		-- some error parsing the title, so don&amp;#039;t proceed to output&lt;br /&gt;
		return publishDebugLog()&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	debugLog(1, &amp;quot;all parse done&amp;quot;)&lt;br /&gt;
	debugLog(2, &amp;quot;title_prefix = [&amp;quot; .. title_prefix .. &amp;quot;]&amp;quot;)&lt;br /&gt;
	debugLog(2, &amp;quot;title_suffix = [&amp;quot; .. title_suffix .. &amp;quot;]&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	return publishDebugLog() .. makeTable()&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;BrownHairedGirl</name></author>
	</entry>
</feed>