Diferencia entre revisiones de «Módulo:InfoboxImage»
wikitves>WOSlinker don't use alt as a title when title not set |
m 1 revisión importada |
||
(No se muestran 2 ediciones intermedias de 2 usuarios) | |||
Línea 12: | Línea 12: | ||
-- 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 | ||
-- link - page to visit when clicking on image | -- link - page to visit when clicking on image | ||
-- class - HTML classes to add to the image | |||
-- Outputs: | -- Outputs: | ||
-- Formatted image. | -- Formatted image. | ||
Línea 172: | Línea 173: | ||
elseif mw.ustring.sub(image,1,1) == "<" then | elseif mw.ustring.sub(image,1,1) == "<" then | ||
return image; | return image; | ||
elseif mw.ustring.sub(image,1, | elseif mw.ustring.sub(image,1,8) == mw.ustring.char(127).."'\"`UNIQ" then | ||
-- Found strip marker at begining, so pass don't process at all | -- Found strip marker at begining, so pass don't process at all | ||
return image; | return image; | ||
Línea 190: | Línea 188: | ||
local upright = frame.args["upright"] or ""; | local upright = frame.args["upright"] or ""; | ||
local thumbtime = frame.args["thumbtime"] or ""; | local thumbtime = frame.args["thumbtime"] or ""; | ||
local center= frame.args["center"]; | local center = frame.args["center"]; | ||
local class = frame.args["class"]; | |||
-- remove prefix if exists | -- remove prefix if exists | ||
Línea 256: | Línea 255: | ||
if thumbtime ~= "" then | if thumbtime ~= "" then | ||
result = result .. "|thumbtime=" .. thumbtime; | result = result .. "|thumbtime=" .. thumbtime; | ||
end | |||
if class ~= nil and class ~= "" then | |||
result = result .. "|class=" .. class; | |||
end | end | ||
-- if alt value is a keyword then do not use as a description | -- if alt value is a keyword then do not use as a description |