<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://www.vigyanwiki.in/index.php?action=history&amp;feed=atom&amp;title=Module%3AWide_image</id>
	<title>Module:Wide image - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.vigyanwiki.in/index.php?action=history&amp;feed=atom&amp;title=Module%3AWide_image"/>
	<link rel="alternate" type="text/html" href="https://www.vigyanwiki.in/index.php?title=Module:Wide_image&amp;action=history"/>
	<updated>2026-04-27T12:52:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://www.vigyanwiki.in/index.php?title=Module:Wide_image&amp;diff=46663&amp;oldid=prev</id>
		<title>Indicwiki: 1 revision imported from :alpha:Module:Wide_image</title>
		<link rel="alternate" type="text/html" href="https://www.vigyanwiki.in/index.php?title=Module:Wide_image&amp;diff=46663&amp;oldid=prev"/>
		<updated>2022-12-15T08:20:05Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported from &lt;a href=&quot;https://alpha.indicwiki.in/index.php?title=Module:Wide_image&quot; class=&quot;extiw&quot; title=&quot;alpha:Module:Wide image&quot;&gt;alpha:Module:Wide_image&lt;/a&gt;&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-GB&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 13:50, 15 December 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&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>Indicwiki</name></author>
	</entry>
	<entry>
		<id>https://www.vigyanwiki.in/index.php?title=Module:Wide_image&amp;diff=46662&amp;oldid=prev</id>
		<title>alpha&gt;Sarika: Created page with &quot;-- This module implements template:wide image and template:panorama local p = {}  local function getfilename(s) 	s = mw.ustring.gsub(s or '', '^%s*[Ff][Ii][Ll][Ee]%s*:...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.vigyanwiki.in/index.php?title=Module:Wide_image&amp;diff=46662&amp;oldid=prev"/>
		<updated>2022-05-20T11:35:52Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- This module implements &lt;a href=&quot;/wiki/Template:Wide_image&quot; title=&quot;Template:Wide image&quot;&gt;template:wide image&lt;/a&gt; and &lt;a href=&quot;/wiki/Template:Panorama&quot; title=&quot;Template:Panorama&quot;&gt;template:panorama&lt;/a&gt; local p = {}  local function getfilename(s) 	s = mw.ustring.gsub(s or &amp;#039;&amp;#039;, &amp;#039;^%s*[Ff][Ii][Ll][Ee]%s*:...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module implements [[template:wide image]] and [[template:panorama]]&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function getfilename(s)&lt;br /&gt;
	s = mw.ustring.gsub(s or '', '^%s*[Ff][Ii][Ll][Ee]%s*:%s*', '')&lt;br /&gt;
	s = mw.ustring.gsub(s or '', '^%s*[Ii][Mm][Aa][Gg][Ee]%s*:%s*', '')&lt;br /&gt;
	return s&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getwidth(s, w, h)&lt;br /&gt;
	w = mw.ustring.gsub(w or '0', '^%s*(%d+)%s*[Pp][Xx]*%s*$', '%1')&lt;br /&gt;
	h = mw.ustring.gsub(h or '0', '^%s*(%d+)%s*[Pp][Xx]*%s*$', '%1')&lt;br /&gt;
	w = tonumber(w) or 0&lt;br /&gt;
	h = tonumber(h) or 0&lt;br /&gt;
	if w &amp;gt; 0 then&lt;br /&gt;
		return w&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local file = s and mw.title.new('File:' .. mw.uri.decode(mw.ustring.gsub(s,'%|.*$',''), 'WIKI'))&lt;br /&gt;
	file = file and file.file or {width = 0, height = 0}&lt;br /&gt;
&lt;br /&gt;
	if h &amp;gt; 0 then&lt;br /&gt;
		w = math.floor(h * (tonumber(file.width) or 0)/(tonumber(file.height) or 1) + 0.5)&lt;br /&gt;
		if w &amp;gt; 0 then&lt;br /&gt;
			return w&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	w = tonumber(file.width) or 0&lt;br /&gt;
	return w&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getimage(s, w, a, c, rtl)&lt;br /&gt;
	if c == 'thumb' or c == 'thumbnail' or c == 'frame' or c == 'border' then&lt;br /&gt;
		c = s&lt;br /&gt;
	elseif rtl and c ~= '' then&lt;br /&gt;
		c = '&amp;amp;#x202A;' .. c .. '&amp;amp;#x202C;'&lt;br /&gt;
	end&lt;br /&gt;
	return '[[File:' .. (s or '') .. '|' .. (w or '') .. '|alt=' .. (a or '') &lt;br /&gt;
		.. '|' .. mw.text.unstrip(c or '') .. ']]'&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getcontainers(noborder, float, width, maxwidth)&lt;br /&gt;
	local r = mw.html.create('div')&lt;br /&gt;
	if noborder then&lt;br /&gt;
		if float == 'left' then&lt;br /&gt;
			r:addClass('floatleft')&lt;br /&gt;
		elseif float == 'right' then&lt;br /&gt;
			r:addClass('floatright')&lt;br /&gt;
		elseif float == 'none' then&lt;br /&gt;
			r:addClass('floatnone')&lt;br /&gt;
		else -- center is default&lt;br /&gt;
			r:addClass('floatnone')&lt;br /&gt;
			r:css('margin-left', 'auto')&lt;br /&gt;
			r:css('margin-right', 'auto')&lt;br /&gt;
			r:css('overflow', 'hidden')&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		r:addClass('thumb')&lt;br /&gt;
		if float == 'left' then&lt;br /&gt;
			r:addClass('tleft')&lt;br /&gt;
		elseif float == 'right' then&lt;br /&gt;
			r:addClass('tright')&lt;br /&gt;
		elseif float == 'none' then&lt;br /&gt;
			r:addClass('tnone')&lt;br /&gt;
		else -- center is default&lt;br /&gt;
			r:addClass('tnone')&lt;br /&gt;
			r:css('margin-left', 'auto')&lt;br /&gt;
			r:css('margin-right', 'auto')&lt;br /&gt;
			r:css('overflow', 'hidden')&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	r:css('width', width)&lt;br /&gt;
	r:css('max-width', maxwidth)&lt;br /&gt;
	local d = noborder and r or r:tag('div'):addClass('thumbinner')&lt;br /&gt;
	&lt;br /&gt;
	return r,d&lt;br /&gt;
end&lt;br /&gt;
	&lt;br /&gt;
function wideimage(image, width, height, caption, boxwidth, float, alt, border, capalign, dir)&lt;br /&gt;
	if image then&lt;br /&gt;
		image = getfilename(image)&lt;br /&gt;
		local iwidth = getwidth(image, width or '0', height or '0')&lt;br /&gt;
		if width == nil then&lt;br /&gt;
			width = iwidth .. 'px'&lt;br /&gt;
		end&lt;br /&gt;
		local rtl = dir and dir == 'rtl' or nil&lt;br /&gt;
		local noborder = border and border == 'no' or nil&lt;br /&gt;
		&lt;br /&gt;
		local maxwidth = noborder and (iwidth .. 'px') or ((iwidth + 8) .. 'px')&lt;br /&gt;
		&lt;br /&gt;
		local r,d = getcontainers(noborder, float or '', boxwidth or 'auto', maxwidth)&lt;br /&gt;
		&lt;br /&gt;
		if tonumber(width) then&lt;br /&gt;
			width = width .. 'px'&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		d:tag('div')&lt;br /&gt;
			:addClass('noresize')&lt;br /&gt;
			:css('overflow', 'auto')&lt;br /&gt;
			:css('direction', rtl and 'rtl' or nil)&lt;br /&gt;
			:wikitext(getimage(image,width,alt,caption or '',rtl))&lt;br /&gt;
		if caption then&lt;br /&gt;
			d = d:tag('div')&lt;br /&gt;
					:addClass('thumbcaption')&lt;br /&gt;
					:css('text-align', capalign)&lt;br /&gt;
			if noborder == nil then&lt;br /&gt;
				d:tag('div')&lt;br /&gt;
					:addClass('magnify')&lt;br /&gt;
					:wikitext('[[:File:' .. image .. '| ]]')&lt;br /&gt;
			end&lt;br /&gt;
			d:wikitext(caption)&lt;br /&gt;
		end&lt;br /&gt;
		return tostring(r)&lt;br /&gt;
	end&lt;br /&gt;
	return ''&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	return wideimage(&lt;br /&gt;
			args['image'] or args[1], args[2] or nil, -- width&lt;br /&gt;
			args['height'] or nil, args['caption'] or args[3], &lt;br /&gt;
			args['width'] or args[4], args['align'] or args[5], &lt;br /&gt;
			args['alt'], args['border'], args['align-cap'], args['dir']&lt;br /&gt;
			)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>alpha&gt;Sarika</name></author>
	</entry>
</feed>