模块:AutoUGroup:修订间差异

添加452字节 、​ 2024年2月9日 (星期五)
// Edit via Wikiplus
无编辑摘要
(// Edit via Wikiplus)
 
(未显示1个用户的3个中间版本)
local p = {}
 
local function genGroupWT(group,useIcon,useCat)
local res=""
if(useIcon) then
end
res=res.."[["..group.link.."|"..group.name.."]]"
if(args[1]==niluseCat) then
res=res.."[[Category:"..group.cat.."]]"
end
return res
end
 
function p.group(frame)
local icon
local cat
local args = require('Module:Arguments').getArgs(frame)
local icon = yesnoif(args[2"icon"],true==nil) then
icon = true
if(args[1]==nil) then
else
icon = yesno(args["icon"],true)
end
if(args["cat"]==nil) then
cat = true
else
cat = yesno(args["cat"],true)
end
if(args[1]==nil and cat) then
return "[[分类:模板参数填写错误的条目]]"
end
for txtk,txtv in ipairs(gv.str) do
if(txtv==args[1]) then
return genGroupWT(gv,icon,cat)
end
end
end
if(cat) then
return args[1].."[[分类:模板参数填写错误的条目]]"
else
return ""
end
end
 
function p.raw(frame)
local args = require('Module:Arguments').getArgs(frame)
for gk,gv in ipairs(map) do
for txtk,txtv in ipairs(gv.str) do
if(txtv==args[1]) then
return gv.name
end
end
end
return args[1].."[[分类:模板参数填写错误的条目]]"
end
 
巡查员
1,454

个编辑