

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fa">
	<id>https://fa.imamatpedia.com/w/index.php?action=history&amp;feed=atom&amp;title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86%3AGallery</id>
	<title>پودمان:Gallery - تاریخچهٔ نسخه‌ها</title>
	<link rel="self" type="application/atom+xml" href="https://fa.imamatpedia.com/w/index.php?action=history&amp;feed=atom&amp;title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86%3AGallery"/>
	<link rel="alternate" type="text/html" href="https://fa.imamatpedia.com/w/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:Gallery&amp;action=history"/>
	<updated>2026-04-20T15:44:23Z</updated>
	<subtitle>تاریخچهٔ نسخه‌ها برای این صفحه در ویکی</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://fa.imamatpedia.com/w/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:Gallery&amp;diff=801019&amp;oldid=prev</id>
		<title>Heydari: ۱ نسخه واردشده</title>
		<link rel="alternate" type="text/html" href="https://fa.imamatpedia.com/w/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:Gallery&amp;diff=801019&amp;oldid=prev"/>
		<updated>2021-12-30T11:29:04Z</updated>

		<summary type="html">&lt;p&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;fa&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;→ نسخهٔ قدیمی‌تر&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;نسخهٔ ‏۳۰ دسامبر ۲۰۲۱، ساعت ۱۴:۵۹&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;fa&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(بدون تفاوت)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Heydari</name></author>
	</entry>
	<entry>
		<id>https://fa.imamatpedia.com/w/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:Gallery&amp;diff=801018&amp;oldid=prev</id>
		<title>fa&gt;Izno: use if preview, move to module version (someone bug me about hist merging the template namespace templatestyles page</title>
		<link rel="alternate" type="text/html" href="https://fa.imamatpedia.com/w/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:Gallery&amp;diff=801018&amp;oldid=prev"/>
		<updated>2021-05-06T21:37:29Z</updated>

		<summary type="html">&lt;p&gt;use if preview, move to module version (someone bug me about hist merging the template namespace templatestyles page&lt;/p&gt;
&lt;a href=&quot;//fa.imamatpedia.com/w/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:Gallery&amp;amp;diff=801018&amp;amp;oldid=1059&quot;&gt;نمایش تغییرات&lt;/a&gt;</summary>
		<author><name>fa&gt;Izno</name></author>
	</entry>
	<entry>
		<id>https://fa.imamatpedia.com/w/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:Gallery&amp;diff=1059&amp;oldid=prev</id>
		<title>Admin: ۱ نسخه واردشده</title>
		<link rel="alternate" type="text/html" href="https://fa.imamatpedia.com/w/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:Gallery&amp;diff=1059&amp;oldid=prev"/>
		<updated>2016-01-25T11:25:35Z</updated>

		<summary type="html">&lt;p&gt;۱ نسخه واردشده&lt;/p&gt;
&lt;p&gt;&lt;b&gt;صفحهٔ تازه&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module implements {{gallery}}&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function trim(s)&lt;br /&gt;
	return (mw.ustring.gsub(s, &amp;quot;^%s*(.-)%s*$&amp;quot;, &amp;quot;%1&amp;quot;))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.gallery(frame)&lt;br /&gt;
	local origArgs&lt;br /&gt;
	-- If called via #invoke, use the args passed into the invoking template.&lt;br /&gt;
	-- Otherwise, for testing purposes, assume args are being passed directly in.&lt;br /&gt;
	if type(frame.getParent) == &amp;#039;function&amp;#039; then&lt;br /&gt;
		origArgs = frame:getParent().args&lt;br /&gt;
	else&lt;br /&gt;
		origArgs = frame&lt;br /&gt;
	end&lt;br /&gt;
    &lt;br /&gt;
    -- ParserFunctions considers the empty string to be false, so to preserve the previous &lt;br /&gt;
    -- behavior of {{gallery}}, change any empty arguments to nil, so Lua will consider&lt;br /&gt;
    -- them false too.&lt;br /&gt;
    local args = {}&lt;br /&gt;
    for k, v in pairs(origArgs) do&lt;br /&gt;
    	if v ~= &amp;#039;&amp;#039; then&lt;br /&gt;
    		args[k] = v&lt;br /&gt;
    	end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local tbl = mw.html.create(&amp;#039;table&amp;#039;)&lt;br /&gt;
    &lt;br /&gt;
	if args.state then&lt;br /&gt;
		tbl&lt;br /&gt;
			:css(&amp;#039;width&amp;#039;, &amp;#039;100%&amp;#039;)&lt;br /&gt;
			:addClass(&amp;#039;collapsible&amp;#039;)&lt;br /&gt;
			:addClass(args.state)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if args.style then&lt;br /&gt;
		tbl:cssText(args.style)&lt;br /&gt;
	else&lt;br /&gt;
		tbl&lt;br /&gt;
			:css(&amp;#039;background&amp;#039;, &amp;#039;transparent&amp;#039;)&lt;br /&gt;
			:css(&amp;#039;margin-top&amp;#039;, &amp;#039;0.5em&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if args.align then&lt;br /&gt;
		tbl:attr(&amp;#039;align&amp;#039;, args.align)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if args.title then&lt;br /&gt;
		tbl&lt;br /&gt;
			:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
				:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
					:css(&amp;#039;text-align&amp;#039;, &amp;#039;center&amp;#039;)&lt;br /&gt;
					:css(&amp;#039;font-weight&amp;#039;, &amp;#039;bold&amp;#039;)&lt;br /&gt;
					:wikitext(args.title)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local mainCell = tbl:tag(&amp;#039;tr&amp;#039;):tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	local imageCount = math.ceil(#args / 2)&lt;br /&gt;
	local cellWidth = tonumber(args.cellwidth) or tonumber(args.width) or 180&lt;br /&gt;
	local imgHeight = tonumber(args.height) or 180&lt;br /&gt;
	local lines = tonumber(args.lines) or 2&lt;br /&gt;
	local captionstyle = args.captionstyle&lt;br /&gt;
	&lt;br /&gt;
    for i = 1, imageCount do&lt;br /&gt;
		local img = trim(args[i*2 - 1] or &amp;#039;&amp;#039;)&lt;br /&gt;
		local caption = trim(args[i*2] or &amp;#039;&amp;#039;)&lt;br /&gt;
		local imgWidth = tonumber(args[&amp;#039;width&amp;#039; .. i]) or tonumber(args.width) or 180&lt;br /&gt;
		local alt = args[&amp;#039;alt&amp;#039; .. i] or &amp;#039;&amp;#039;&lt;br /&gt;
		&lt;br /&gt;
		local textWidth&lt;br /&gt;
		if cellWidth &amp;lt; 30 then&lt;br /&gt;
			textWidth = imgHeight + 27&lt;br /&gt;
		else&lt;br /&gt;
			textWidth = cellWidth + 7&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if img ~= &amp;#039;&amp;#039; then&lt;br /&gt;
			local imgTbl = mainCell:tag(&amp;#039;table&amp;#039;)&lt;br /&gt;
            &lt;br /&gt;
			imgTbl&lt;br /&gt;
				:css(&amp;#039;width&amp;#039;, (cellWidth + 20) .. &amp;#039;px&amp;#039;)&lt;br /&gt;
				:css(&amp;#039;float&amp;#039;, &amp;#039;right&amp;#039;)&lt;br /&gt;
				:css(&amp;#039;border-collapse&amp;#039;, &amp;#039;collapse&amp;#039;)&lt;br /&gt;
				:css(&amp;#039;margin&amp;#039;, &amp;#039;3px&amp;#039;)&lt;br /&gt;
				:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
					:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
						:css(&amp;#039;height&amp;#039;, (imgHeight + 20) .. &amp;#039;px&amp;#039;)&lt;br /&gt;
						:css(&amp;#039;border&amp;#039;, &amp;#039;1px solid #CCCCCC&amp;#039;)&lt;br /&gt;
						:css(&amp;#039;background-color&amp;#039;, &amp;#039;#F8F8F8&amp;#039;)&lt;br /&gt;
						:css(&amp;#039;padding&amp;#039;, &amp;#039;0px&amp;#039;)&lt;br /&gt;
						:css(&amp;#039;text-align&amp;#039;, &amp;#039;center&amp;#039;)&lt;br /&gt;
						:wikitext(string.format(&amp;#039;[[%s|center|border|%dx%dpx|alt=%s|%s]]&amp;#039;, img, imgWidth, imgHeight, alt, caption))&lt;br /&gt;
						:done()&lt;br /&gt;
					:done()&lt;br /&gt;
				:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
					:css(&amp;#039;vertical-align&amp;#039;, &amp;#039;top&amp;#039;)&lt;br /&gt;
					:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
						:css(&amp;#039;display&amp;#039;, &amp;#039;block&amp;#039;)&lt;br /&gt;
						:css(&amp;#039;font-size&amp;#039;, &amp;#039;1em&amp;#039;)&lt;br /&gt;
						:css(&amp;#039;height&amp;#039;, (0.2 + 1.5*lines) .. &amp;#039;em&amp;#039;)&lt;br /&gt;
						:css(&amp;#039;padding&amp;#039;, &amp;#039;0px&amp;#039;)&lt;br /&gt;
						:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
							:addClass(&amp;#039;gallerytext&amp;#039;)&lt;br /&gt;
							:css(&amp;#039;height&amp;#039;, (0.1 + 1.5*lines) .. &amp;#039;em&amp;#039;)&lt;br /&gt;
							:css(&amp;#039;width&amp;#039;, textWidth .. &amp;#039;px&amp;#039;)&lt;br /&gt;
							:css(&amp;#039;line-height&amp;#039;, &amp;#039;1.3em&amp;#039;)&lt;br /&gt;
							:css(&amp;#039;padding&amp;#039;, &amp;#039;2px 6px 1px 6px&amp;#039;)&lt;br /&gt;
							:css(&amp;#039;overflow-y&amp;#039;, &amp;#039;auto&amp;#039;)&lt;br /&gt;
							:css(&amp;#039;margin&amp;#039;, &amp;#039;0px&amp;#039;)&lt;br /&gt;
							:css(&amp;#039;border&amp;#039;, &amp;#039;none&amp;#039;)&lt;br /&gt;
							:css(&amp;#039;border-width&amp;#039;, &amp;#039;0px&amp;#039;)&lt;br /&gt;
							:cssText(captionstyle)&lt;br /&gt;
							:wikitext(caption .. &amp;#039;&amp;amp;nbsp;&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
    &lt;br /&gt;
	if args.footer then&lt;br /&gt;
		tbl&lt;br /&gt;
			:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
				:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
					:css(&amp;#039;text-align&amp;#039;, &amp;#039;left&amp;#039;)&lt;br /&gt;
					:css(&amp;#039;font-size&amp;#039;, &amp;#039;80%&amp;#039;)&lt;br /&gt;
					:css(&amp;#039;line-height&amp;#039;, &amp;#039;1em&amp;#039;)&lt;br /&gt;
					:wikitext(args.footer)&lt;br /&gt;
	end&lt;br /&gt;
	if args.perrow then&lt;br /&gt;
		tbl:css(&amp;#039;width&amp;#039;, 8 + (cellWidth + 20 + 6)*tonumber(args.perrow) .. &amp;#039;px&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return tostring(tbl)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>