Module:Infobox: Difference between revisions

Slowly starting a bit of cleanup
(Copying RSC version for now)
(Slowly starting a bit of cleanup)
Line 81:
removal = { name = releaseUpdate, params = { 'removal', 'removalupdate' }, flag = 'p' },
has_content = hasContent,
hasContent = hasContent,
image = image,
numbers = numbers,
Line 91 ⟶ 90:
-- (including inside switchfo box data)
-- report it
local nil_param = 'UHINFOBOX OHMODULE YOUERROR, SHOULDN\'TPLEASE SEEREPORT THIS!TO WIKI ADMIN'
 
-- In case the nil_param is needed outside of this module
Line 150 ⟶ 149:
paramnames = {}, -- parameter names
dupeable = {}, -- parameters that are allowed to have duplicated switch data
add_infobox_class = true, -- if true, will add the class 'infobox'
addrswibclass = true,
switchfo = false, -- switch infobox? or not?
switchfoattr = {}, -- switch data class changes
Line 185 ⟶ 184:
 
--[[
TogglesRemoves the addition of infobox class
use before :create()
noop if not a boolean
--]]
function Infobox:setAddRSWInfoboxClassremoveClassInfobox(bool)
self.add_infobox_class = false
if type(bool) == 'boolean' then
self.addrswibclass = bool
end
end
 
Line 283 ⟶ 279:
self.rtable = mw.html.create('table')
:addClass('plainlinks')
if self.addrswibclassadd_infobox_class then
self.rtable:addClass('infobox')
end