Module:InfoboxImage: Difference between revisions
From Chalo Chatu, Zambia online encyclopedia
Chalochatu (talk | contribs) (Created page with "-- Inputs: -- image - Can either be a bare filename (with or without the File:/Image: prefix) or a fully formatted image link -- page - page to display for multipage ima...") |
m (1 revision imported) |
||
(One intermediate revision by the same user not shown) | |||
Line 88: | Line 88: | ||
"Project Trains no image.png", | "Project Trains no image.png", | ||
"Image-request.png", | "Image-request.png", | ||
"Noimage.gif", | |||
} | } | ||
Line 164: | Line 165: | ||
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 | ||
return image .. "[[Category:Pages using infoboxes with thumbnail images]]"; | return image .. "[[Category:Pages using infoboxes with thumbnail images]]"; | ||
elseif mw.title.getCurrentTitle().namespace == 0 then | |||
return image .. "[[Category:Pages using deprecated image syntax]]"; | |||
else | else | ||
return image; | return image; | ||
Line 219: | Line 222: | ||
if (tonumber(size) or 0) > 0 then | if (tonumber(size) or 0) > 0 then | ||
size = size .. "px"; | size = size .. "px"; | ||
end | |||
-- add px to sizedefault if just a number | |||
if (tonumber(sizedefault) or 0) > 0 then | |||
sizedefault = sizedefault .. "px"; | |||
end | end | ||