<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://prdmc.ca/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AUserbox</id>
	<title>Module:Userbox - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://prdmc.ca/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AUserbox"/>
	<link rel="alternate" type="text/html" href="https://prdmc.ca/w/index.php?title=Module:Userbox&amp;action=history"/>
	<updated>2026-04-17T09:09:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://prdmc.ca/w/index.php?title=Module:Userbox&amp;diff=1875&amp;oldid=prev</id>
		<title>RandomUser34: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://prdmc.ca/w/index.php?title=Module:Userbox&amp;diff=1875&amp;oldid=prev"/>
		<updated>2026-02-18T02:08:29Z</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 02:08, 18 February 2026&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>RandomUser34</name></author>
	</entry>
	<entry>
		<id>https://prdmc.ca/w/index.php?title=Module:Userbox&amp;diff=1874&amp;oldid=prev</id>
		<title>wp&gt;Jonesey95: Add more color:inherit properties so that background-color is not left without a color. Tested in the sandbox. Please revert if this breaks anything.</title>
		<link rel="alternate" type="text/html" href="https://prdmc.ca/w/index.php?title=Module:Userbox&amp;diff=1874&amp;oldid=prev"/>
		<updated>2025-10-04T02:14:54Z</updated>

		<summary type="html">&lt;p&gt;Add more color:inherit properties so that background-color is not left without a color. Tested in the sandbox. Please revert if this breaks anything.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module implements {{userbox}}.&lt;br /&gt;
&lt;br /&gt;
local categoryHandler = require(&amp;#039;Module:Category handler&amp;#039;).main&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Helper functions&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local function checkNum(val, default)&lt;br /&gt;
	-- Checks whether a value is a number greater than or equal to zero. If so,&lt;br /&gt;
	-- returns it as a number. If not, returns a default value.&lt;br /&gt;
	val = tonumber(val)&lt;br /&gt;
	if val and val &amp;gt;= 0 then&lt;br /&gt;
		return val&lt;br /&gt;
	else&lt;br /&gt;
		return default&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function addSuffix(num, suffix)&lt;br /&gt;
	-- Turns a number into a string and adds a suffix.&lt;br /&gt;
	if num then&lt;br /&gt;
		return tostring(num) .. suffix&lt;br /&gt;
	else&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function checkNumAndAddSuffix(num, default, suffix)&lt;br /&gt;
	-- Checks a value with checkNum and adds a suffix.&lt;br /&gt;
	num = checkNum(num, default)&lt;br /&gt;
	return addSuffix(num, suffix)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function makeCat(cat, sort)&lt;br /&gt;
	-- Makes a category link.&lt;br /&gt;
	if sort then&lt;br /&gt;
		return mw.ustring.format(&amp;#039;[[Category:%s|%s]]&amp;#039;, cat, sort)&lt;br /&gt;
	else&lt;br /&gt;
		return mw.ustring.format(&amp;#039;[[Category:%s]]&amp;#039;, cat)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Argument processing&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local function makeInvokeFunc(funcName)&lt;br /&gt;
	return function (frame)&lt;br /&gt;
		local origArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs(frame)&lt;br /&gt;
		local args = {}&lt;br /&gt;
		for k, v in pairs(origArgs) do&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
		return p.main(funcName, args)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.userbox = makeInvokeFunc(&amp;#039;_userbox&amp;#039;)&lt;br /&gt;
p[&amp;#039;userbox-2&amp;#039;] = makeInvokeFunc(&amp;#039;_userbox-2&amp;#039;)&lt;br /&gt;
p[&amp;#039;userbox-r&amp;#039;] = makeInvokeFunc(&amp;#039;_userbox-r&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Main functions&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
function p.main(funcName, args)&lt;br /&gt;
	local userboxData = p[funcName](args)&lt;br /&gt;
	local userbox = p.render(userboxData)&lt;br /&gt;
	local cats = p.categories(args)&lt;br /&gt;
	return userbox .. (cats or &amp;#039;&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._userbox(args)&lt;br /&gt;
	-- Does argument processing for {{userbox}}.&lt;br /&gt;
	local data = {}&lt;br /&gt;
&lt;br /&gt;
	-- Get div tag values.&lt;br /&gt;
	data.float = args.float&lt;br /&gt;
	local borderWidthNum = checkNum(args[&amp;#039;border-width&amp;#039;] or args[&amp;#039;border-s&amp;#039;], nil)&lt;br /&gt;
	data.borderWidth = addSuffix(borderWidthNum, &amp;#039;px&amp;#039;)&lt;br /&gt;
	data.borderColor = args[&amp;#039;border-color&amp;#039;] or args[&amp;#039;border-c&amp;#039;] or args[1] or args[&amp;#039;id-c&amp;#039;]&lt;br /&gt;
	data.width = borderWidthNum and addSuffix(240 - 2 * borderWidthNum, &amp;#039;px&amp;#039;)&lt;br /&gt;
	data.bodyClass = args.bodyclass&lt;br /&gt;
&lt;br /&gt;
	-- Get table tag values.&lt;br /&gt;
	data.backgroundColor = args[&amp;#039;info-background&amp;#039;] or args[2] or args[&amp;#039;info-c&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
	-- Get info values.&lt;br /&gt;
	data.info = args.info or args[4] or &amp;quot;&amp;lt;code&amp;gt;{{{info}}}&amp;lt;/code&amp;gt;&amp;quot;&lt;br /&gt;
	data.infoTextAlign = args[&amp;#039;info-a&amp;#039;]&lt;br /&gt;
	data.infoFontSize = checkNumAndAddSuffix(args[&amp;#039;info-size&amp;#039;] or args[&amp;#039;info-s&amp;#039;], nil, &amp;#039;pt&amp;#039;)&lt;br /&gt;
	data.infoHeight = checkNumAndAddSuffix(args[&amp;#039;logo-height&amp;#039;] or args[&amp;#039;id-h&amp;#039;], nil, &amp;#039;px&amp;#039;)&lt;br /&gt;
	data.infoPadding = args[&amp;#039;info-padding&amp;#039;] or args[&amp;#039;info-p&amp;#039;]&lt;br /&gt;
	data.infoLineHeight = args[&amp;#039;info-line-height&amp;#039;] or args[&amp;#039;info-lh&amp;#039;]&lt;br /&gt;
	data.infoColor = args[&amp;#039;info-color&amp;#039;] or args[&amp;#039;info-fc&amp;#039;]&lt;br /&gt;
	data.infoOtherParams = args[&amp;#039;info-other-param&amp;#039;] or args[&amp;#039;info-op&amp;#039;]&lt;br /&gt;
	data.infoClass = args[&amp;#039;info-class&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
	-- Get id values.&lt;br /&gt;
	local id = args.logo or args[3] or args.id&lt;br /&gt;
	data.id = id&lt;br /&gt;
	data.showId = id and true or false&lt;br /&gt;
	data.idWidth = checkNumAndAddSuffix(args[&amp;#039;logo-width&amp;#039;] or args[&amp;#039;id-w&amp;#039;], nil, &amp;#039;px&amp;#039;)&lt;br /&gt;
	data.idHeight = checkNumAndAddSuffix(args[&amp;#039;logo-height&amp;#039;] or args[&amp;#039;id-h&amp;#039;], nil, &amp;#039;px&amp;#039;)&lt;br /&gt;
	data.idBackgroundColor = args[&amp;#039;logo-background&amp;#039;] or args[1] or args[&amp;#039;id-c&amp;#039;]&lt;br /&gt;
	data.idTextAlign = args[&amp;#039;id-a&amp;#039;]&lt;br /&gt;
	data.idFontSize = checkNum(args[&amp;#039;logo-size&amp;#039;] or args[5] or args[&amp;#039;id-s&amp;#039;], nil)&lt;br /&gt;
	data.idColor = args[&amp;#039;logo-color&amp;#039;] or args[&amp;#039;id-fc&amp;#039;] or data.infoColor&lt;br /&gt;
	data.idPadding = args[&amp;#039;logo-padding&amp;#039;] or args[&amp;#039;id-p&amp;#039;]&lt;br /&gt;
	data.idLineHeight = args[&amp;#039;logo-line-height&amp;#039;] or args[&amp;#039;id-lh&amp;#039;]&lt;br /&gt;
	data.idOtherParams = args[&amp;#039;logo-other-param&amp;#039;] or args[&amp;#039;id-op&amp;#039;]&lt;br /&gt;
	data.idClass = args[&amp;#039;id-class&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
	return data&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p[&amp;#039;_userbox-2&amp;#039;] = function (args)&lt;br /&gt;
	-- Does argument processing for {{userbox-2}}.&lt;br /&gt;
	local data = {}&lt;br /&gt;
&lt;br /&gt;
	-- Get div tag values.&lt;br /&gt;
	data.float = args.float&lt;br /&gt;
	local borderWidthNum = checkNum(args[&amp;#039;border-s&amp;#039;] or args[9], nil)&lt;br /&gt;
	data.borderWidth = addSuffix(borderWidthNum, &amp;#039;px&amp;#039;)&lt;br /&gt;
	data.borderColor = args[&amp;#039;border-c&amp;#039;] or args[6] or args[&amp;#039;id1-c&amp;#039;] or args[1]&lt;br /&gt;
	data.width = borderWidthNum and addSuffix(240 - 2 * borderWidthNum, &amp;#039;px&amp;#039;)&lt;br /&gt;
	data.bodyClass = args.bodyclass&lt;br /&gt;
&lt;br /&gt;
	-- Get table tag values.&lt;br /&gt;
	data.backgroundColor = args[&amp;#039;info-c&amp;#039;] or args[2]&lt;br /&gt;
&lt;br /&gt;
	-- Get info values.&lt;br /&gt;
	data.info = args.info or args[4] or &amp;quot;&amp;lt;code&amp;gt;{{{info}}}&amp;lt;/code&amp;gt;&amp;quot;&lt;br /&gt;
	data.infoTextAlign = args[&amp;#039;info-a&amp;#039;]&lt;br /&gt;
	data.infoFontSize = checkNumAndAddSuffix(args[&amp;#039;info-s&amp;#039;], nil, &amp;#039;pt&amp;#039;)&lt;br /&gt;
	data.infoColor = args[&amp;#039;info-fc&amp;#039;] or args[8]&lt;br /&gt;
	data.infoPadding = args[&amp;#039;info-p&amp;#039;]&lt;br /&gt;
	data.infoLineHeight = args[&amp;#039;info-lh&amp;#039;]&lt;br /&gt;
	data.infoOtherParams = args[&amp;#039;info-op&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
	-- Get id values.&lt;br /&gt;
	data.showId = true&lt;br /&gt;
	data.id = args.logo or args[3] or args.id1 or &amp;#039;id1&amp;#039;&lt;br /&gt;
	data.idWidth = checkNumAndAddSuffix(args[&amp;#039;id1-w&amp;#039;], nil, &amp;#039;px&amp;#039;)&lt;br /&gt;
	data.idHeight = checkNumAndAddSuffix(args[&amp;#039;id-h&amp;#039;], nil, &amp;#039;px&amp;#039;)&lt;br /&gt;
	data.idBackgroundColor = args[&amp;#039;id1-c&amp;#039;] or args[1]&lt;br /&gt;
	data.idTextAlign = args[&amp;#039;id-a&amp;#039;]&lt;br /&gt;
	data.idFontSize = checkNum(args[&amp;#039;id1-s&amp;#039;], nil)&lt;br /&gt;
	data.idLineHeight = args[&amp;#039;id1-lh&amp;#039;]&lt;br /&gt;
	data.idColor = args[&amp;#039;id1-fc&amp;#039;] or data.infoColor&lt;br /&gt;
	data.idPadding = args[&amp;#039;id1-p&amp;#039;]&lt;br /&gt;
	data.idOtherParams = args[&amp;#039;id1-op&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
	-- Get id2 values.&lt;br /&gt;
	data.showId2 = true&lt;br /&gt;
	data.id2 = args.logo or args[5] or args.id2 or &amp;#039;id2&amp;#039;&lt;br /&gt;
	data.id2Width = checkNumAndAddSuffix(args[&amp;#039;id2-w&amp;#039;], nil, &amp;#039;px&amp;#039;)&lt;br /&gt;
	data.id2Height = data.idHeight&lt;br /&gt;
	data.id2BackgroundColor = args[&amp;#039;id2-c&amp;#039;] or args[7] or args[1]&lt;br /&gt;
	data.id2TextAlign = nil -- Always center, but don&amp;#039;t set if no content&lt;br /&gt;
	data.id2FontSize = checkNum(args[&amp;#039;id2-s&amp;#039;], nil)&lt;br /&gt;
	data.id2LineHeight = args[&amp;#039;id2-lh&amp;#039;]&lt;br /&gt;
	data.id2Color = args[&amp;#039;id2-fc&amp;#039;] or data.infoColor&lt;br /&gt;
	data.id2Padding = args[&amp;#039;id2-p&amp;#039;]&lt;br /&gt;
	data.id2OtherParams = args[&amp;#039;id2-op&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
	return data&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p[&amp;#039;_userbox-r&amp;#039;] = function (args)&lt;br /&gt;
	-- Does argument processing for {{userbox-r}}.&lt;br /&gt;
	local data = {}&lt;br /&gt;
&lt;br /&gt;
	-- Get div tag values.&lt;br /&gt;
	data.float = args.float&lt;br /&gt;
	local borderWidthNum = checkNum(args[&amp;#039;border-width&amp;#039;] or args[&amp;#039;border-s&amp;#039;], nil)&lt;br /&gt;
	data.borderWidth = addSuffix(borderWidthNum, &amp;#039;px&amp;#039;)&lt;br /&gt;
	data.borderColor = args[&amp;#039;border-color&amp;#039;] or args[&amp;#039;border-c&amp;#039;] or args[1] or args[&amp;#039;id-c&amp;#039;]&lt;br /&gt;
	data.width = borderWidthNum and addSuffix(240 - 2 * borderWidthNum, &amp;#039;px&amp;#039;)&lt;br /&gt;
	data.bodyClass = args.bodyclass&lt;br /&gt;
&lt;br /&gt;
	-- Get table tag values.&lt;br /&gt;
	data.backgroundColor = args[&amp;#039;info-background&amp;#039;] or args[2] or args[&amp;#039;info-c&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
	-- Get id values.&lt;br /&gt;
	data.showId = false -- We only show id2 in userbox-r.&lt;br /&gt;
&lt;br /&gt;
	-- Get info values.&lt;br /&gt;
	data.info = args.info or args[4] or &amp;quot;&amp;lt;code&amp;gt;{{{info}}}&amp;lt;/code&amp;gt;&amp;quot;&lt;br /&gt;
	data.infoTextAlign = args[&amp;#039;info-align&amp;#039;] or args[&amp;#039;info-a&amp;#039;]&lt;br /&gt;
	data.infoFontSize = checkNumAndAddSuffix(args[&amp;#039;info-size&amp;#039;] or args[&amp;#039;info-s&amp;#039;], nil, &amp;#039;pt&amp;#039;)&lt;br /&gt;
	data.infoPadding = args[&amp;#039;info-padding&amp;#039;] or args[&amp;#039;info-p&amp;#039;]&lt;br /&gt;
	data.infoLineHeight = args[&amp;#039;info-line-height&amp;#039;] or args[&amp;#039;info-lh&amp;#039;]&lt;br /&gt;
	data.infoColor = args[&amp;#039;info-color&amp;#039;] or args[&amp;#039;info-fc&amp;#039;]&lt;br /&gt;
	data.infoOtherParams = args[&amp;#039;info-other-param&amp;#039;] or args[&amp;#039;info-op&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
	-- Get id2 values.&lt;br /&gt;
	data.showId2 = true  -- userbox-r always shows the ID cell (as id2)&lt;br /&gt;
	data.id2 = args.logo or args[3] or args.id or &amp;#039;id&amp;#039;&lt;br /&gt;
	data.id2Width = checkNumAndAddSuffix(args[&amp;#039;logo-width&amp;#039;] or args[&amp;#039;id-w&amp;#039;], nil, &amp;#039;px&amp;#039;)&lt;br /&gt;
	data.id2Height = checkNumAndAddSuffix(args[&amp;#039;logo-height&amp;#039;] or args[&amp;#039;id-h&amp;#039;], nil, &amp;#039;px&amp;#039;)&lt;br /&gt;
	data.id2BackgroundColor = args[&amp;#039;logo-background&amp;#039;] or args[1] or args[&amp;#039;id-c&amp;#039;]&lt;br /&gt;
	data.id2TextAlign = args[&amp;#039;id-a&amp;#039;]&lt;br /&gt;
	data.id2FontSize = checkNum(args[&amp;#039;logo-size&amp;#039;] or args[5] or args[&amp;#039;id-s&amp;#039;], nil)&lt;br /&gt;
	data.id2Color = args[&amp;#039;logo-color&amp;#039;] or args[&amp;#039;id-fc&amp;#039;] or data.infoColor&lt;br /&gt;
	data.id2Padding = args[&amp;#039;logo-padding&amp;#039;] or args[&amp;#039;id-p&amp;#039;]&lt;br /&gt;
	data.id2LineHeight = args[&amp;#039;logo-line-height&amp;#039;] or args[&amp;#039;id-lh&amp;#039;]&lt;br /&gt;
	data.id2OtherParams = args[&amp;#039;logo-other-param&amp;#039;] or args[&amp;#039;id-op&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
	return data&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.render(data)&lt;br /&gt;
	-- Renders the userbox html using the content of the data table.&lt;br /&gt;
	-- Add TemplateStyles&lt;br /&gt;
	local templateStyles = mw.getCurrentFrame():extensionTag{&lt;br /&gt;
		name = &amp;#039;templatestyles&amp;#039;, args = { src = &amp;#039;Template:Userbox/styles.css&amp;#039; }&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	-- Render the div tag html.&lt;br /&gt;
	local root = mw.html.create(&amp;#039;div&amp;#039;)&lt;br /&gt;
	root:addClass(&amp;#039;wikipediauserbox&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	-- Only add CSS properties if they have values&lt;br /&gt;
	if data.float then root:css(&amp;#039;float&amp;#039;, data.float) end&lt;br /&gt;
	if data.borderWidth then &lt;br /&gt;
		root:css(&amp;#039;border-width&amp;#039;, data.borderWidth)&lt;br /&gt;
	end&lt;br /&gt;
	if data.borderColor then &lt;br /&gt;
		root:css(&amp;#039;border-color&amp;#039;, data.borderColor)&lt;br /&gt;
		-- Set border style if we have a color but potentially no width set&lt;br /&gt;
		if not data.borderWidth then&lt;br /&gt;
			root:css(&amp;#039;border-width&amp;#039;, &amp;#039;1px&amp;#039;)  -- default border width&lt;br /&gt;
		end&lt;br /&gt;
		root:css(&amp;#039;border-style&amp;#039;, &amp;#039;solid&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	if data.width then root:css(&amp;#039;width&amp;#039;, data.width) end&lt;br /&gt;
	if data.bodyClass then root:addClass(data.bodyClass) end&lt;br /&gt;
&lt;br /&gt;
	-- Render the table tag html.&lt;br /&gt;
	local tableroot = root:tag(&amp;#039;table&amp;#039;)&lt;br /&gt;
	tableroot:attr(&amp;#039;role&amp;#039;, &amp;#039;presentation&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	-- Only add CSS if values exist&lt;br /&gt;
	if data.width then tableroot:css(&amp;#039;width&amp;#039;, data.width) end&lt;br /&gt;
	if data.backgroundColor then tableroot:css(&amp;#039;background&amp;#039;, data.backgroundColor):css(&amp;#039;color&amp;#039;, &amp;#039;inherit&amp;#039;) end&lt;br /&gt;
&lt;br /&gt;
	local tablerow = tableroot:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	-- Create cells based on what should actually be shown&lt;br /&gt;
	if data.showId == false then&lt;br /&gt;
		-- userbox-r: info cell first, then id2 cell (if showId2 is true)&lt;br /&gt;
		local infoCell = tablerow:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
		infoCell:addClass(&amp;#039;userbox-info&amp;#039;)&lt;br /&gt;
		if data.infoTextAlign then infoCell:css(&amp;#039;text-align&amp;#039;, data.infoTextAlign) end&lt;br /&gt;
		if data.infoFontSize then infoCell:css(&amp;#039;font-size&amp;#039;, data.infoFontSize) end&lt;br /&gt;
		if data.infoPadding then infoCell:css(&amp;#039;padding&amp;#039;, data.infoPadding) end&lt;br /&gt;
		if data.infoHeight then infoCell:css(&amp;#039;height&amp;#039;, data.infoHeight) end&lt;br /&gt;
		if data.infoLineHeight then infoCell:css(&amp;#039;line-height&amp;#039;, data.infoLineHeight) end&lt;br /&gt;
		if data.infoColor then infoCell:css(&amp;#039;color&amp;#039;, data.infoColor) end&lt;br /&gt;
		if data.infoOtherParams then infoCell:cssText(data.infoOtherParams) end&lt;br /&gt;
		if data.infoClass then infoCell:addClass(data.infoClass) end&lt;br /&gt;
		if data.info then infoCell:wikitext(data.info) end&lt;br /&gt;
		&lt;br /&gt;
		-- Create id2 cell only if showId2 is true&lt;br /&gt;
		if data.showId2 then&lt;br /&gt;
			local id2Cell = tablerow:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
			id2Cell:addClass(&amp;#039;userbox-id2&amp;#039;)&lt;br /&gt;
			if data.id2Width then id2Cell:css(&amp;#039;width&amp;#039;, data.id2Width) end&lt;br /&gt;
			if data.id2Height then id2Cell:css(&amp;#039;height&amp;#039;, data.id2Height) end&lt;br /&gt;
			if data.id2BackgroundColor then id2Cell:css(&amp;#039;background&amp;#039;, data.id2BackgroundColor) end&lt;br /&gt;
			if data.id2TextAlign then id2Cell:css(&amp;#039;text-align&amp;#039;, data.id2TextAlign) end&lt;br /&gt;
			if data.id2FontSize then id2Cell:css(&amp;#039;font-size&amp;#039;, data.id2FontSize .. &amp;#039;pt&amp;#039;) end&lt;br /&gt;
			if data.id2Color then id2Cell:css(&amp;#039;color&amp;#039;, data.id2Color) else id2Cell:css(&amp;#039;color&amp;#039;, &amp;#039;inherit&amp;#039;) end&lt;br /&gt;
			if data.id2Padding then id2Cell:css(&amp;#039;padding&amp;#039;, data.id2Padding) end&lt;br /&gt;
			if data.id2LineHeight then id2Cell:css(&amp;#039;line-height&amp;#039;, data.id2LineHeight) end&lt;br /&gt;
			if data.id2OtherParams then id2Cell:cssText(data.id2OtherParams) end&lt;br /&gt;
			if data.id2 then id2Cell:wikitext(data.id2) end&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		-- userbox and userbox-2: create id cell only if showId is true&lt;br /&gt;
		if data.showId then&lt;br /&gt;
			local idCell = tablerow:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
			idCell:addClass(&amp;#039;userbox-id&amp;#039;)&lt;br /&gt;
			if data.idWidth then idCell:css(&amp;#039;width&amp;#039;, data.idWidth) end&lt;br /&gt;
			if data.idHeight then idCell:css(&amp;#039;height&amp;#039;, data.idHeight) end&lt;br /&gt;
			if data.idBackgroundColor then idCell:css(&amp;#039;background&amp;#039;, data.idBackgroundColor) end&lt;br /&gt;
			if data.idTextAlign then idCell:css(&amp;#039;text-align&amp;#039;, data.idTextAlign) end&lt;br /&gt;
			if data.idFontSize then idCell:css(&amp;#039;font-size&amp;#039;, data.idFontSize .. &amp;#039;pt&amp;#039;) end&lt;br /&gt;
			if data.idColor then idCell:css(&amp;#039;color&amp;#039;, data.idColor) else idCell:css(&amp;#039;color&amp;#039;, &amp;#039;inherit&amp;#039;) end&lt;br /&gt;
			if data.idPadding then idCell:css(&amp;#039;padding&amp;#039;, data.idPadding) end&lt;br /&gt;
			if data.idLineHeight then idCell:css(&amp;#039;line-height&amp;#039;, data.idLineHeight) end&lt;br /&gt;
			if data.idOtherParams then idCell:cssText(data.idOtherParams) end&lt;br /&gt;
			if data.idClass then idCell:addClass(data.idClass) end&lt;br /&gt;
			if data.id then idCell:wikitext(data.id) end&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		-- Always create info cell for userbox and userbox-2&lt;br /&gt;
		local infoCell = tablerow:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
		infoCell:addClass(&amp;#039;userbox-info&amp;#039;)&lt;br /&gt;
		if data.infoTextAlign then infoCell:css(&amp;#039;text-align&amp;#039;, data.infoTextAlign) end&lt;br /&gt;
		if data.infoFontSize then infoCell:css(&amp;#039;font-size&amp;#039;, data.infoFontSize) end&lt;br /&gt;
		if data.infoPadding then infoCell:css(&amp;#039;padding&amp;#039;, data.infoPadding) end&lt;br /&gt;
		if data.infoHeight then infoCell:css(&amp;#039;height&amp;#039;, data.infoHeight) end&lt;br /&gt;
		if data.infoLineHeight then infoCell:css(&amp;#039;line-height&amp;#039;, data.infoLineHeight) end&lt;br /&gt;
		if data.infoColor then infoCell:css(&amp;#039;color&amp;#039;, data.infoColor) end&lt;br /&gt;
		if data.infoOtherParams then infoCell:cssText(data.infoOtherParams) end&lt;br /&gt;
		if data.infoClass then infoCell:addClass(data.infoClass) end&lt;br /&gt;
		if data.info then infoCell:wikitext(data.info) end&lt;br /&gt;
		&lt;br /&gt;
		-- Create id2 cell only for userbox-2 and only if showId2 is true&lt;br /&gt;
		if data.showId2 then&lt;br /&gt;
			local id2Cell = tablerow:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
			id2Cell:addClass(&amp;#039;userbox-id2&amp;#039;)&lt;br /&gt;
			if data.id2Width then id2Cell:css(&amp;#039;width&amp;#039;, data.id2Width) end&lt;br /&gt;
			if data.id2Height then id2Cell:css(&amp;#039;height&amp;#039;, data.id2Height) end&lt;br /&gt;
			if data.id2BackgroundColor then id2Cell:css(&amp;#039;background&amp;#039;, data.id2BackgroundColor) end&lt;br /&gt;
			if data.id2TextAlign then id2Cell:css(&amp;#039;text-align&amp;#039;, data.id2TextAlign) end&lt;br /&gt;
			if data.id2FontSize then id2Cell:css(&amp;#039;font-size&amp;#039;, data.id2FontSize .. &amp;#039;pt&amp;#039;) end&lt;br /&gt;
			if data.id2Color then id2Cell:css(&amp;#039;color&amp;#039;, data.id2Color) else id2Cell:css(&amp;#039;color&amp;#039;, &amp;#039;inherit&amp;#039;) end&lt;br /&gt;
			if data.id2Padding then id2Cell:css(&amp;#039;padding&amp;#039;, data.id2Padding) end&lt;br /&gt;
			if data.id2LineHeight then id2Cell:css(&amp;#039;line-height&amp;#039;, data.id2LineHeight) end&lt;br /&gt;
			if data.id2OtherParams then id2Cell:cssText(data.id2OtherParams) end&lt;br /&gt;
			if data.id2 then id2Cell:wikitext(data.id2) end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local title = mw.title.getCurrentTitle()&lt;br /&gt;
	if (title.namespace == 2) and not title.text:match(&amp;quot;/&amp;quot;) then&lt;br /&gt;
		return templateStyles .. tostring(root) -- regular user page&lt;br /&gt;
	elseif title.namespace == 14 then&lt;br /&gt;
		return templateStyles .. tostring(root) -- category&lt;br /&gt;
	elseif title.isTalkPage then&lt;br /&gt;
		return templateStyles .. tostring(root) -- talk page&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Color contrast checking (simplified for TemplateStyles)&lt;br /&gt;
	local legible = true&lt;br /&gt;
	local contrast = require(&amp;#039;Module:Color contrast&amp;#039;)._ratio&lt;br /&gt;
	local function has_text(wikitext)&lt;br /&gt;
		if not wikitext then return false end&lt;br /&gt;
		wikitext = wikitext:gsub(&amp;quot;]]&amp;quot;, &amp;quot;|]]&amp;quot;)&lt;br /&gt;
		wikitext = wikitext:gsub(&amp;quot;%[%[%s*[Mm][Ee][Dd][Ii][Aa]%s*:[^|]-(|.-)]]&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
		wikitext = wikitext:gsub(&amp;quot;%[%[%s*[Ii][Mm][Aa][Gg][Ee]%s*:[^|]-(|.-)]]&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
		wikitext = wikitext:gsub(&amp;quot;%[%[%s*[Ff][Ii][Ll][Ee]%s*:[^|]-(|.-)]]&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
		return mw.text.trim(wikitext) ~= &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if data.infoColor and data.backgroundColor and contrast { data.infoColor, data.backgroundColor, error = 0 } &amp;lt; 4.5 then&lt;br /&gt;
		legible = false&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- For bold text &amp;gt;= 14pt, requirement is only 3.&lt;br /&gt;
	local idContrastThreshold = 4.5&lt;br /&gt;
	local id2ContrastThreshold = 4.5&lt;br /&gt;
	if (data.idFontSize or 0) &amp;gt;= 14 then idContrastThreshold = 3 end&lt;br /&gt;
	if (data.id2FontSize or 0) &amp;gt;= 14 then id2ContrastThreshold = 3 end&lt;br /&gt;
&lt;br /&gt;
	if data.showId and data.idColor and data.idBackgroundColor and contrast { data.idColor, data.idBackgroundColor, error = 0 } &amp;lt; idContrastThreshold then&lt;br /&gt;
		if has_text(data.id or &amp;quot;&amp;quot;) then legible = false end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if data.showId2 and data.id2Color and data.id2BackgroundColor and contrast { data.id2Color, data.id2BackgroundColor, error = 0 } &amp;lt; id2ContrastThreshold then&lt;br /&gt;
		if has_text(data.id2 or &amp;quot;&amp;quot;) then legible = false end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not legible then&lt;br /&gt;
		root:wikitext(&amp;#039;[[Category:Userboxes with insufficient color contrast]]&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return templateStyles .. tostring(root)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.categories(args, page)&lt;br /&gt;
	-- Gets categories from [[Module:Category handler]].&lt;br /&gt;
	-- The page parameter makes the function act as though the module was being called from that page.&lt;br /&gt;
	-- It is included for testing purposes.&lt;br /&gt;
	local cats = {}&lt;br /&gt;
	cats[#cats + 1] = args.usercategory&lt;br /&gt;
	cats[#cats + 1] = args.usercategory2&lt;br /&gt;
	cats[#cats + 1] = args.usercategory3&lt;br /&gt;
	cats[#cats + 1] = args.usercategory4&lt;br /&gt;
	cats[#cats + 1] = args.usercategory5&lt;br /&gt;
&lt;br /&gt;
	-- Get the title object&lt;br /&gt;
	local title&lt;br /&gt;
	if page then&lt;br /&gt;
		title = mw.title.new(page)&lt;br /&gt;
	else&lt;br /&gt;
		title = mw.title.getCurrentTitle()&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Build category handler arguments.&lt;br /&gt;
	local chargs = {}&lt;br /&gt;
	chargs.page = page&lt;br /&gt;
	chargs.nocat = args.nocat&lt;br /&gt;
	chargs.main = &amp;#039;[[Category:Pages with templates in the wrong namespace]]&amp;#039;&lt;br /&gt;
	if args.notcatsubpages then&lt;br /&gt;
		chargs.subpage = &amp;#039;no&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- User namespace.&lt;br /&gt;
	local user = &amp;#039;&amp;#039;&lt;br /&gt;
	for i, cat in ipairs(cats) do&lt;br /&gt;
		user = user .. makeCat(cat)&lt;br /&gt;
	end&lt;br /&gt;
	chargs.user = user&lt;br /&gt;
&lt;br /&gt;
	return categoryHandler(chargs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wp&gt;Jonesey95</name></author>
	</entry>
</feed>