Module:InfoboxImage: Difference between revisions

add class param from sandbox as per edit request
m (1 revision imported)
(add class param from sandbox as per edit request)
Line 12: Line 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
--    class - HTML classes to add to the image
-- Outputs:
-- Outputs:
--    Formatted image.
--    Formatted image.
Line 190: Line 191:
         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"];
        local class = frame.args["class"];
          
          
         -- remove prefix if exists
         -- remove prefix if exists
Line 256: Line 258:
         if thumbtime ~= "" then
         if thumbtime ~= "" then
             result = result .. "|thumbtime=" .. thumbtime;
             result = result .. "|thumbtime=" .. thumbtime;
        end
        if class ~= nil and class ~= "" then
            result = result .. "|class=" .. class;
         end
         end
         -- if alt value is a keyword then do not use as a description
         -- if alt value is a keyword then do not use as a description
Anonymous user