Editing Module:IconUtils
From Eco - English Wiki
Your changes will be displayed to readers once an authorized user accepts them. (help)
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 19: | Line 19: | ||
Icon = Utils.checkImage(IconName) | Icon = Utils.checkImage(IconName) | ||
if args.style == nil or args.style == '' then IconStyle = | if args.style == nil or args.style == '' then IconStyle = 1 else IconStyle = args.style end | ||
if args.link == nil or args.link == '' then IconLink = '' else IconLink = '[[' .. args.link .. ']]' end | if args.link == nil or args.link == '' then IconLink = '' else IconLink = '[[' .. args.link .. ']]' end | ||
if args.link == '1' then IconLink = '[[' .. args.name .. ']]' end | if args.link == '1' then IconLink = '[[' .. args.name .. ']]' end | ||
if IconStyle == | if IconStyle == 1 then return '[[file:'.. Icon ..'|'.. IconSize ..'px|link='.. IconLink ..']]' end | ||
if IconStyle == | if IconStyle == 2 then return '[[file:'.. Icon ..'|'.. IconSize ..'px|link='.. IconLink ..']]' end | ||
if IconStyle == | if IconStyle == 3 then return '[[file:'.. Icon ..'|'.. IconSize ..'px|link='.. IconLink ..']]' else return args.style end | ||
end | end | ||
return p | return p |