<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://chaldeanwiki.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AImage_array</id>
		<title>Module:Image array - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://chaldeanwiki.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AImage_array"/>
		<link rel="alternate" type="text/html" href="https://chaldeanwiki.com/index.php?title=Module:Image_array&amp;action=history"/>
		<updated>2026-05-01T07:22:13Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.0</generator>

	<entry>
		<id>https://chaldeanwiki.com/index.php?title=Module:Image_array&amp;diff=570&amp;oldid=prev</id>
		<title>Ian: 1 revision imported: Assyrian people</title>
		<link rel="alternate" type="text/html" href="https://chaldeanwiki.com/index.php?title=Module:Image_array&amp;diff=570&amp;oldid=prev"/>
				<updated>2015-03-30T21:24:37Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision imported: Assyrian people&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:24, 30 March 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;'&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>Ian</name></author>	</entry>

	<entry>
		<id>https://chaldeanwiki.com/index.php?title=Module:Image_array&amp;diff=569&amp;oldid=prev</id>
		<title>Frietjes at 20:13, 22 April 2014</title>
		<link rel="alternate" type="text/html" href="https://chaldeanwiki.com/index.php?title=Module:Image_array&amp;diff=569&amp;oldid=prev"/>
				<updated>2014-04-22T20:13:57Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- implements [[template:image array]]&lt;br /&gt;
&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 renderArrayCell( img, c, a, l, tc, t, w, h)&lt;br /&gt;
	local alt, link, text, border = '', '', t, ''&lt;br /&gt;
&lt;br /&gt;
	if( isnotempty(a) ) then alt = 'alt=' .. a end&lt;br /&gt;
	if( isnotempty(l) ) then link = 'link=' .. l end&lt;br /&gt;
	if( isnotempty(tc) and not isnotempty(t)) then text = c	end&lt;br /&gt;
		&lt;br /&gt;
	local cell = mw.html.create('')&lt;br /&gt;
	if( img ) then&lt;br /&gt;
		cell:tag('div')&lt;br /&gt;
			:css('vertical-align', 'middle')&lt;br /&gt;
			:css('width', w .. 'px')&lt;br /&gt;
			:css('height', h .. 'px')&lt;br /&gt;
			:css('margin-left', 'auto')&lt;br /&gt;
			:css('margin-right', 'auto')&lt;br /&gt;
			:wikitext(mw.ustring.format('[[File:%s|%dx%dpx|%s|%s|%s]]', img, w, h, alt, link, text))&lt;br /&gt;
		cell:tag('div')&lt;br /&gt;
			:css('vertical-align', 'middle')&lt;br /&gt;
			:css('padding', '1px')&lt;br /&gt;
			:wikitext(c)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return tostring(cell)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function imagearray( frame )&lt;br /&gt;
	local args = frame:getParent().args&lt;br /&gt;
	local width = tonumber(args['width'] or '60')&lt;br /&gt;
	local height = tonumber(args['height'] or '70')&lt;br /&gt;
	local perrow = tonumber(args['perrow'] or '4')&lt;br /&gt;
	local bw = tonumber(args['border-width'] or '0')&lt;br /&gt;
	local fs = args['font-size'] or '88%'&lt;br /&gt;
	local text = args['text'] or ''&lt;br /&gt;
	local border = ( bw &amp;gt; 0 ) and tostring(bw) .. 'px #aaa solid' or nil&lt;br /&gt;
&lt;br /&gt;
	-- find all the nonempty image numbers&lt;br /&gt;
	local imagenums = {}&lt;br /&gt;
	local imagecount = 0&lt;br /&gt;
	for k, v in pairs( args ) do&lt;br /&gt;
		local i = tonumber(tostring(k):match( '^%s*image([%d]+)%s*$' ) or '0')&lt;br /&gt;
		if( i &amp;gt; 0 and isnotempty(v) ) then&lt;br /&gt;
			table.insert( imagenums, i )&lt;br /&gt;
			imagecount = imagecount + 1&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- sort the image numbers&lt;br /&gt;
	table.sort(imagenums)&lt;br /&gt;
	&lt;br /&gt;
	-- compute the number of rows&lt;br /&gt;
	local rowcount = math.ceil(imagecount / perrow)&lt;br /&gt;
&lt;br /&gt;
	-- start table&lt;br /&gt;
	root = mw.html.create('table')&lt;br /&gt;
	root&lt;br /&gt;
		:css('border-collapse','collapse')&lt;br /&gt;
		:css('text-align','center')&lt;br /&gt;
		:css('font-size', fs)&lt;br /&gt;
		:css('line-height','1.25em')&lt;br /&gt;
		:css('margin','auto')&lt;br /&gt;
		:css('width', tostring(width*perrow) .. 'px')&lt;br /&gt;
&lt;br /&gt;
	-- loop over the images&lt;br /&gt;
	for j = 1, rowcount do&lt;br /&gt;
		local row = root:tag('tr')&lt;br /&gt;
		row:css('vertical-align', 'top')&lt;br /&gt;
		for k = 1, perrow do&lt;br /&gt;
			i = imagenums[(j-1)*perrow + k] or 0&lt;br /&gt;
			row:tag('td')&lt;br /&gt;
				:css('width', width .. 'px')&lt;br /&gt;
				:css(border and 'border' or '', border or '')&lt;br /&gt;
				:wikitext(renderArrayCell( &lt;br /&gt;
					args['image' .. i], args['caption' .. i] or '', args['alt' .. i] or '', &lt;br /&gt;
					args['link' .. i] or '', args['text'] or '', args['text' .. i] or '', &lt;br /&gt;
					width, height))&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
    &lt;br /&gt;
	-- end table&lt;br /&gt;
    return tostring(root)&lt;br /&gt;
end&lt;br /&gt;
function p.array( frame )&lt;br /&gt;
    return imagearray( frame )&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Frietjes</name></author>	</entry>

	</feed>