Anonymous user
Module:Message box: Difference between revisions
From Mariopedia, a wiki on Mario, Yoshi, Wario, Donkey Kong, Super Smash Bros., and more!
Jump to navigationJump to search
no edit summary
(code requested by User:Danski454 to fix demospace feature) |
No edit summary |
||
Line 5:
require('Module:No globals')
local getArgs
local yesno = require('Module:
-- Get a language object for formatDate and ucfirst.
Line 12:
-- Define constants
local CONFIG_MODULE = 'Module:Message box/configuration'
--------------------------------------------------------------------------------
Line 75 ⟶ 74:
local ns = obj.title.namespace
-- boxType is "mbox" or invalid input
if
obj.cfg = cfg.ambox -- main namespace
elseif ns == 6 then
Line 174 ⟶ 160:
-- Add attributes, classes and styles.
self.id = args.id
self.name = args.name▼
if yesno(args.plainlinks) ~= false then
self:addClass('plainlinks')
Line 203 ⟶ 185:
and cfg.templateCategoryRequireName
then
if self.name then
local templateName = mw.ustring.match(
Line 214 ⟶ 197:
and mw.title.equals(self.title, self.templateTitle)
end
-- Process data for collapsible text fields. At the moment these are only
-- used in {{ambox}}.
Line 297 ⟶ 280:
end
if date then
self.date = string.format(" <small
end
self.info = args.info
|