Module:Infobox: Difference between revisions

No edit summary
No edit summary
Line 67: Line 67:
for _, w in ipairs( groupImgList['group' .. v] ) do
for _, w in ipairs( groupImgList['group' .. v] ) do
local image = args[v .. '-' .. w]
local image = args[v .. '-' .. w]
image = string.gsub(string.gsub(image, "^[Ff][Ii][Ll][Ee]:", ""), "^[Ii][Mm][Aa][Gg][Ee]:", "")
local size = args[v .. '-' .. w .. 'size'] or groupSize
local size = args[v .. '-' .. w .. 'size'] or groupSize
local class = args[v .. '-' .. w .. 'class'] or groupClass
local class = args[v .. '-' .. w .. 'class'] or groupClass
Line 94: Line 95:
for k, v in ipairs( imgCount ) do
for k, v in ipairs( imgCount ) do
local image = args['image' .. v]
local image = args['image' .. v]
image = string.gsub(string.gsub(image, "^[Ff][Ii][Ll][Ee]:", ""), "^[Ii][Mm][Aa][Gg][Ee]:", "")
local size = args['image' .. v .. 'size'] or defaultImageSize
local size = args['image' .. v .. 'size'] or defaultImageSize
local class = args['image' .. v .. 'class'] or defaultImageClass
local class = args['image' .. v .. 'class'] or defaultImageClass
Line 108: Line 110:
elseif string.match( image, 'UNIQ%-%-gallery%-' ) then
elseif string.match( image, 'UNIQ%-%-gallery%-' ) then
image = image
image = image
--[[elseif image:match( ';' ) then
if not animate then
animate = require( 'Module:Animate' ).animate
end
image = animate{ image, size, class = class }--]]
else
else
json.images[#json.images + 1] = image
json.images[#json.images + 1] = image
Line 158: Line 155:
json.title = title
json.title = title
--[[local repl = function( label, field )
json.rows[#json.rows + 1] = {
label = mw.text.jsonDecode( label:gsub( '\n', '\\n' ) ),
field = mw.text.jsonDecode( field:gsub( '\n', '\\n' ) )
}
return ''
end
args.rows = string.gsub( args.rows or '', '<code class="history%-json">{"label": (".-"), "field": (".-")}</code>\n', repl )--]]
local html = {
local html = {