Navigation menu

Module:Message box: Difference between revisions

From The Kodiak Republic Wiki

These can just go, the first for being very Wikipedia-specific, and the second for being almost impossible to import properly
m (Pppery moved page Module:Message box/2 to Module:Message box without leaving a redirect)
(These can just go, the first for being very Wikipedia-specific, and the second for being almost impossible to import properly)
Line 163:
self.typeClass = typeData.class
self.typeImage = typeData.image
 
-- Find if the box has been wrongly substituted.
self.isSubstituted = cfg.substCheck and args.subst == 'SUBST'
 
-- Find whether we are using a small message box.
Line 301 ⟶ 298:
end
self.info = args.info
if yesno(args.removalnotice) then
self.removalNotice = cfg.removalNotice
end
end
 
Line 433 ⟶ 427:
local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText
self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort)
end
if self.isSubstituted then
self:addCat('all', 'Pages with incorrectly substituted templates')
end
end
Line 468 ⟶ 459:
function MessageBox:export()
local root = mw.html.create()
 
-- Add the subst check error.
if self.isSubstituted and self.name then
root:tag('b')
:addClass('error')
:wikitext(string.format(
'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.',
mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}')
))
end
 
-- Create the box table.
Line 537 ⟶ 518:
:addClass('hide-when-compact')
:wikitext(self.info and (' ' .. self.info) or nil)
end
if self.removalNotice then
textCellDiv:tag('small')
:addClass('hide-when-compact')
:tag('i')
:wikitext(string.format(" (%s)", self.removalNotice))
end
else
0

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.