更改

跳到导航 跳到搜索
添加1,095字节 、 2021年7月4日 (日) 14:14
建立内容为“local SMWUtils = require("Module:SMWUtils") local p = {} function _other_maintainers(frame, other_maintainers) local node = mw.html.create(nil) node:wiki…”的新页面
local SMWUtils = require("Module:SMWUtils")
local p = {}

function _other_maintainers(frame, other_maintainers)
local node = mw.html.create(nil)
node:wikitext("合作维护者: ")
for i, m in ipairs(other_maintainers) do
node:wikitext("[[User:"..m.."|"..m.."]]")
node:wikitext("[[Category:由"..m.."维护的条目]]")
_set_editable_by_user(m)
mw.smw.set({
['维护者'] = ("User:"..m)
})
end
local res = node:done()

end

function _maintainer_only(frame, maintainer)
mw.smw.set({
['Editable by'] = 'whitelist'
})
return frame:expandTemplate{title = "本页面仅允许维护者编辑", args = {}}
end

function p.renderCreator(frame)
local title = frame:getTitle()
local prop_names = {"维护者", "创作者", "设定类型", "设定集核心页", "依赖设定集", "仅允许维护者编辑", "创作阶段", "上级概念", "前置条件", "事后效果"}
local props = SMWUtils.query_page_properties("[["..title.."]]", prop_names)
return mw.text.jsonEncode(props)
end

return p

导航菜单