Module:Param Parse: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
Tag: Reverted
(Undo revision 2782 by Merds (talk))
Tag: Undo
Line 62: Line 62:
}
}


-- Standardized image function
function parse.image_func(img)
function parse.image_func(img)
if img and string.match(img, '^[%[%[]File:.*[%]%]]$') then
if img and string.match(img, '%[%[File:.*%]%]') then
return img
return img
end
elseif img then
return nil
return string.format('[[File:%s|%s]]', img, parse.image.image_size)
end
return nil
end
end
function parse.image_smw(img)
function parse.image_smw(img)
Line 79: Line 78:
smw_func = parse.image_smw,
smw_func = parse.image_smw,
empty = '[[Special:Upload|Please upload an image!]]',
empty = '[[Special:Upload|Please upload an image!]]',
image_size = '300px',
category_incomplete = 'Needs image',
category_incomplete = 'Needs image',
}
}