編集の要約なし
template>Akaniji (copied from en:Module:InfoboxImage on 2013-05-26 at 12:54:36) |
編集の要約なし |
||
5行目: | 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 | ||
-- title - title text for image | |||
-- border - set to yes if border | -- border - set to yes if border | ||
-- center - set to yes, if the image has to be centered | |||
-- upright - upright image param | -- 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 | ||
126行目: | 128行目: | ||
local sizedefault = frame.args["sizedefault"]; | local sizedefault = frame.args["sizedefault"]; | ||
local alt = frame.args["alt"]; | local alt = frame.args["alt"]; | ||
local title = frame.args["title"]; | |||
local border = frame.args["border"]; | local border = frame.args["border"]; | ||
local upright = frame.args["upright"] or ""; | local upright = frame.args["upright"] or ""; | ||
local center= frame.args["center"]; | |||
-- remove file: or image: prefix if exists | -- remove file: or image: prefix if exists | ||
164行目: | 168行目: | ||
result = result .. "|frameless"; | result = result .. "|frameless"; | ||
end | end | ||
if center == "yes" then | |||
result = result .. "|center" | |||
end | |||
if alt ~= "" and alt ~= nil then | if alt ~= "" and alt ~= nil then | ||
result = result .. "|alt=" .. alt; | result = result .. "|alt=" .. alt; | ||
172行目: | 179行目: | ||
if upright ~= "" then | if upright ~= "" then | ||
result = result .. "|upright=" .. upright; | result = result .. "|upright=" .. upright; | ||
end | |||
if title ~= "" and title ~= nil then | |||
result = result .. "|" .. title; | |||
elseif alt ~= "" and alt ~= nil then | |||
result = result .. "|" .. alt; | |||
end | end | ||
result = result .. "]]"; | result = result .. "]]"; |