1,501
个编辑
(自动展开 Template:仅) |
(frame不应为全局变量) |
||
第2行: | 第2行: | ||
local songlist = mad.listOf 'songs' | local songlist = mad.listOf 'songs' | ||
local songlistNS = mad.listOf('songs','ns') | local songlistNS = mad.listOf('songs','ns') | ||
local p={} | local p={} | ||
function p.main() | function p.main(frame) | ||
local dot=frame:expandTemplate {title ='·'} | |||
local categories = {'poprec', 'partner', 'original', 'variety', 'musicgames'} | local categories = {'poprec', 'partner', 'original', 'variety', 'musicgames'} | ||
local getCategory={} | local getCategory={} | ||
第63行: | 第51行: | ||
color='#84daff' | color='#84daff' | ||
} | } | ||
function expand(t) | |||
local res='' | |||
for i,v in ipairs(t) do | |||
if i~=1 then | |||
res = res .. dot | |||
end | |||
res = res .. '[[' .. mad.linkTitle(v) .. ']]' | |||
end | |||
return res | |||
end | |||
for i=1,5 do | for i=1,5 do | ||
local list='' | local list='' | ||
第71行: | 第71行: | ||
first=false | first=false | ||
end | end | ||
-- 鉴于自动展开 Template:仅 会爆炸这里手动展开 | |||
if #songs[i].mobile ~= 0 then | if #songs[i].mobile ~= 0 then | ||
if not first then list = list .. dot end | if not first then list = list .. dot end |
个编辑