وحدة:Wikibase
هذه الوحدة تم نسخها من المثال من صفحة توثيق الوحدة في mw:Extension:Wikibase Client/Lua. ويجب أن تبقى متسقة مع تلك الصفحة.
الاستخدام
عدل- معرف
{{#invoke: Wikibase | id }}
- تسمية
{{#invoke: Wikibase | label }}
{{#invoke: Wikibase | label | entity id (Q# or P#) }}
- وصف
{{#invoke: Wikibase | description }}
{{#invoke: Wikibase | description | entity id (Q# or P#) }}
- صفحة
{{#invoke: Wikibase | page }}
{{#invoke: Wikibase | page | item id (Q#) }}
- نوع البيانات
{{#invoke: Wikibase | datatype | property id (P#) }}
أمثلة
عدلمعرف
عدل{{#invoke:Wikibase | id }}
ينتج ← Q8565357
تسمية
عدل{{#invoke:Wikibase | label }}
ينتج ← وحدة:Wikibase{{#invoke:Wikibase | label | Q132689 }}
ينتج ← كازبلانكا{{#invoke:Wikibase | label | P31 }}
ينتج ← نموذج من
وصف
عدل{{#invoke:Wikibase | description }}
ينتج ← وحدة{{#invoke:Wikibase | description | Q132689 }}
ينتج ← فيلم أُصدر سنة 1942، من إخراج مايكل كورتيز و تم تصويره في مدينة الدار البيضاء بالمغرب{{#invoke:Wikibase | description | P31 }}
ينتج ← صفة نوعية مميزة للغرض والتي يمكن القول أن هذا الغرض مثال عنه. ويجب أن لا يتم الخلط بينه وبين الخاصية: P279 (نوع فرعي من)
صفحة
عدل{{#invoke:Wikibase | page }}
ينتج ← وحدة:Wikibase{{#invoke:Wikibase | page | Q132689 }}
ينتج ← كازبلانكا (فيلم 1942)
نوع البيانات
عدلملف وسائط من كومنز: الصورة (P18)
{{#invoke:Wikibase | datatype | P18 }}
ينتج ← commonsMedia{{#invoke:Wikibase | datatype | Property:P18 }}
ينتج ← commonsMedia
إحداثيات جغرافية: الإحداثيات (P625)
{{#invoke:Wikibase | datatype | P625 }}
ينتج ← globe-coordinate{{#invoke:Wikibase | datatype | Property:P625 }}
ينتج ← globe-coordinate
عنصر: رئيس الحكومة (P6)
{{#invoke:Wikibase | datatype | P6 }}
ينتج ← wikibase-item{{#invoke:Wikibase | datatype | Property:P6 }}
ينتج ← wikibase-item
خاصية: خاصية فرعية من (P1647)
{{#invoke:Wikibase | datatype | P1647 }}
ينتج ← wikibase-property{{#invoke:Wikibase | datatype | Property:P1647 }}
ينتج ← wikibase-property
نص: الاسم العلمي للأصنوفة (P225)
{{#invoke:Wikibase | datatype | P225 }}
ينتج ← string{{#invoke:Wikibase | datatype | Property:P225 }}
ينتج ← string
نص بلغة وحيدة: الاسم الرسمي (P1448)
{{#invoke:Wikibase | datatype | P1448 }}
ينتج ← monolingualtext{{#invoke:Wikibase | datatype | Property:P1448 }}
ينتج ← monolingualtext
كمية: عدد السكان (P1082)
{{#invoke:Wikibase | datatype | P1082 }}
ينتج ← quantity{{#invoke:Wikibase | datatype | Property:P1082 }}
ينتج ← quantity
نقطة زمنية: تاريخ الميلاد (P569)
{{#invoke:Wikibase | datatype | P569 }}
ينتج ← time{{#invoke:Wikibase | datatype | Property:P569 }}
ينتج ← time
المسار: الموقع الرسمي (P856)
{{#invoke:Wikibase | datatype | P856 }}
ينتج ← url{{#invoke:Wikibase | datatype | Property:P856 }}
ينتج ← url
تعبير رياضي: تعريف الصيغة (P2534)
{{#invoke:Wikibase | datatype | P2534 }}
ينتج ← math{{#invoke:Wikibase | datatype | Property:P2534 }}
ينتج ← math
معرف خارجي: رقم الكتاب المعياريُّ الدَّوليُّ ثلاثة العشريِّ (ISBN-13) (P212)
{{#invoke:Wikibase | datatype | P212 }}
ينتج ← external-id{{#invoke:Wikibase | datatype | Property:P212 }}
ينتج ← external-id
---------- Module:Wikibase ----------------local p = {}function p.getEntityObject(id)if not mw.wikibase then return nil endentity = mw.wikibase.getEntityObject(id)return entityend-- Return the item ID of the item linked to the current page.function p.id(frame)if not mw.wikibase then return nil endentity = mw.wikibase.getEntityObject()if entity == nil thenreturn "no entity"endreturn entity.idend-- 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 not mw.wikibase then return nil endif frame.args[1] == nil thenentity = mw.wikibase.getEntityObject()if not entity then return nil endid = entity.idelseid = mw.text.trim(frame.args[1])endreturn 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 not mw.wikibase then return nil endif frame.args[1] == nil thenentity = mw.wikibase.getEntityObject()if not entity then return nil endid = entity.idelseid = mw.text.trim(frame.args[1])endreturn 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 not mw.wikibase then return nil endif frame.args[1] == nil thenentity = mw.wikibase.getEntityObject()if not entity then return nil endid = entity.idelseid = mw.text.trim(frame.args[1])endreturn mw.wikibase.sitelink( id )end-- Return the data type of a propertyfunction p.datatype(frame)if not mw.wikibase then return nil endif frame.args[1] and string.find(frame.args[1], "Property:P") thenif mw.wikibase.getEntityObject(string.gsub(frame.args[1], "Property:P", "P")) thenreturn mw.wikibase.getEntityObject(string.gsub(frame.args[1], "Property:P", "P") ).datatypeendelseif frame.args[1] and string.find(frame.args[1], "P") thenif mw.wikibase.getEntityObject(frame.args[1]) thenreturn mw.wikibase.getEntityObject(frame.args[1]).datatypeendendendreturn p
🔥 Top keywords: الصفحة الرئيسةخاص:بحثتصنيف:أفلام إثارة جنسيةعيد الغديركندة علوشبطولة أمم أوروبا 2024بطولة أمم أوروباملف:Arabic Wikipedia Logo Gaza (3).svgحديث الغديرصالح زين العابدين الشيبيسدانة الكعبةتصنيف:ممثلات إباحيات أمريكياتتيد بنديمجزرة مستشفى المعمدانيداغستانيوتيوبتصنيف:أفلام إثارة جنسية أمريكيةصلاة الاستخارةجمال موسيالاميا خليفةجمال السلاميعمرو يوسفكليوباتراكريستيانو رونالدوالصفحة الرئيسيةعلي بن أبي طالبعملية طوفان الأقصىتصنيف:أفلام إثارة جنسية عقد 2020متلازمة XXXXولاد رزق (فيلم)موجة الوفيات خلال موسم الحج 2024ماسونيةكوبا أمريكاكوبا أمريكا 2024محمدقائمة أسماء الأسد في اللغة العربيةقائمة حلقات المحقق كونانليونيل ميسيأسماء الله الحسنى