指鹿为马指什么生肖| 十二月六号是什么星座| 六月初六是什么节日| 什么品牌的卫浴好| 变白吃什么| 眼压高什么症状| 反刍是什么意思| 大红袍是什么茶类| cachecache是什么牌子| 什么是gay| 你说到底为什么都是我的错| 男性更年期吃什么药| kobe是什么意思| 三月份生日是什么星座| 帕金森是什么| 黄体什么意思| mt是什么单位| 开窍是什么意思| 瞒天过海是什么意思| 什么是管状腺瘤| 南辕北辙告诉我们什么道理| 螨虫长什么样子| 心慌心跳吃什么药| 身份证x代表什么意思| 右手臂酸痛是什么前兆| 什么是宫缩| 航母舰长是什么级别| 月经不调有什么症状| 猫鼻支什么症状| 7到9点是什么时辰| 什么人容易得肾结石| 中央党校什么级别| 过火是什么意思| 萤火虫为什么发光| 电头是什么| 7月20号是什么星座| 无犯罪证明需要什么材料| 什么叫有氧运动和无氧运动| 丙辰日是什么意思| 唐卡是什么| 双肺纹理增多增粗是什么意思| 盛世的意思是什么| 阴道b超检查什么| 睡醒后腰疼是什么原因| 艺字五行属什么| 谷草转氨酶是指什么| 心跳太慢吃什么药| 射手座的幸运色是什么| 魅可口红属于什么档次| 小便黄是什么原因引起的| 鸦片鱼头是什么鱼| 鸡头米什么时候上市| 数字7的风水含义是什么| 双侧卵巢多囊性改变是什么意思| 是谁送你来到我身边是什么歌| 姨妈少是什么原因怎么办| 细菌高是什么原因| 冲代表什么生肖| 什么叫瑕疵| 家奴是什么生肖| 核磁共振挂什么科| 叶酸基因检测是什么| 虾不能和什么同吃| 为什么结婚| dx是什么药| 痰湿吃什么药| 莲雾什么味道| 舌头什么颜色正常| 感冒有痰吃什么药| 少尉是什么级别| 痛经喝什么可以缓解| 什么是淋巴| 清肺吃什么好| 一什么土| 检查肠道挂什么科| 梗阻是什么意思| 阑尾炎可以吃什么水果| 无利起早是什么生肖| dha有什么作用与功效| 比利时说什么语言| 别出心裁的裁是什么意思| 脑血管堵塞吃什么药好| 劳宫穴在什么位置| 强迫思维是什么| 四库全书是什么| 4.11是什么星座| 吃辣椒有什么好处| 空调多少匹什么意思| 荔枝不能与什么一起吃| 缺铁性贫血吃什么好| 高攀是什么意思| 酒后头疼什么原因| 盆腔炎检查什么项目| 意守丹田是什么意思| 感冒吃什么| 一 什么云| 一物降一物指什么生肖| 什么眼镜品牌好| 什么叫阵雨| 什么解酒| 天意是什么意思| 贵人多忘事什么意思| 什么时候打耳洞最好| 肩膀的肌肉叫什么| 彩妆是什么意思| 子时是什么时间| 去心火喝什么茶好| 什么人容易长智齿| 乙肝病毒携带者有什么症状| 伤疤好了变黑了是什么原因| 欧莱雅适合什么年龄| 经常犯困是什么原因| 雪茄是什么| 男人更年期吃什么药| 7月18日是什么日子| 什么是双规| 桃符指的是什么| 白袜子是什么意思| 佛心果是什么东西| 812是什么意思| 小便多吃什么药| pc肌是什么| 右侧胸口疼是什么原因| 富硒对人体有什么好处| 牙龈肿痛吃什么药最见效| 小孩出汗多是什么原因造成的| outlets是什么意思| 喝完酒头疼是什么原因| 睡觉憋气是什么原因引起的| tfcc是什么| 蛋白质阴性是什么意思| 毒龙什么意思| 减肥期间吃什么好| 喝中药不能吃什么东西| 嗓子疼吃什么药好得快| 阑尾炎可以吃什么| 有什么鱼| 精尽人亡什么意思| 梦见吃李子是什么意思| 7一9点是什么时辰| 急性尿道炎吃什么药| 眼睛干涩发痒用什么药| 巨蟹座和什么星座最配| 热疹子是什么症状图片| 麒麟到了北极会变成什么| 甲肝阳性是什么意思| 感冒拉肚子吃什么药| 为什么心慌| 吃饭老是噎着是什么原因| 国务院秘书长什么级别| 狗狗打喷嚏流鼻涕怎么办吃什么药| 香奶奶是什么牌子| 眼睛疲劳干涩用什么眼药水| 全国政协常委什么级别| 碧根果和核桃有什么区别| 梦见棺材什么意思| 高血压适合喝什么茶| 什么言什么色| 梦见吃粉条是什么预兆| 全程c反应蛋白高说明什么| 朵字五行属什么| 爱吃酸的人是什么体质| 难产是什么意思| 小鸡喜欢吃什么食物| 血小板压积偏高是什么原因| 外科和内科有什么区别| kick什么意思| 检查生育能力挂什么科| 引火下行是什么意思| 什么牌空调好用又省电| 腿抽筋什么原因引起的| 胃反酸吃点什么能缓解| 5月2日是什么星座| 苏轼是什么朝代的| 什么是伟哥| 大手牵小手是什么菜| anxiety什么意思| mexican是什么牌子| 胃疼喝什么药| 兔死狐悲指什么生肖| 姓陈取什么名字好听| 住院需要带什么| 灵隐寺求什么最灵验| 18度穿什么衣服合适| 懵懵懂懂是什么意思| 吃鱼有什么好处| 微信英文名叫什么| 什么的友谊| 中央民族大学什么档次| 奋不顾身的顾是什么意思| 八月十八号是什么星座| 什么是知青| 胃疼为什么后背也疼| 沙棘什么味道| 冬天吃什么| 晒伤用什么药| 曹仁和曹操什么关系| 难受是什么意思| 细水长流是什么意思| 佛龛是什么| 吃什么让月经量增多| 包干价是什么意思| 小儿肠胃炎吃什么药| 雨落心尘是什么意思| 秋葵补什么| 三维是什么意思| 宗旨是什么意思| 打蛇打七寸是什么意思| 什么叫增值税| 眼睛肿疼是什么原因引起的| 胆汁有什么作用| 打强心针意味着什么| 10月7日是什么星座| 均字五行属什么| 六月十二号是什么星座| 生理期为什么不能拔牙| 痤疮涂什么药膏| 科学解释什么叫上火| 残骸是什么意思| 来姨妈可以吃什么水果| 7.14号是什么节日| 真实是什么意思| 盐酸氯米帕明片有什么作用| 天麻种植需要什么条件| 氪金是什么意思| 鸡心为什么不建议吃| 女人小便出血是什么原因| 鸡精和鸡粉有什么区别| 同房有点痛什么原因| 怀孕3天有什么症状| 消渴症是什么病| 日有所思夜有所梦是什么意思| 表白送什么花| 流产期间吃什么好| 伪娘是什么| 为什么特别招蚊子| 为什么一动就满头大汗| 吃什么最养胃修复胃| 衤字旁与什么有关| 两个人可以玩什么游戏| 子宫什么样子图片| 珍珠状丘疹有什么危害| 本命年红内衣什么时候穿| psp是什么| 什么叫小三阳| 过度纵欲的后果是什么| 1981年什么命| 维生素b族什么时候吃| nt检查需要注意什么| 为什么会牙痛| 私处长痘痘是什么原因| 白内障有什么症状表现| 头发出油是什么原因| 吃什么东西能减肥| 舌系带长有什么影响吗| 梦见自己生病了是什么意思| 指压板有什么功效| 什么的滋味| 头孢吃多了有什么副作用| 脑梗的人适合吃什么食物| 折耳根是什么| 什么牌子的充电宝好| 7月八号是什么星座| 脱发是什么原因| 百度Pergi ke kandungan

开展文化资源普查、经典诵读 让传统文化焕发新活力

Modul yang dilindungi selama-lamanya
Daripada Wikipedia, ensiklopedia bebas.
百度 2017年,文昌全市已实现1844户7685人脱贫,建档立卡贫困人口退出精准率达到98%以上,翁田镇西村实现整体脱贫出列,所有贫困户D级危房已全部消除重建。
require('strict')
local getArgs
local yesno = require('Module:Yesno')
local lang = mw.language.getContentLanguage()

local CONFIG_MODULE = 'Module:Message box/configuration'
local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'}

--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------

local function getTitleObject(...)
	-- Get the title object, passing the function through pcall
	-- in case we are over the expensive function count limit.
	local success, title = pcall(mw.title.new, ...)
	if success then
		return title
	end
end

local function union(t1, t2)
	-- Returns the union of two arrays.
	local vals = {}
	for i, v in ipairs(t1) do
		vals[v] = true
	end
	for i, v in ipairs(t2) do
		vals[v] = true
	end
	local ret = {}
	for k in pairs(vals) do
		table.insert(ret, k)
	end
	table.sort(ret)
	return ret
end

local function getArgNums(args, prefix)
	local nums = {}
	for k, v in pairs(args) do
		local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$')
		if num then
			table.insert(nums, tonumber(num))
		end
	end
	table.sort(nums)
	return nums
end

--------------------------------------------------------------------------------
-- Box class definition
--------------------------------------------------------------------------------

local MessageBox = {}
MessageBox.__index = MessageBox

function MessageBox.new(boxType, args, cfg)
	args = args or {}
	local obj = {}

	-- Set the title object and the namespace.
	obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle()

	-- Set the config for our box type.
	obj.cfg = cfg[boxType]
	if not obj.cfg then
		local ns = obj.title.namespace
		-- boxType is "mbox" or invalid input
		if args.demospace and args.demospace ~= '' 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
			obj.cfg = cfg.imbox -- file namespace
		elseif ns == 14 then
			obj.cfg = cfg.cmbox -- category namespace
		else
			local nsTable = mw.site.namespaces[ns]
			if nsTable and nsTable.isTalk then
				obj.cfg = cfg.tmbox -- any talk namespace
			else
				obj.cfg = cfg.ombox -- other namespaces or invalid input
			end
		end
	end

	-- Set the arguments, and remove all blank arguments except for the ones
	-- listed in cfg.allowBlankParams.
	do
		local newArgs = {}
		for k, v in pairs(args) do
			if v ~= '' then
				newArgs[k] = v
			end
		end
		for i, param in ipairs(obj.cfg.allowBlankParams or {}) do
			newArgs[param] = args[param]
		end
		obj.args = newArgs
	end

	-- Define internal data structure.
	obj.categories = {}
	obj.classes = {}
	-- For lazy loading of [[Module:Category handler]].
	obj.hasCategories = false

	return setmetatable(obj, MessageBox)
end

function MessageBox:addCat(ns, cat, sort)
	if not cat then
		return nil
	end
	if sort then
		cat = string.format('[[Kategori:%s|%s]]', cat, sort)
	else
		cat = string.format('[[Kategori:%s]]', cat)
	end
	self.hasCategories = true
	self.categories[ns] = self.categories[ns] or {}
	table.insert(self.categories[ns], cat)
end

function MessageBox:addClass(class)
	if not class then
		return nil
	end
	table.insert(self.classes, class)
end

function MessageBox:setParameters()
	local args = self.args
	local cfg = self.cfg

	-- Get type data.
	self.type = args.type
	local typeData = cfg.types[self.type]
	self.invalidTypeError = cfg.showInvalidTypeError
		and self.type
		and not typeData
	typeData = typeData or cfg.types[cfg.default]
	self.typeClass = typeData.class
	self.typeImage = typeData.image
	self.typeImageNeedsLink = typeData.imageNeedsLink

	-- 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.
	self.isSmall = cfg.allowSmall and (
		cfg.smallParam and args.small == cfg.smallParam
		or not cfg.smallParam and yesno(args.small)
	)

	-- Add attributes, classes and styles.
	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
		self:addClass('plainlinks')
	end
	for _, class in ipairs(cfg.classes or {}) do
		self:addClass(class)
	end
	if self.isSmall then
		self:addClass(cfg.smallClass or 'mbox-small')
	end
	self:addClass(self.typeClass)
	self:addClass(args.class)
	self.style = args.style
	self.attrs = args.attrs

	-- Set text style.
	self.textstyle = args.textstyle
	
	-- Set image classes.
	self.imageRightClass = args.imagerightclass or args.imageclass
	self.imageLeftClass = args.imageleftclass or args.imageclass

	-- Find if we are on the template page or not. This functionality is only
	-- used if useCollapsibleTextFields is set, or if both cfg.templateCategory
	-- and cfg.templateCategoryRequireName are set.
	self.useCollapsibleTextFields = cfg.useCollapsibleTextFields
	if self.useCollapsibleTextFields
		or cfg.templateCategory
		and cfg.templateCategoryRequireName
	then
		if self.name then
			local templateName = mw.ustring.match(
				self.name,
				'^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$'
			) or self.name
			templateName = 'Templat:' .. templateName
			self.templateTitle = getTitleObject(templateName)
		end
		self.isTemplatePage = self.templateTitle
			and mw.title.equals(self.title, self.templateTitle)
	end
	
	-- Process data for collapsible text fields. At the moment these are only
	-- used in {{ambox}}.
	if self.useCollapsibleTextFields then
		-- Get the self.issue value.
		if self.isSmall and args.smalltext then
			self.issue = args.smalltext
		else
			local sect
			if args.sect == '' then
				sect = (cfg.sectionDefault or 'Laman') .. ' ini'
			elseif type(args.sect) == 'string' then
				sect = args.sect .. ' ini'
			end
			local issue = args.issue
			issue = type(issue) == 'string' and issue ~= '' and issue or nil
			local text = args.text
			text = type(text) == 'string' and text or nil
			local issues = {}
			table.insert(issues, sect)
			table.insert(issues, issue)
			table.insert(issues, text)
			self.issue = table.concat(issues, ' ')
		end

		-- Get the self.talk value.
		local talk = args.talk
		-- Show talk links on the template page or template subpages if the talk
		-- parameter is blank.
		if talk == ''
			and self.templateTitle
			and (
				mw.title.equals(self.templateTitle, self.title)
				or self.title:isSubpageOf(self.templateTitle)
			)
		then
			talk = '#'
		elseif talk == '' then
			talk = nil
		end
		if talk then
			-- If the talk value is a talk page, make a link to that page. Else
			-- assume that it's a section heading, and make a link to the talk
			-- page of the current page with that section heading.
			local talkTitle = getTitleObject(talk)
			local talkArgIsTalkPage = true
			if not talkTitle or not talkTitle.isTalkPage then
				talkArgIsTalkPage = false
				talkTitle = getTitleObject(
					self.title.text,
					mw.site.namespaces[self.title.namespace].talk.id
				)
			end
			if talkTitle and talkTitle.exists then
                local talkText
                if self.isSmall then
                    local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. (talk == '#' and '' or '#') .. talk)
                    talkText = string.format('([[%s|talk]])', talkLink)
                else
                    talkText = 'Perbincangan yang berkaitan boleh didapati di'
                    if talkArgIsTalkPage then
                        talkText = string.format(
                            '%s [[%s|%s]].',
                            talkText,
                            talk,
                            talkTitle.prefixedText
                        )
                    else
                        talkText = string.format(
                            '%s the [[%s' .. (talk == '#' and '' or '#') .. '%s|talk page]].',
                            talkText,
                            talkTitle.prefixedText,
                            talk
                        )
                    end
                end
				self.talk = talkText
			end
		end

		-- Get other values.
		self.fix = args.fix ~= '' and args.fix or nil
		local date
		if args.date and args.date ~= '' then
			date = args.date
		elseif args.date == '' and self.isTemplatePage then
			date = lang:formatDate('F Y')
		end
		if date then
			self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date)
		end
		self.info = args.info
		if yesno(args.removalnotice) then
			self.removalNotice = cfg.removalNotice
		end
	end

	-- Set the non-collapsible text field. At the moment this is used by all box
	-- types other than ambox, and also by ambox when small=yes.
	if self.isSmall then
		self.text = args.smalltext or args.text
	else
		self.text = args.text
	end

	-- Set the below row.
	self.below = cfg.below and args.below

	-- General image settings.
	self.imageCellDiv = not self.isSmall and cfg.imageCellDiv
	self.imageEmptyCell = cfg.imageEmptyCell

	-- Left image settings.
	local imageLeft = self.isSmall and args.smallimage or args.image
	if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none'
		or not cfg.imageCheckBlank and imageLeft ~= 'none'
	then
		self.imageLeft = imageLeft
		if not imageLeft then
			local imageSize = self.isSmall
				and (cfg.imageSmallSize or '30x30px')
				or '40x40px'
			self.imageLeft = string.format('[[File:%s|%s%s|alt=]]', self.typeImage
				or 'Information icon4.svg', imageSize, self.typeImageNeedsLink and "" or "|link=" )
		end
	end

	-- Right image settings.
	local imageRight = self.isSmall and args.smallimageright or args.imageright
	if not (cfg.imageRightNone and imageRight == 'none') then
		self.imageRight = imageRight
	end
	
	-- set templatestyles
	self.base_templatestyles = cfg.templatestyles
	self.templatestyles = args.templatestyles
end

function MessageBox:setMainspaceCategories()
	local args = self.args
	local cfg = self.cfg

	if not cfg.allowMainspaceCategories then
		return nil
	end

	local nums = {}
	for _, prefix in ipairs{'cat', 'category', 'all'} do
		args[prefix .. '1'] = args[prefix]
		nums = union(nums, getArgNums(args, prefix))
	end

	-- The following is roughly equivalent to the old {{Ambox/category}}.
	local date = args.date
	date = type(date) == 'string' and date
	local preposition = 'dari'
	for _, num in ipairs(nums) do
		local mainCat = args['cat' .. tostring(num)]
			or args['category' .. tostring(num)]
		local allCat = args['all' .. tostring(num)]
		mainCat = type(mainCat) == 'string' and mainCat
		allCat = type(allCat) == 'string' and allCat
		if mainCat and date and date ~= '' then
			local catTitle = string.format('%s %s %s', mainCat, preposition, date)
			self:addCat(0, catTitle)
			catTitle = getTitleObject('Kategori:' .. catTitle)
			if not catTitle or not catTitle.exists then
				self:addCat(0, 'Rencana dengan parameter tarikh tidak sah dalam templat')
			end
		elseif mainCat and (not date or date == '') then
			self:addCat(0, mainCat)
		end
		if allCat then
			self:addCat(0, allCat)
		end
	end
end

function MessageBox:setTemplateCategories()
	local args = self.args
	local cfg = self.cfg

	-- Add template categories.
	if cfg.templateCategory then
		if cfg.templateCategoryRequireName then
			if self.isTemplatePage then
				self:addCat(10, cfg.templateCategory)
			end
		elseif not self.title.isSubpage then
			self:addCat(10, cfg.templateCategory)
		end
	end

	-- Add template error categories.
	if cfg.templateErrorCategory then
		local templateErrorCategory = cfg.templateErrorCategory
		local templateCat, templateSort
		if not self.name and not self.title.isSubpage then
			templateCat = templateErrorCategory
		elseif self.isTemplatePage then
			local paramsToCheck = cfg.templateErrorParamsToCheck or {}
			local count = 0
			for i, param in ipairs(paramsToCheck) do
				if not args[param] then
					count = count + 1
				end
			end
			if count > 0 then
				templateCat = templateErrorCategory
				templateSort = tostring(count)
			end
			if self.categoryNums and #self.categoryNums > 0 then
				templateCat = templateErrorCategory
				templateSort = 'C'
			end
		end
		self:addCat(10, templateCat, templateSort)
	end
end

function MessageBox:setAllNamespaceCategories()
	-- Set categories for all namespaces.
	if self.invalidTypeError then
		local allSort = (self.title.namespace == 0 and 'Utama:' or '') .. self.title.prefixedText
		self:addCat('all', 'Parameter kotak mesej Wikipedia perlu diperbaiki', allSort)
	end
	if self.isSubstituted then
		self:addCat('all', 'Laman dengan templat digantikan tidak betul')
	end
end

function MessageBox:setCategories()
	if self.title.namespace == 0 then
		self:setMainspaceCategories()
	elseif self.title.namespace == 10 then
		self:setTemplateCategories()
	end
	self:setAllNamespaceCategories()
end

function MessageBox:renderCategories()
	if not self.hasCategories then
		-- No categories added, no need to pass them to Category handler so,
		-- if it was invoked, it would return the empty string.
		-- So we shortcut and return the empty string.
		return ""
	end
	-- Convert category tables to strings and pass them through
	-- [[Module:Category handler]].
	return require('Module:Category handler')._main{
		main = table.concat(self.categories[0] or {}),
		template = table.concat(self.categories[10] or {}),
		all = table.concat(self.categories.all or {}),
		nocat = self.args.nocat,
		page = self.args.page
	}
end

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(
				'Templat <code>%s[[Templat:%s|%s]]%s</code> digantikan tidak betul.',
				mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}')
			))
	end

	local frame = mw.getCurrentFrame()
	root:wikitext(frame:extensionTag{
		name = 'templatestyles',
		args = { src = self.base_templatestyles },
	})
	-- Add support for a single custom templatestyles sheet. Undocumented as
	-- need should be limited and many templates using mbox are substed; we
	-- don't want to spread templatestyles sheets around to arbitrary places
	if self.templatestyles then
		root:wikitext(frame:extensionTag{
			name = 'templatestyles',
			args = { src = self.templatestyles },
		})
	end

	-- Create the box table.
	local boxTable = root:tag('table')
	boxTable:attr('id', self.id or nil)
	for i, class in ipairs(self.classes or {}) do
		boxTable:addClass(class or nil)
	end
	boxTable
		:cssText(self.style or nil)
		:attr('role', 'presentation')

	if self.attrs then
		boxTable:attr(self.attrs)
	end

	-- Add the left-hand image.
	local row = boxTable:tag('tr')
	if self.imageLeft then
		local imageLeftCell = row:tag('td'):addClass('mbox-image')
		if self.imageCellDiv then
			-- If we are using a div, redefine imageLeftCell so that the image
			-- is inside it. Divs use style="width: 52px;", which limits the
			-- image width to 52px. If any images in a div are wider than that,
			-- they may overlap with the text or cause other display problems.
			imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div')
		end
		imageLeftCell
			:addClass(self.imageLeftClass)
			:wikitext(self.imageLeft or nil)
	elseif self.imageEmptyCell then
		-- Some message boxes define an empty cell if no image is specified, and
		-- some don't. The old template code in templates where empty cells are
		-- specified gives the following hint: "No image. Cell with some width
		-- or padding necessary for text cell to have 100% width."
		row:tag('td')
			:addClass('mbox-empty-cell')
	end

	-- Add the text.
	local textCell = row:tag('td'):addClass('mbox-text')
	if self.useCollapsibleTextFields then
		-- The message box uses advanced text parameters that allow things to be
		-- collapsible. At the moment, only ambox uses this.
		textCell:cssText(self.textstyle or nil)
		local textCellDiv = textCell:tag('div')
		textCellDiv
			:addClass('mbox-text-span')
			:wikitext(self.issue or nil)
		if (self.talk or self.fix) then
			textCellDiv:tag('span')
				:addClass('hide-when-compact')
				:wikitext(self.talk and (' ' .. self.talk) or nil)
				:wikitext(self.fix and (' ' .. self.fix) or nil)
		end
		textCellDiv:wikitext(self.date and (' ' .. self.date) or nil)
		if self.info and not self.isSmall then
			textCellDiv
				:tag('span')
				:addClass('hide-when-compact')
				:wikitext(self.info and (' ' .. self.info) or nil)
		end
		if self.removalNotice then
			textCellDiv:tag('span')
				:addClass('hide-when-compact')
				:tag('i')
					:wikitext(string.format(" (%s)", self.removalNotice))
		end
	else
		-- Default text formatting - anything goes.
		textCell
			:cssText(self.textstyle or nil)
			:wikitext(self.text or nil)
	end

	-- Add the right-hand image.
	if self.imageRight then
		local imageRightCell = row:tag('td'):addClass('mbox-imageright')
		if self.imageCellDiv then
			-- If we are using a div, redefine imageRightCell so that the image
			-- is inside it.
			imageRightCell = imageRightCell:tag('div'):css('width', '52px')
		end
		imageRightCell
			:wikitext(self.imageRight or nil)
	end

	-- Add the below row.
	if self.below then
		boxTable:tag('tr')
			:tag('td')
				:attr('colspan', self.imageRight and '3' or '2')
				:addClass('mbox-text')
				:cssText(self.textstyle or nil)
				:wikitext(self.below or nil)
	end

	-- Add error message for invalid type parameters.
	if self.invalidTypeError then
		root:tag('div')
			:addClass('mbox-invalid-type')
			:wikitext(string.format(
				'Kotak mesej menggunakan parameter "type=%s"  tidak sah dan memerlukan pembaikian.',
				self.type or ''
			))
	end

	-- Add categories.
	root:wikitext(self:renderCategories() or nil)

	return tostring(root)
end

--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------

local p, mt = {}, {}

function p._exportClasses()
	-- For testing.
	return {
		MessageBox = MessageBox
	}
end

function p.main(boxType, args, cfgTables)
	local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE))
	box:setParameters()
	box:setCategories()
	return box:export()
end

function mt.__index(t, k)
	return function (frame)
		if not getArgs then
			getArgs = require('Module:Arguments').getArgs
		end
		return t.main(k, getArgs(frame, {trim = false, removeBlanks = false}))
	end
end

return setmetatable(p, mt)
马镫什么时候发明的 苹果充电口叫什么 电脑什么牌子好 梦见下雪了是什么意思 白芷炖肉起什么作用
虎鼠不结亲是什么意思 黄鼠狼是什么科 南浦大桥什么时候建成 怀孕要检查什么项目 机化是什么意思
亚克力是什么材质 senda是什么牌子 心脏房颤是什么症状 吃什么补气补血最见效 中国特工组织叫什么
实质是什么意思 来源朋友验证消息是什么意思 嗓子哑了是什么原因 正常的心电图是什么样的图形 凤凰指什么生肖
青霉素过敏吃什么消炎药hcv8jop2ns4r.cn 桦树茸什么功效hcv9jop0ns1r.cn 锦鲤吃什么bfb118.com 水便分离的原因是什么weuuu.com 诺氟沙星胶囊治什么病hcv8jop1ns2r.cn
苹果和什么榨汁减肥beikeqingting.com 25岁属什么生肖hcv9jop5ns1r.cn 心脏斑块是什么意思啊hcv9jop1ns6r.cn 牙周炎吃什么药hcv8jop0ns8r.cn 股骨头疼痛什么原因xjhesheng.com
经常吃豆腐有什么好处和坏处jinxinzhichuang.com 牛欢喜是什么部位hcv8jop3ns7r.cn 卫校学什么专业最好sanhestory.com 字是什么结构hcv7jop6ns5r.cn 激素6项什么时候查hcv7jop9ns0r.cn
双手合十什么意思hcv8jop1ns9r.cn 奶酪和芝士有什么区别hcv9jop1ns9r.cn 复刻鞋是什么意思hcv8jop7ns1r.cn 补脑吃什么最好hebeidezhi.com 11.23是什么星座hcv7jop6ns8r.cn
百度