Modul:InfoboxImage: Unterschied zwischen den Versionen
(add class param from sandbox as per edit request) |
K (3 Versionen von skanwiki:Modul:InfoboxImage importiert) |
||
Zeile 12: | Zeile 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 | ||
-- Outputs: | -- Outputs: | ||
-- Formatted image. | -- Formatted image. | ||
Zeile 167: | Zeile 166: | ||
if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then | if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then | ||
cat = "[[Category:Pages using infoboxes with thumbnail images]]"; | cat = "[[Category:Pages using infoboxes with thumbnail images]]"; | ||
elseif mw.title.getCurrentTitle().namespace == 0 then | |||
cat = "[[Category:Pages using deprecated image syntax]]"; | |||
end | end | ||
return image .. cat; | return image .. cat; | ||
Zeile 191: | Zeile 192: | ||
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"]; | ||
-- remove prefix if exists | -- remove prefix if exists | ||
Zeile 258: | Zeile 258: | ||
if thumbtime ~= "" then | if thumbtime ~= "" then | ||
result = result .. "|thumbtime=" .. thumbtime; | result = result .. "|thumbtime=" .. thumbtime; | ||
end | end | ||
if title ~= "" and title ~= nil then | if title ~= "" and title ~= nil then | ||
result = result .. "|" .. title; | result = result .. "|" .. title; | ||
elseif alt ~= "" and alt ~= nil then | |||
result = result .. "|" .. alt; | |||
end | end | ||
result = result .. "]]"; | result = result .. "]]"; |