Module:Message box: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(use the same invalid type warning as the previous template) |
(load box types from the config page automatically) |
||
Line 5: | Line 5: | ||
local categoryHandler = require('Module:Category handler').main |
local categoryHandler = require('Module:Category handler').main |
||
local yesno = require('Module:Yesno') |
local yesno = require('Module:Yesno') |
||
-- Load the configuration page. |
|||
⚫ | |||
-- Get a language object for formatDate and ucfirst. |
-- Get a language object for formatDate and ucfirst. |
||
Line 131: | Line 134: | ||
boxType = box.getMboxType(self.nsid) |
boxType = box.getMboxType(self.nsid) |
||
end |
end |
||
⚫ | |||
local cfg = cfgTables[boxType] |
local cfg = cfgTables[boxType] |
||
if not cfg then |
if not cfg then |
||
Line 182: | Line 184: | ||
self.isSmall = false |
self.isSmall = false |
||
end |
end |
||
-- Add attributes, classes and styles. |
-- Add attributes, classes and styles. |
||
Line 551: | Line 552: | ||
end |
end |
||
local p = { |
|||
⚫ | |||
box = box, |
box = box, |
||
makeBox = makeBox, |
makeBox = makeBox, |
||
mbox = makeWrapper('mbox') |
mbox = makeWrapper('mbox') |
||
⚫ | |||
cmbox = makeWrapper('cmbox'), |
|||
fmbox = makeWrapper('fmbox'), |
|||
imbox = makeWrapper('imbox'), |
|||
ombox = makeWrapper('ombox'), |
|||
tmbox = makeWrapper('tmbox') |
|||
} |
} |
||
for boxType in pairs(cfgTables) do |
|||
⚫ | |||
end |
|||
⚫ |