Module:Message box: Difference between revisions

Jump to navigation Jump to search
load box types from the config page automatically
(use the same invalid type warning as the previous template)
(load box types from the config page automatically)
Line 5:
local categoryHandler = require('Module:Category handler').main
local yesno = require('Module:Yesno')
 
-- Load the configuration page.
local cfgTables = mw.loadData('Module:Message box/configuration')
 
-- Get a language object for formatDate and ucfirst.
Line 131 ⟶ 134:
boxType = box.getMboxType(self.nsid)
end
local cfgTables = mw.loadData('Module:Message box/configuration')
local cfg = cfgTables[boxType]
if not cfg then
Line 182 ⟶ 184:
self.isSmall = false
end
 
-- Add attributes, classes and styles.
Line 551 ⟶ 552:
end
 
local p = {
return {
box = box,
makeBox = makeBox,
mbox = makeWrapper('mbox'),
ambox = makeWrapper('ambox'),
cmbox = makeWrapper('cmbox'),
fmbox = makeWrapper('fmbox'),
imbox = makeWrapper('imbox'),
ombox = makeWrapper('ombox'),
tmbox = makeWrapper('tmbox')
}
 
for boxType in pairs(cfgTables) do
amboxp[boxType] = makeWrapper('ambox'boxType),
end
 
return {p
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu