此模块的文档可以在模块:设定页v2/doc创建
local SMWUtils = require("Module:SMWUtils") local PageName = require("Module:PageName") 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 = PageName.getPageName() local prop_names = {"维护者", "创作者", "设定类型", "设定集核心页", "依赖设定集", "仅允许维护者编辑", "创作阶段", "上级概念", "前置条件", "事后效果"} local props = SMWUtils.query_page_properties("[["..title.."]]", prop_names)[1] return mw.text.jsonEncode(props) end return p