"ମଡ୍ୟୁଲ:Message box" ପୃଷ୍ଠାର ସଂସ୍କରଣ‌ଗୁଡ଼ିକ ମଧ୍ୟରେ ତଫାତ

Content deleted Content added
ଟିକେ en:Module:Message_boxରୁ ୧ ଗୋଟି ସଂସ୍କରଣ ଅଣାଗଲା
code requested by User:Danski454 to fix demospace feature
୧୨ କ ଧାଡ଼ି:
-- Define constants
local CONFIG_MODULE = 'Module:Message box/configuration'
local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'}
 
--------------------------------------------------------------------------------
Line ୭୪ ⟶ ୭୫:
local ns = obj.title.namespace
-- boxType is "mbox" or invalid input
if nsargs.demospace =and args.demospace ~= 0'' then
-- implement demospace parameter of mbox
local demospace = string.lower(args.demospace)
if DEMOSPACES[demospace] then
-- use template from DEMOSPACES
obj.cfg = cfg[DEMOSPACES[demospace]]
elseif string.find( demospace, 'talk' ) then
-- demo as a talk page
obj.cfg = cfg.tmbox
else
-- default to ombox
obj.cfg = cfg.ombox
end
elseif ns == 0 then
obj.cfg = cfg.ambox -- main namespace
elseif ns == 6 then