وحدة:Wikidata2 sub modules/P1923/ملعب
![]() | هذه صفحة ملعب الوحدة لصفحة وحدة:Wikidata2 sub modules/P1923 (فرق). |
- قالب:فريق مشارك من ويكي بيانات
|claim-function=foot
الاستخدام
عدلمثال1
عدلكالتالي، أو بدون القيمة الأولى إذا كان في نفس المقالة:
{{فريق مشارك من ويكي بيانات|Q700477}}
الناتج:
المركز | فريق | لعب | ف | ت | خ | له | عليه | ف.أ | نقاط | ملاحظة |
---|---|---|---|---|---|---|---|---|---|---|
1 | فيردر بريمن | 34 | 22 | 8 | 4 | 61 | 22 | +39 | 52 | |
10 | هانوفر 96 | 34 | 12 | 7 | 15 | 59 | 60 | -1 | 31 | |
11 | نادي أوردينغن 05 | 34 | 11 | 9 | 14 | 59 | 61 | -2 | 31 | |
12 | نادي بوخوم | 34 | 10 | 10 | 14 | 47 | 51 | -4 | 30 | |
13 | بوروسيا دورتموند | 34 | 9 | 11 | 14 | 51 | 54 | -3 | 29 | |
14 | نادي كايزرسلاوترن | 34 | 11 | 7 | 16 | 53 | 62 | -9 | 29 | |
15 | نادي كارلسروه | 34 | 9 | 11 | 14 | 37 | 55 | -18 | 29 | |
16 | فالدهوف مانهايم | 34 | 7 | 14 | 13 | 35 | 50 | -15 | 28 | |
17 | نادي هامبورغ 08 | 34 | 7 | 10 | 17 | 37 | 70 | -33 | 24 | هبط إلى الدوري الألماني الدرجة الثانية 1987–88 |
18 | شالكه 04 | 34 | 8 | 7 | 19 | 48 | 84 | -36 | 23 | هبط إلى الدوري الألماني الدرجة الثانية 1987–88 |
2 | بايرن ميونخ | 34 | 22 | 4 | 8 | 83 | 45 | +38 | 48 | |
3 | نادي كولن | 34 | 18 | 12 | 4 | 57 | 28 | +29 | 48 | |
4 | نادي شتوتغارت | 34 | 16 | 8 | 10 | 69 | 49 | +20 | 40 | |
5 | نادي نورنبرغ | 34 | 13 | 11 | 10 | 44 | 40 | +4 | 37 | |
6 | نادي هامبورغ | 34 | 13 | 11 | 10 | 63 | 68 | -5 | 37 | |
7 | بوروسيا مونشنغلادباخ | 34 | 14 | 5 | 15 | 55 | 53 | +2 | 33 | |
8 | باير 04 ليفركوزن | 34 | 10 | 12 | 12 | 53 | 60 | -7 | 32 | |
9 | آينتراخت فرانكفورت | 34 | 10 | 11 | 13 | 51 | 50 | +1 | 31 |
مثال2
عدل{{فريق مشارك من ويكي بيانات|Q113514522}}
الناتج:
المركز | فريق | لعب | ف | ت | خ | له | عليه | ف.أ | نقاط | ملاحظة |
---|---|---|---|---|---|---|---|---|---|---|
1 | باير 04 ليفركوزن | 34 | 28 | 6 | 0 | 89 | 24 | +65 | 90 |
مع امكانية ظهور الأخطاء
عدل{{#invoke:Wikidata2|formatStatements|property-function=foot|reff=reff|conjunction=|property=P1923|property-module=Wikidata2 sub modules/P1923|sortbynumber=inverted|sortingproperty=P1352|template=فريق مشارك من ويكي بيانات/نواة|_table_=1|Q8=P1358|entityId=Q113514522|noref=true|Q7=P1359|Q5=P1356|Q4=P1357|illwd2=t|Q6=P1351|separator=|Q3=P1355|Q2=P1350|Q1=P1352|use_en_labels=t}}
←
المركز | فريق | لعب | ف | ت | خ | له | عليه | ف.أ | نقاط | ملاحظة |
---|---|---|---|---|---|---|---|---|---|---|
1 | باير 04 ليفركوزن | 34 | 28 | 6 | 0 | 89 | 24 | +65 | 90 |
|
local p = {}
local Module_sortclaims
local sandbox = "ملعب"
local sandbox_added = ""
if nil ~= string.find(mw.getCurrentFrame():getTitle(), sandbox, 1, true) then
sandbox_added = "/" .. sandbox
end
local function is_valid(x)
if x and x ~= nil and x ~= "" then return x end
return nil
end
local function qua(p, qualifiers)
local vvv
if is_valid(p) then
vvv = formatStatements({
property = p,
enlabelcate = "t",
modifytime = "longdate",
noref = "t"
}, qualifiers) or ""
return vvv
end
end
local function format_One_Statement(statement, options)
if statement.type ~= "statement" then
return ""
end
local stat = formatSnak(statement.mainsnak, options)
if not is_valid(stat.value) then
return ""
end
if is_valid(stat) then
if statement.qualifiers then
stat.ID = statement.mainsnak.datavalue.value.id
for i = 1, 10 do
stat["QQ" .. i] = qua(options["Q" .. i], statement.qualifiers)
end
end
end
return mw.getCurrentFrame():expandTemplate {
title = options.template,
args = {
stat.QQ1, stat.value, stat.QQ2, stat.QQ3, stat.QQ4, stat.QQ5, stat.QQ6, stat.QQ7, stat.QQ8, stat.QQ9, stat.QQ10,
entityId = options.entityId, v1 = options.v1, id = stat.ID
}
}
end
function p.foot(claims, options)
local tab = {}
if Module_sortclaims == nil then
Module_sortclaims = require("Module:Wikidata2/sort_claims" .. sandbox_added)
end
if is_valid(options.sortingproperty) and Module_sortclaims.sorting_methods[options.sortbynumber] then
claims = Module_sortclaims.sortbyqualifiernumber(claims, {}, options.sortingproperty, options.sortbynumber)
end
if claims then
for i, statement in pairs(claims) do
options.num = i
local va = format_One_Statement(statement, options)
if va then
table.insert(tab, va)
end
end
end
local tot = mw.text.listToText(tab, options.separator, options.conjunction)
return tot
end
return p