Difference between revisions of "Module:Message box"
Jump to navigation
Jump to search
File:Cscr-featured.svg needs a link to the description page for license and attribution. Add the ability for the configuration to specify a flag to accomplish this.
m (1 revision imported) |
en>Anomie (File:Cscr-featured.svg needs a link to the description page for license and attribution. Add the ability for the configuration to specify a flag to accomplish this.) |
||
Line 1: | Line 1: | ||
require(' | require('strict') | ||
local getArgs | local getArgs | ||
local yesno = require('Module:Yesno') | local yesno = require('Module:Yesno') | ||
Line 155: | Line 155: | ||
self.typeClass = typeData.class | self.typeClass = typeData.class | ||
self.typeImage = typeData.image | self.typeImage = typeData.image | ||
self.typeImageNeedsLink = typeData.imageNeedsLink | |||
-- Find if the box has been wrongly substituted. | -- Find if the box has been wrongly substituted. | ||
Line 329: | Line 330: | ||
and (cfg.imageSmallSize or '30x30px') | and (cfg.imageSmallSize or '30x30px') | ||
or '40x40px' | or '40x40px' | ||
self.imageLeft = string.format('[[File:%s|%s | self.imageLeft = string.format('[[File:%s|%s%s|alt=]]', self.typeImage | ||
or ' | or 'Information icon4.svg', imageSize, self.typeImageNeedsLink and "" or "|link=" ) | ||
end | end | ||
end | end |