Modulo:InfoboxImage: Malsamoj inter versioj
[kontrolita revizio] | [kontrolita revizio] |
Enhavo forigita Enhavo aldonita
e korekto, aldono |
e ŝanĝo de def_ending resp. def-ending al endingdefault, laŭ sizedefault |
||
Linio 2:
-- image - Can either be a bare filename (with or without the File:/Image: prefix) or a fully formatted image link
-- ending - An optional parameter for the file ending, like gif, jpg, jpeg, png, svg.
--
-- size - size to display the image
-- maxsize - maximum size for image
Linio 80 ⟶ 79:
function i.ValidateEnding (f)
-- analyzes the
-- according to http://commons.wikimedia.org/wiki/Commons:File_types,
-- but not tiff, because browser can have some problems with this format
Linio 90 ⟶ 89:
end
function i.AddEnding (image, ending,
-- analyzes, if an ending already exists in the image
local f = image:gsub("^(.*)%.","")
Linio 102 ⟶ 101:
image = image .. "." .. ending
end
elseif
if i.ValidateEnding(
image = image .. "." ..
end
end
Linio 160 ⟶ 159:
local result = "";
local ending = frame.args["ending"];
local
local size = frame.args["size"];
local maxsize = frame.args["maxsize"];
Linio 199 ⟶ 198:
size = size .. "px";
end
image = i.AddEnding (image,ending,
result = "[[File:" .. image;
|