Diferencia entre revisiones de «Módulo:InfoboxImage»

update strip maker detection as per request on talk page
m (1 revisión importada)
wikitves>WOSlinker
(update strip maker detection as per request on talk page)
Línea 12: Línea 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.
Línea 172: Línea 173:
     elseif mw.ustring.sub(image,1,1) == "<" then
     elseif mw.ustring.sub(image,1,1) == "<" then
         return image;
         return image;
     elseif mw.ustring.sub(image,1,5) == mw.ustring.char(127).."UNIQ" then
     elseif mw.ustring.sub(image,1,8) == mw.ustring.char(127).."'\"`UNIQ" then
        -- Found strip marker at begining, so pass don't process at all
        return image;
    elseif mw.ustring.sub(image,4,9) == "`UNIQ-" then
         -- Found strip marker at begining, so pass don't process at all
         -- Found strip marker at begining, so pass don't process at all
         return image;
         return image;
Línea 190: Línea 188:
         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
Línea 256: Línea 255:
         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
Usuario anónimo