Modulo:InfoboxImage: Malsamoj inter versioj

[kontrolita revizio][kontrolita revizio]
Enhavo forigita Enhavo aldonita
aldono de plia parametro
aldono
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 jpg, jpeg, png, svg.
-- def_ending - An optional parameter for the default ending.
-- size - size to display the image
-- maxsize - maximum size for image
Linio 75 ⟶ 76:
end
return false
end
 
function i.add_ending (image, ending, def_ending)
-- add an ending to the image name
end local image
if ending ~="" and ending ~=nil then
image = image .. "." .. ending
elseif def_ending ~="" and def_ending ~=nil then
image = image .. "." .. def_ending
end
return image
end
 
Linio 127 ⟶ 139:
local result = "";
local ending = frame.args["ending"];
local def_ending = frame.args["def-ending"];
local size = frame.args["size"];
local maxsize = frame.args["maxsize"];
Linio 165 ⟶ 178:
size = size .. "px";
end
--image add= ani.add_ending (image,ending to the image name,def_ending)
if ending ~="" and ending ~=nil then
image = image .. "." .. ending
end
result = "[[File:" .. image;