মডিউল:Message box: সংশোধিত সংস্করণের মধ্যে পার্থক্য

ony load Category handler when needed, requested on talk page
add class using template name, code requested by User:SD0001
১৬০ নং লাইন: ১৬০ নং লাইন:
-- Add attributes, classes and styles.
-- Add attributes, classes and styles.
self.id = args.id
self.id = args.id
self.name = args.name
if self.name then
self:addClass('box-' .. string.gsub(self.name,' ','_'))
end
if yesno(args.plainlinks) ~= false then
if yesno(args.plainlinks) ~= false then
self:addClass('plainlinks')
self:addClass('plainlinks')
১৮৫ নং লাইন: ১৮৯ নং লাইন:
and cfg.templateCategoryRequireName
and cfg.templateCategoryRequireName
then
then
self.name = args.name
if self.name then
if self.name then
local templateName = mw.ustring.match(
local templateName = mw.ustring.match(
১৯৭ নং লাইন: ২০০ নং লাইন:
and mw.title.equals(self.title, self.templateTitle)
and mw.title.equals(self.title, self.templateTitle)
end
end
 
-- Process data for collapsible text fields. At the moment these are only
-- Process data for collapsible text fields. At the moment these are only
-- used in {{ambox}}.
-- used in {{ambox}}.
২৮০ নং লাইন: ২৮৩ নং লাইন:
end
end
if date then
if date then
self.date = string.format(" <small>''(%s)''</small>", date)
self.date = string.format(" <small class='date-container'>''(<span class='date'>%s</span>)''</small>", date)
end
end
self.info = args.info
self.info = args.info