« Module:Message box » : différence entre les versions

mAucun résumé des modifications
mAucun résumé des modifications
Ligne 2 : Ligne 2 :


local MessageBox= {}
local MessageBox= {}
local package = {}
local p = {}


function MessageBox:export()
function MessageBox:export()
Ligne 11 : Ligne 11 :
         article:wikitext('[[' .. self.image .. ']]')
         article:wikitext('[[' .. self.image .. ']]')
     end
     end
     mw.log(self)
     mw.logObject(self)
     article:tag('h4'):wikitext(self.title)
     article:tag('h4'):wikitext(self.title)
     article:tag('p'):wikitext(self.content)
     article:tag('p'):wikitext(self.content)
Ligne 26 : Ligne 26 :
end
end


function package.main(title, content, image)
function p.main(title, content, image)
     local box = MessageBox:new(title, content, image)
     local box = MessageBox:new(title, content, image)
     return box:export()
     return box:export()
end
end


return package
return p