中文乐谱库
未登录
登录
搜索
导航
首页
最近更改
随机页面
乐谱
作曲家
所有乐谱
乐器/流派
国籍
时期
编辑
编辑作曲家
编辑乐谱
关于
捐助/支持
关于我们
成为贡献者
常见问题
工具
链入页面
相关更改
特殊页面
页面信息
页面历史
刷新页面
←
模块:Wikibase
查看“模块:Wikibase”的源代码
名字空间
模块
讨论
视图
查看
查看源代码
历史
操作
来自中文乐谱库
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
---------- Module:Wikibase ---------------- local p = {} -- Return the item ID of the item linked to the current page. function p.id(frame) if not mw.wikibase then return "无mw.wikibase" end entity = mw.wikibase.getEntityObject() if entity == nil then return "无项目" end return entity.id end -- Return the label of a given data item, or of connected page -- if no argument is provided to this method. function p.label(frame) if frame.args[1] == nil then entity = mw.wikibase.getEntityObject() if not entity then return nil end id = entity.id else id = mw.text.trim(frame.args[1]) end return mw.wikibase.label( id ) end -- Return the description of a given data item, or of connected page -- if no argument is provided to this method. function p.description(frame) if frame.args[1] == nil then entity = mw.wikibase.getEntityObject() if not entity then return nil end id = entity.id else id = mw.text.trim(frame.args[1]) end return mw.wikibase.description( id ) end -- Return the local page about a given data item, or of connected page -- if id is not specified. function p.page(frame) if frame.args[1] == nil then entity = mw.wikibase.getEntityObject() if not entity then return nil end id = entity.id else id = mw.text.trim(frame.args[1]) end return mw.wikibase.sitelink( id ) end -- Return the data type of a property function p.datatype(frame) if frame.args[1] and string.find(frame.args[1], "Property:P") then if mw.wikibase.getEntityObject(string.gsub(frame.args[1], "Property:P", "P")) then return mw.wikibase.getEntityObject(string.gsub(frame.args[1], "Property:P", "P") ).datatype end elseif frame.args[1] and string.find(frame.args[1], "P") then if mw.wikibase.getEntityObject(frame.args[1]) then return mw.wikibase.getEntityObject(frame.args[1]).datatype end end end return p
该页面使用的模板:
模块:Wikibase/doc
(
查看源代码
)
返回至
模块:Wikibase
。