<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox_Custom</id>
	<title>Module:Infobox Custom - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox_Custom"/>
	<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Module:Infobox_Custom&amp;action=history"/>
	<updated>2026-05-16T04:58:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.runerealm.org/index.php?title=Module:Infobox_Custom&amp;diff=34990&amp;oldid=prev</id>
		<title>Alex: Created page with &quot;local p = {}  function p._main(args) 	local tbl = mw.html.create(&#039;table&#039;):addClass(&#039;infobox&#039;) 	local header = tbl:tag(&#039;tr&#039;) 	header:tag(&#039;th&#039;):wikitext(args[&#039;name&#039;] or mw.title.getCurrentTitle().fullText):addClass(&#039;infobox-header&#039;):attr(&#039;colspan&#039;, &#039;2&#039;) 	 	function toboolean(v) 		return v ~= nil and v ~= false 	end  	function get_entry(i) 		if args[&#039;key&#039;..i] then 			return { key = args[&#039;key&#039;..i], value = args[&#039;value&#039;..i] or &#039;&#039; } 		elseif args[&#039;subheader&#039;..i] then 			return...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Module:Infobox_Custom&amp;diff=34990&amp;oldid=prev"/>
		<updated>2024-10-16T23:12:18Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {}  function p._main(args) 	local tbl = mw.html.create(&amp;#039;table&amp;#039;):addClass(&amp;#039;infobox&amp;#039;) 	local header = tbl:tag(&amp;#039;tr&amp;#039;) 	header:tag(&amp;#039;th&amp;#039;):wikitext(args[&amp;#039;name&amp;#039;] or mw.title.getCurrentTitle().fullText):addClass(&amp;#039;infobox-header&amp;#039;):attr(&amp;#039;colspan&amp;#039;, &amp;#039;2&amp;#039;) 	 	function toboolean(v) 		return v ~= nil and v ~= false 	end  	function get_entry(i) 		if args[&amp;#039;key&amp;#039;..i] then 			return { key = args[&amp;#039;key&amp;#039;..i], value = args[&amp;#039;value&amp;#039;..i] or &amp;#039;&amp;#039; } 		elseif args[&amp;#039;subheader&amp;#039;..i] then 			return...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local tbl = mw.html.create(&amp;#039;table&amp;#039;):addClass(&amp;#039;infobox&amp;#039;)&lt;br /&gt;
	local header = tbl:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
	header:tag(&amp;#039;th&amp;#039;):wikitext(args[&amp;#039;name&amp;#039;] or mw.title.getCurrentTitle().fullText):addClass(&amp;#039;infobox-header&amp;#039;):attr(&amp;#039;colspan&amp;#039;, &amp;#039;2&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	function toboolean(v)&lt;br /&gt;
		return v ~= nil and v ~= false&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function get_entry(i)&lt;br /&gt;
		if args[&amp;#039;key&amp;#039;..i] then&lt;br /&gt;
			return { key = args[&amp;#039;key&amp;#039;..i], value = args[&amp;#039;value&amp;#039;..i] or &amp;#039;&amp;#039; }&lt;br /&gt;
		elseif args[&amp;#039;subheader&amp;#039;..i] then&lt;br /&gt;
			return { subheader = args[&amp;#039;subheader&amp;#039;..i] }&lt;br /&gt;
		elseif args[&amp;#039;image&amp;#039;..i] then&lt;br /&gt;
			return { image = args[&amp;#039;image&amp;#039;..i] }&lt;br /&gt;
		elseif args[&amp;#039;map&amp;#039;..i] then&lt;br /&gt;
			return { map = args[&amp;#039;map&amp;#039;..i] }&lt;br /&gt;
		end&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local i = 0&lt;br /&gt;
	local cur_row = {}&lt;br /&gt;
	&lt;br /&gt;
	repeat&lt;br /&gt;
		if cur_row.key or cur_row.value then&lt;br /&gt;
			local row = tbl:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
			row:tag(&amp;#039;th&amp;#039;):wikitext(cur_row.key)&lt;br /&gt;
			row:tag(&amp;#039;td&amp;#039;):wikitext(cur_row.value)&lt;br /&gt;
		elseif cur_row.subheader then&lt;br /&gt;
			tbl:tag(&amp;#039;tr&amp;#039;):tag(&amp;#039;th&amp;#039;):wikitext(cur_row.subheader):addClass(&amp;#039;infobox-subheader&amp;#039;):attr(&amp;#039;colspan&amp;#039;, &amp;#039;2&amp;#039;)&lt;br /&gt;
		elseif cur_row.image then&lt;br /&gt;
			tbl:tag(&amp;#039;tr&amp;#039;):tag(&amp;#039;td&amp;#039;):wikitext(cur_row.image):addClass(&amp;#039;infobox-image infobox-full-width-content&amp;#039;):attr(&amp;#039;colspan&amp;#039;, &amp;#039;2&amp;#039;)&lt;br /&gt;
		elseif cur_row.map then&lt;br /&gt;
			tbl:tag(&amp;#039;tr&amp;#039;):tag(&amp;#039;td&amp;#039;):wikitext(cur_row.map):addClass(&amp;#039;infobox-full-width-content&amp;#039;):attr(&amp;#039;colspan&amp;#039;, &amp;#039;2&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		-- padding row should only be added around the outside of images, and&lt;br /&gt;
		-- around the outside of contiguous sections of keyvals&lt;br /&gt;
		local next_row = get_entry(i + 1)&lt;br /&gt;
		local cur_is_image = toboolean(cur_row.image)&lt;br /&gt;
		local next_is_image = toboolean(next_row and next_row.image)&lt;br /&gt;
		local cur_is_keyval = toboolean(cur_row.key)&lt;br /&gt;
		local next_is_keyval = toboolean(next_row and next_row.key)&lt;br /&gt;
&lt;br /&gt;
		-- sequential images should have padding (so we use or)&lt;br /&gt;
		-- sequential keyvals should NOT have padding (so we use xor, which here is ~=)&lt;br /&gt;
		local should_add_padding = (cur_is_image or next_is_image) or (cur_is_keyval ~= next_is_keyval)&lt;br /&gt;
		if should_add_padding then&lt;br /&gt;
			tbl:tag(&amp;#039;tr&amp;#039;):tag(&amp;#039;td&amp;#039;):addClass(&amp;#039;infobox-padding&amp;#039;):attr(&amp;#039;colspan&amp;#039;, &amp;#039;2&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		i = i + 1&lt;br /&gt;
		cur_row = next_row&lt;br /&gt;
	until cur_row == nil&lt;br /&gt;
	&lt;br /&gt;
	return tbl&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = frame:getParent().args&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>Alex</name></author>
	</entry>
</feed>