跳转到内容

模組:Uses Wikidata

被永久保护的模块
维基百科,自由的百科全书

这是本页的一个历史版本,由Dabao qian留言 | 贡献2016年11月12日 (六) 08:09 (// Edit via Wikiplus)编辑。这可能和当前版本存在着巨大的差异。

local p = {}

function p.usesProperty(frame)
	local parent = frame.getParent(frame)
	local result = ''
	local ii = 1
	while true do
		local p_num = parent.args[ii] or ''
		if p_num ~= '' then
			local label = mw.wikibase.label(p_num) or "NO LABEL"
			result = result .. "<li><b>[[d:Property:" .. p_num .. "|" .. label .. " <small>(" .. string.upper(p_num) .. ")</small>]]</b>([[d:Special:WhatLinksHere/Property:" .. p_num .. "|使用情况]])</li>"
			ii = ii + 1
		else break
		end
	end
	return result
end
 
return p