View source for Module:InfoboxImage
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
--
-- This module implements {{InfoboxImage}}
--
local p = {}
p.main = function(f)
local args = f:getParent().args
if args[1] == nil then
return ""
end
local wikitext = mw.text.trim(args[1])
local gallery = wikitext:match('<gallery>(.+)</gallery>')
if gallery then
local size = args[2] or '250px'
local tabberArgs = {'tabber', ''}
for match in gallery:gmatch("[^%c]+") do
local split = mw.text.split(match, "|", true)
local file = mw.text.trim(split[1] or '')
if not file:match("File:(.+)") then
file = "File:" .. file
end
000
1:0
Template used on this page:
Return to Module:InfoboxImage.