Module:InfoboxImage: Difference between revisions
From Vigyanwiki
Template>WOSlinker No edit summary |
Template>WOSlinker No edit summary |
||
Line 17: | Line 17: | ||
result = "File:" .. frame.args["image"]; | result = "File:" .. frame.args["image"]; | ||
result = result .. "/" | result = result .. "/" .. (size or sizedefault or "frameless"); | ||
return result; | return result; |
Revision as of 02:05, 29 August 2012
Documentation for this module may be created at Module:InfoboxImage/doc
local i = {};
function i.InfoboxImage(frame)
local image = frame.args["image"];
if image == "" or image == nil then
return ""
end
if string.sub(frame.args["image"],1,2) == "[[" then
return frame.args["image"];
else
local size = frame.args["size"];
local sizedefault = frame.args["sizedefault"];
local alt = frame.args["alt"];
local result = "";
result = "File:" .. frame.args["image"];
result = result .. "/" .. (size or sizedefault or "frameless");
return result;
end
end
return i;