Module:InfoboxImage: Difference between revisions
From Roses, Tulips, & Liberty
Content added Content deleted
(tidy sub code as per talk page) |
(add upright) |
||
Line 5: | Line 5: | ||
-- sizedefault - default size to display the image if size param is blank |
-- sizedefault - default size to display the image if size param is blank |
||
-- alt - alt text for image |
-- alt - alt text for image |
||
-- border - set to 1 if border |
|||
-- upright - upright image param |
|||
-- suppressplaceholder - if yes then checks to see if image is a placeholder and suppresses it |
-- suppressplaceholder - if yes then checks to see if image is a placeholder and suppresses it |
||
-- Outputs: |
-- Outputs: |
||
Line 125: | Line 127: | ||
local alt = frame.args["alt"]; |
local alt = frame.args["alt"]; |
||
local border = frame.args["border"]; |
local border = frame.args["border"]; |
||
local upright = frame.args["upright"] or ""; |
|||
-- remove file: or image: prefix if exists |
-- remove file: or image: prefix if exists |
||
Line 166: | Line 169: | ||
if border == "yes" then |
if border == "yes" then |
||
result = result .. "|border"; |
result = result .. "|border"; |
||
end |
|||
if upright ~= "" then |
|||
result = result .. "|upright=" .. upright; |
|||
end |
end |
||
result = result .. "]]"; |
result = result .. "]]"; |