10,317
次編輯
變更
小
导入1个版本
if cfg.allowId then
self.id = args.id
self.name = args.name
if self.name then
self:addClass('box-' .. string.gsub(self.name,' ','_'))
end
end
self:addClass(cfg.usePlainlinksParam and yesno(args.plainlinks or true) and 'plainlinks')
local sect
if args.sect == '' then
sect = ' 本此' .. (cfg.sectionDefault or '頁面')
elseif type(args.sect) == 'string' then
sect = ' 本此' .. args.sect
end
local issue = args.issue
if args.date and args.date ~= '' then
date = args.date
elseif args.date time == '' and self.isTemplatePage then
date = lang:formatDate('Y年n月j日')
elseif args.time and args.time ~= '' then
date = lang:formatDate('Y年n月j日', args.time)
end
if date then
local ok, tempdate = pcall(lang.formatDate, lang, 'Y年n月j日', date) -- 正規化日期 if ok then date = tempdate end end if date then self.date = string.format("<smallclass='date-container'>''(<span class='date'> (%s )</span>)''</small>", date)
end
if args.fix and args.fix ~= '' then
if args.date and args.date ~= '' then
date = args.date
local ok, tempdate = pcall(lang.formatDate, lang, 'Y年n月', date) -- 正規化日期
if ok then
date = tempdate
end
elseif args.time and args.time ~= '' then
date = lang:formatDate('Y年n月', args.time) sortDay = lang:formatDate('j', args.time)
sortDay = tonumber(sortDay)
sortDay = dayName[sortDay]
:tag('div')
:css('text-align', 'center')
:wikitext(format(' 本 此 訊息框使用無效的「type=%s」參數,需要修復。', self.type or ''))
end