<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://dogcraft.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ACollage</id>
	<title>Module:Collage - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://dogcraft.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ACollage"/>
	<link rel="alternate" type="text/html" href="https://dogcraft.net/wiki/index.php?title=Module:Collage&amp;action=history"/>
	<updated>2026-04-22T21:24:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://dogcraft.net/wiki/index.php?title=Module:Collage&amp;diff=28358&amp;oldid=prev</id>
		<title>William: change defaults</title>
		<link rel="alternate" type="text/html" href="https://dogcraft.net/wiki/index.php?title=Module:Collage&amp;diff=28358&amp;oldid=prev"/>
		<updated>2022-12-20T12:22:30Z</updated>

		<summary type="html">&lt;p&gt;change defaults&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&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;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:22, 20 December 2022&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-l9&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;	local tracking = ''&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;	local tracking = ''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;	local args = frame:getParent().args&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;	local args = frame:getParent().args&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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;	local size = tonumber(args['size'] or '&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;200&lt;/del&gt;') or &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;200&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;	local size = tonumber(args['size'] or '&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;306&lt;/ins&gt;') or &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;306&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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;	local border = tonumber(args['border'] or '&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/del&gt;') or &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;	local border = tonumber(args['border'] or '&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0&lt;/ins&gt;') or &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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;	local spacing = tonumber(args['spacing'] or '&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/del&gt;') or &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;	local spacing = tonumber(args['spacing'] or '&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2&lt;/ins&gt;') or &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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;	local color = args['color'] or '&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;black&lt;/del&gt;'&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;	local color = args['color'] or '&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;transparent&lt;/ins&gt;'&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;	local color_border = args['color_border'] or 'black'&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;	local color_border = args['color_border'] or 'black'&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;	local position = (args['position'] or ''):lower()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;	local position = (args['position'] or ''):lower()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>William</name></author>
	</entry>
	<entry>
		<id>https://dogcraft.net/wiki/index.php?title=Module:Collage&amp;diff=28340&amp;oldid=prev</id>
		<title>William: Created page with &quot;-- implements Template:Collage local p = {}   local function isnotempty(s) 	return s and s:match( '^%s*(.-)%s*$' ) ~= '' end  local function photomontage( frame ) 	local t...&quot;</title>
		<link rel="alternate" type="text/html" href="https://dogcraft.net/wiki/index.php?title=Module:Collage&amp;diff=28340&amp;oldid=prev"/>
		<updated>2022-12-20T11:51:34Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- implements &lt;a href=&quot;/wiki/Template:Collage&quot; title=&quot;Template:Collage&quot;&gt;Template:Collage&lt;/a&gt; local p = {}   local function isnotempty(s) 	return s and s:match( &amp;#039;^%s*(.-)%s*$&amp;#039; ) ~= &amp;#039;&amp;#039; end  local function photomontage( frame ) 	local t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- implements [[Template:Collage]]&lt;br /&gt;
local p = {}&lt;br /&gt;
 &lt;br /&gt;
local function isnotempty(s)&lt;br /&gt;
	return s and s:match( '^%s*(.-)%s*$' ) ~= ''&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function photomontage( frame )&lt;br /&gt;
	local tracking = ''&lt;br /&gt;
	local args = frame:getParent().args&lt;br /&gt;
	local size = tonumber(args['size'] or '200') or 200&lt;br /&gt;
	local border = tonumber(args['border'] or '1') or 1&lt;br /&gt;
	local spacing = tonumber(args['spacing'] or '1') or 1&lt;br /&gt;
	local color = args['color'] or 'black'&lt;br /&gt;
	local color_border = args['color_border'] or 'black'&lt;br /&gt;
	local position = (args['position'] or ''):lower()&lt;br /&gt;
	local caption = args['text'] or ''&lt;br /&gt;
	local text_background = isnotempty(args['text_background']) and args['text_background'] or '#F8F8FF'&lt;br /&gt;
	local foot_montage = args['foot_montage'] or ''&lt;br /&gt;
	local lastnum = nil&lt;br /&gt;
	local rownum = nil&lt;br /&gt;
	local floatstyle = nil&lt;br /&gt;
	if( position == 'left' or position == 'right' or position == 'none') then&lt;br /&gt;
		floatstyle = 'float:' .. position&lt;br /&gt;
		tracking = tracking .. '[[Category:Pages using photo montage without center alignment|' .. position .. ']]'&lt;br /&gt;
	else&lt;br /&gt;
		floatstyle = 'margin-left: auto; margin-right: auto;'&lt;br /&gt;
	end&lt;br /&gt;
	if isnotempty(foot_montage) then&lt;br /&gt;
		local div = mw.html.create('div')&lt;br /&gt;
		div:css('font-size', '95%')&lt;br /&gt;
			:wikitext(foot_montage)&lt;br /&gt;
		foot_montage = '\n' .. tostring(div)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local lettertonumber = { &lt;br /&gt;
		a = '01', b = '02',	c = '03', d = '04',	e = '05', f = '06',	g = '07',&lt;br /&gt;
		h = '08', i = '09',	j = '10', k = '11',	l = '12', m = '13',	n = '14',&lt;br /&gt;
		o = '15', p = '16',	q = '17', r = '18', s = '19', t = '20', u = '21',&lt;br /&gt;
		v = '22', w = '23', x = '26', y = '27', z = '28' }&lt;br /&gt;
	local letters = {&lt;br /&gt;
		'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',&lt;br /&gt;
		'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
	-- find all the nonempty photo numbers&lt;br /&gt;
	local photos = {}&lt;br /&gt;
	local photocount = 0&lt;br /&gt;
	for k, v in pairs( args ) do&lt;br /&gt;
		local i = tonumber(tostring(k):match( '^%s*photo([%d]+)[a-z]%s*$' ) or '0')&lt;br /&gt;
		if( i &amp;gt; 0 and isnotempty(v) ) then&lt;br /&gt;
			local c = lettertonumber[tostring(k):match( '^%s*photo[%d]+([a-z])%s*$' )]&lt;br /&gt;
			table.insert( photos, tonumber(i .. '.' .. c ) )&lt;br /&gt;
			photocount = photocount + 1&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- sort the photo numbers&lt;br /&gt;
	table.sort(photos)&lt;br /&gt;
	&lt;br /&gt;
	-- compute the number of the photos in each row&lt;br /&gt;
	local count = {}&lt;br /&gt;
	lastnum = -1&lt;br /&gt;
	rownum = 0&lt;br /&gt;
	for k=1,photocount do&lt;br /&gt;
		local num = math.floor(photos[k])&lt;br /&gt;
		if(num == lastnum) then&lt;br /&gt;
			count[rownum] = count[rownum] + 1&lt;br /&gt;
		else&lt;br /&gt;
			rownum = rownum + 1&lt;br /&gt;
			count[rownum] = 1&lt;br /&gt;
		end&lt;br /&gt;
		lastnum = num&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if(photocount &amp;gt; 0) then&lt;br /&gt;
	-- start table&lt;br /&gt;
	root = mw.html.create('div')&lt;br /&gt;
	root&lt;br /&gt;
		:css('background-color', color)&lt;br /&gt;
		:css('border-collapse', 'collapse')&lt;br /&gt;
		:css('border', border .. 'px solid ' .. color_border)&lt;br /&gt;
		:css('width', size .. 'px')&lt;br /&gt;
		:css('display', 'table')&lt;br /&gt;
		:cssText(floatstyle)&lt;br /&gt;
	local innercell = root&lt;br /&gt;
		:tag('div'):css('display', 'table-row')&lt;br /&gt;
			:tag('div'):css('display', 'table-cell')&lt;br /&gt;
				:css('border-top', 0)&lt;br /&gt;
				:css('padding', spacing .. 'px 0 0 ' .. spacing .. 'px')&lt;br /&gt;
 &lt;br /&gt;
	-- loop over the photos&lt;br /&gt;
	lastnum = -1&lt;br /&gt;
	rownum = 0&lt;br /&gt;
	local row&lt;br /&gt;
	for k=1,photocount do&lt;br /&gt;
		local num = math.floor(photos[k])&lt;br /&gt;
		local c = letters[math.floor(0.5 + 100*(photos[k] - num))]&lt;br /&gt;
		if(num ~= lastnum) then&lt;br /&gt;
			rownum = rownum + 1&lt;br /&gt;
			row = innercell&lt;br /&gt;
				:tag('div'):css('display', 'table')&lt;br /&gt;
					:css('background-color', color)&lt;br /&gt;
					:css('border-collapse', 'collapse')&lt;br /&gt;
						:tag('div'):css('display', 'table-row')&lt;br /&gt;
		end&lt;br /&gt;
		local altstr = (args['alt' .. num .. c] or '') ~= '' and&lt;br /&gt;
			'|alt=' .. args['alt' .. num .. c] or ''&lt;br /&gt;
		local image = string.format( '[[File:%s%s|%dpx]]',&lt;br /&gt;
			args['photo' .. num .. c], altstr,&lt;br /&gt;
			(size - spacing*(count[rownum] - 1))/count[rownum] )&lt;br /&gt;
		row&lt;br /&gt;
			:tag('div'):css('display', 'table-cell')&lt;br /&gt;
				:css('border-top', 0)&lt;br /&gt;
				:css('padding', '0 ' .. spacing .. 'px ' .. spacing .. 'px ' .. '0')&lt;br /&gt;
				:wikitext(image)&lt;br /&gt;
		lastnum = num&lt;br /&gt;
	end&lt;br /&gt;
	if isnotempty(caption) then&lt;br /&gt;
		root&lt;br /&gt;
			:tag('div'):css('display', 'table-row')&lt;br /&gt;
				:tag('div'):css('display', 'table-cell')&lt;br /&gt;
					:addClass('thumbcaption')&lt;br /&gt;
					:css('background-color', text_background)&lt;br /&gt;
					:css('font-size', '95%')&lt;br /&gt;
					:wikitext(caption)&lt;br /&gt;
	end&lt;br /&gt;
	-- end table&lt;br /&gt;
	end&lt;br /&gt;
	if photocount &amp;lt; 2 then&lt;br /&gt;
		tracking = tracking .. '[[Category:Pages using photo montage with one or fewer images|' .. photocount ..']]'&lt;br /&gt;
	end&lt;br /&gt;
    return tostring(root or '') .. foot_montage .. tracking&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.collage( frame )&lt;br /&gt;
    return photomontage( frame )&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>William</name></author>
	</entry>
</feed>