今天是2024年7月3日 第27周 星期三

代人,时大变了。

我们生活在大地上,但我们的梦想超越天空。

更改

跳到导航 跳到搜索
删除121字节 、 2019年8月2日 (五) 09:27
fix pmbox
第97行: 第97行:  
elseif nsid == 14 then
 
elseif nsid == 14 then
 
return 'cmbox' -- category namespace
 
return 'cmbox' -- category namespace
 +
elseif nsid == 104 then
 +
return 'pmbox' -- page namespace
 
else
 
else
 
local nsTable = mw.site.namespaces[nsid]
 
local nsTable = mw.site.namespaces[nsid]
第203行: 第205行:  
if cfg.allowId then
 
if cfg.allowId then
 
self.id = args.id
 
self.id = args.id
self.name = args.name
  −
if self.name then
  −
self:addClass('box-' .. string.gsub(self.name,' ','_'))
  −
end
   
end
 
end
 
self:addClass(cfg.usePlainlinksParam and yesno(args.plainlinks or true) and 'plainlinks')
 
self:addClass(cfg.usePlainlinksParam and yesno(args.plainlinks or true) and 'plainlinks')
第246行: 第244行:  
local sect
 
local sect
 
if args.sect == '' then
 
if args.sect == '' then
sect = ' ' .. (cfg.sectionDefault or '頁面')
+
sect = ' ' .. (cfg.sectionDefault or '頁面')
 
elseif type(args.sect) == 'string' then
 
elseif type(args.sect) == 'string' then
sect = ' ' .. args.sect
+
sect = ' ' .. args.sect
 
end
 
end
 
local issue = args.issue
 
local issue = args.issue
第295行: 第293行:  
if args.date and args.date ~= '' then
 
if args.date and args.date ~= '' then
 
date = args.date
 
date = args.date
elseif args.time == '' and self.isTemplatePage then
+
elseif args.date == '' and self.isTemplatePage then
 
date = lang:formatDate('Y年n月j日')
 
date = lang:formatDate('Y年n月j日')
 
elseif args.time and args.time ~= '' then
 
elseif args.time and args.time ~= '' then
date = lang:formatDate('Y年n月j日', args.time)
+
date = lang:formatDate('Y年n月j日', time)
 
end
 
end
 
if date then
 
if date then
self.date = string.format(" <small class='date-container'>''(<span class='date'>%s</span>)''</small>", date)
+
self.date = format("<small> %s </small>", date)
 
end
 
end
 
if args.fix and args.fix ~= '' then
 
if args.fix and args.fix ~= '' then
第402行: 第400行:  
date = args.date
 
date = args.date
 
elseif args.time and args.time ~= '' then
 
elseif args.time and args.time ~= '' then
date = lang:formatDate('Y年n月', args.time)
+
date = lang:formatDate('Y年n月', time)
sortDay = lang:formatDate('j', args.time)
+
sortDay = lang:formatDate('j', time)
 
sortDay = tonumber(sortDay)
 
sortDay = tonumber(sortDay)
 
sortDay = dayName[sortDay]
 
sortDay = dayName[sortDay]
第602行: 第600行:  
:tag('div')
 
:tag('div')
 
:css('text-align', 'center')
 
:css('text-align', 'center')
:wikitext(format(' 訊息框使用無效的「type=%s」參數,需要修復。', self.type or ''))
+
:wikitext(format(' 訊息框使用無效的「type=%s」參數,需要修復。', self.type or ''))
 
end
 
end
  
匿名用户

导航菜单