跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
维基百科
搜索
搜索
外观
创建账号
登录
个人工具
创建账号
登录
查看“︁模块:Wikibase”︁的源代码
模块
讨论
English
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
页面信息
外观
移至侧栏
隐藏
←
模块: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
。
搜索
搜索
查看“︁模块:Wikibase”︁的源代码
添加话题