మాడ్యూల్:Message box: కూర్పుల మధ్య తేడాలు

Content deleted Content added
చి en:Module:Message_box నుండి కూర్పును దిగుమతి చేసాం
code requested by User:Danski454 to fix demospace feature
పంక్తి 12:
-- Define constants
local CONFIG_MODULE = 'Module:Message box/configuration'
local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'}
 
--------------------------------------------------------------------------------
Line 74 ⟶ 75:
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
"https://te.wikipedia.org/wiki/మాడ్యూల్:Message_box" నుండి వెలికితీశారు