Module:Message box and Module:Message box/sandbox: Difference between pages
(Difference between pages)
Content deleted Content added
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. |
Use sandbox config |
||
Line 4: | Line 4: | ||
local lang = mw.language.getContentLanguage() |
local lang = mw.language.getContentLanguage() |
||
local CONFIG_MODULE = 'Module:Message box/configuration' |
local CONFIG_MODULE = 'Module:Message box/configuration/sandbox' |
||
local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} |
local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} |
||
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 330: | Line 329: | ||
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|link=|alt=]]', self.typeImage |
||
or 'Information icon4.svg', imageSize |
or 'Information icon4.svg', imageSize) |
||
end |
end |
||
end |
end |