<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cobblemon.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox</id>
	<title>Module:Infobox - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cobblemon.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox"/>
	<link rel="alternate" type="text/html" href="https://wiki.cobblemon.com/index.php?title=Module:Infobox&amp;action=history"/>
	<updated>2026-04-17T16:09:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://wiki.cobblemon.com/index.php?title=Module:Infobox&amp;diff=5435&amp;oldid=prev</id>
		<title>Blob: Created page with &quot;local p = {} function p.infobox( f ) 	local args = require( &#039;Module:ProcessArgs&#039; ).merge( true ) 	local titleObject = mw.title.getCurrentTitle() 	local title = args.title or titleObject.baseText 	 	local imageArea = args.imagearea 	if not imageArea and imageArea ~= &#039;none&#039; then 		local images = {} 		local defaultImageSize = args.defaultimagesize or &#039;160px&#039; 		args.image1 = args.image1 or args.image or &#039;title&#039; 		args.image1size = args.image1size or args.imagesize 		 		local...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.cobblemon.com/index.php?title=Module:Infobox&amp;diff=5435&amp;oldid=prev"/>
		<updated>2025-01-07T10:27:31Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {} function p.infobox( f ) 	local args = require( &amp;#039;Module:ProcessArgs&amp;#039; ).merge( true ) 	local titleObject = mw.title.getCurrentTitle() 	local title = args.title or titleObject.baseText 	 	local imageArea = args.imagearea 	if not imageArea and imageArea ~= &amp;#039;none&amp;#039; then 		local images = {} 		local defaultImageSize = args.defaultimagesize or &amp;#039;160px&amp;#039; 		args.image1 = args.image1 or args.image or &amp;#039;title&amp;#039; 		args.image1size = args.image1size or args.imagesize 		 		local...&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;
function p.infobox( f )&lt;br /&gt;
	local args = require( &amp;#039;Module:ProcessArgs&amp;#039; ).merge( true )&lt;br /&gt;
	local titleObject = mw.title.getCurrentTitle()&lt;br /&gt;
	local title = args.title or titleObject.baseText&lt;br /&gt;
	&lt;br /&gt;
	local imageArea = args.imagearea&lt;br /&gt;
	if not imageArea and imageArea ~= &amp;#039;none&amp;#039; then&lt;br /&gt;
		local images = {}&lt;br /&gt;
		local defaultImageSize = args.defaultimagesize or &amp;#039;160px&amp;#039;&lt;br /&gt;
		args.image1 = args.image1 or args.image or &amp;#039;title&amp;#039;&lt;br /&gt;
		args.image1size = args.image1size or args.imagesize&lt;br /&gt;
		&lt;br /&gt;
		local imgCount = {}&lt;br /&gt;
		for k, v in pairs( args ) do&lt;br /&gt;
			if type( k ) == &amp;#039;string&amp;#039; then&lt;br /&gt;
				local image, num = k:match( &amp;#039;^(image)(%d+)$&amp;#039; )&lt;br /&gt;
				if v:lower() ~= &amp;#039;none&amp;#039; then&lt;br /&gt;
					if image then&lt;br /&gt;
						table.insert( imgCount, tonumber( num ) )&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		table.sort( imgCount )&lt;br /&gt;
		local animate&lt;br /&gt;
		for k, v in ipairs( imgCount ) do&lt;br /&gt;
			local image = args[&amp;#039;image&amp;#039; .. v]&lt;br /&gt;
			local size = args[&amp;#039;image&amp;#039; .. v .. &amp;#039;size&amp;#039;] or defaultImageSize&lt;br /&gt;
			&lt;br /&gt;
			if image == &amp;#039;title&amp;#039; then&lt;br /&gt;
				local imageTitle = mw.title.new( &amp;#039;Media:&amp;#039; .. title .. &amp;#039;.png&amp;#039; )&lt;br /&gt;
				if imageTitle and imageTitle.exists then&lt;br /&gt;
					image = &amp;#039;[[File:&amp;#039; .. title .. &amp;#039;.png|&amp;#039; .. size .. &amp;#039;]]&amp;#039;&lt;br /&gt;
				elseif titleObject.namespace == 0 then&lt;br /&gt;
					image = &amp;#039;[[File:No image.svg|&amp;#039; .. size .. &amp;#039;|link=File:&amp;#039; .. title .. &amp;#039;.png|Upload &amp;#039; .. title .. &amp;#039;.png]]&amp;#039;&lt;br /&gt;
				else&lt;br /&gt;
					image = &amp;#039;[[File:No image.svg|&amp;#039; .. size .. &amp;#039;|link=]]&amp;#039;&lt;br /&gt;
				end&lt;br /&gt;
			elseif image:match( &amp;#039;;&amp;#039; ) then&lt;br /&gt;
				if not animate then&lt;br /&gt;
					animate = require( &amp;#039;Module:Animate&amp;#039; ).animate&lt;br /&gt;
				end&lt;br /&gt;
				image = animate{ image, size }&lt;br /&gt;
			else&lt;br /&gt;
				image = &amp;#039;[[File:&amp;#039; .. image .. &amp;#039;|&amp;#039; .. size .. &amp;#039;]]&amp;#039;&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			table.insert( images, &amp;#039;&amp;lt;div&amp;gt;&amp;#039; .. image .. &amp;#039;&amp;lt;/div&amp;gt;&amp;#039; )&lt;br /&gt;
		end&lt;br /&gt;
		images = table.concat( images, &amp;#039;\n&amp;#039; )&lt;br /&gt;
		&lt;br /&gt;
		if images ~= &amp;#039;&amp;#039; then&lt;br /&gt;
			imageArea = images .. &amp;#039;\n&amp;#039;&lt;br /&gt;
		else&lt;br /&gt;
			imageArea = &amp;#039;none&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if imageArea and imageArea ~= &amp;#039;none&amp;#039; then&lt;br /&gt;
		imageArea = &amp;#039;&amp;lt;div class=&amp;quot;infobox-imagearea&amp;quot;&amp;gt;&amp;#039; .. imageArea .. &amp;#039;&amp;lt;/div&amp;gt;&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		imageArea = &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local footer = args.footer&lt;br /&gt;
	if footer then&lt;br /&gt;
		footer = &amp;#039;| class=&amp;quot;infobox-footer&amp;quot; colspan=&amp;quot;2&amp;quot; | &amp;#039; .. footer&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local gameversion = args.gameversion&lt;br /&gt;
	if gameversion then&lt;br /&gt;
        local frame = mw.getCurrentFrame()&lt;br /&gt;
        frame:callParserFunction{ name = &amp;#039;#cargo_store&amp;#039;, args = { &amp;#039;&amp;#039;,&lt;br /&gt;
            _table = &amp;#039;VersHistInfobox&amp;#039;, Version = gameversion&lt;br /&gt;
        } }&lt;br /&gt;
		gameversion = &amp;#039;| class=&amp;quot;infobox-gameversion-postfooter&amp;quot; colspan=&amp;quot;2&amp;quot; | &amp;lt;div class=&amp;quot;qud-infobox-version&amp;quot;&amp;gt;Infobox data from game version &amp;lt;span class=&amp;quot;qud-version-num&amp;quot;&amp;gt;&amp;#039; .. gameversion .. &amp;#039;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;#039;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
        local infoboxStartDiv = &amp;#039;&amp;lt;div class=&amp;quot;moduleinfobox&amp;#039;&lt;br /&gt;
        local class = args.class&lt;br /&gt;
        if class then&lt;br /&gt;
                infoboxStartDiv = infoboxStartDiv .. &amp;#039; &amp;#039; .. class&lt;br /&gt;
        end&lt;br /&gt;
        infoboxStartDiv = infoboxStartDiv .. &amp;#039;&amp;quot;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
        local style = args.style&lt;br /&gt;
        if style then&lt;br /&gt;
                infoboxStartDiv = infoboxStartDiv .. &amp;#039; style=&amp;quot;&amp;#039; .. style .. &amp;#039;&amp;quot;&amp;#039;&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        infoboxStartDiv = infoboxStartDiv .. &amp;#039;&amp;gt;&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
	local html = {&lt;br /&gt;
		infoboxStartDiv,&lt;br /&gt;
			&amp;#039;&amp;lt;div class=&amp;quot;infobox-title&amp;quot;&amp;gt;&amp;#039; .. title .. &amp;#039;&amp;lt;/div&amp;gt;&amp;#039;,&lt;br /&gt;
			imageArea,&lt;br /&gt;
			&amp;#039;{| class=&amp;quot;infobox-rows&amp;quot; cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&amp;#039;,&lt;br /&gt;
			&amp;#039;|-&amp;#039;,&lt;br /&gt;
			args.rows or &amp;#039;&amp;#039;,&lt;br /&gt;
			footer or &amp;#039;&amp;#039;,&lt;br /&gt;
			gameversion or &amp;#039;&amp;#039;,&lt;br /&gt;
			&amp;#039;|}&amp;#039;,&lt;br /&gt;
		&amp;#039;&amp;lt;/div&amp;gt;&amp;#039;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	return table.concat( html, &amp;#039;\n&amp;#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Blob</name></author>
	</entry>
</feed>