<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Modul:WikidataIdentifiers - Oʻzgarishlar tarixi</title>
		<link>https://ziyosfera.uz/index.php?title=Modul:WikidataIdentifiers&amp;action=history</link>
		<description>Ziyosferadagi mazkur sahifaning oʻzgarishlar tarixi</description>
		<language>uz</language>
		<generator>MediaWiki 1.45.1</generator>
		<lastBuildDate>Wed, 18 Nov 2026 06:11:37 GMT</lastBuildDate>
		<item>
			<title>Admin 23:57, 2026-yil 20-avgust da</title>
			<link>https://ziyosfera.uz/index.php?title=Modul:WikidataIdentifiers&amp;diff=995811&amp;oldid=prev</link>
			<guid isPermaLink="false">https://ziyosfera.uz/index.php?title=Modul:WikidataIdentifiers&amp;diff=995811&amp;oldid=prev</guid>
			<description>&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Yangi sahifa&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- [zs-wikibase-guard] Ziyosfera has no Wikibase client; stub mw.wikibase so&lt;br /&gt;
-- modules reading Wikidata degrade to nil instead of erroring. Auto-added on import.&lt;br /&gt;
if not mw.wikibase then mw.wikibase = setmetatable({}, { __index = function() return function() return nil end end }) end&lt;br /&gt;
-- Functions for use in retrieving Wikidata for use in templates that deal with identifiers&lt;br /&gt;
-- getIdentifierQualifier returns the value of a qualifier for an Identifier&lt;br /&gt;
&lt;br /&gt;
p = {}&lt;br /&gt;
&lt;br /&gt;
-- getIdentifierQualifier returns the value of a qualifier for an Identifier&lt;br /&gt;
-- such as &amp;#039;Art UK artist ID&amp;#039;, P1367&lt;br /&gt;
-- the assumption is that one value exists for the property&lt;br /&gt;
-- and only one qualifier exists for that value&lt;br /&gt;
-- Constraint violations for P1367 are at:&lt;br /&gt;
-- https://www.wikidata.org/wiki/Wikidata:Database_reports/Constraint_violations/P1367#Single_value&lt;br /&gt;
p.getIdentifierQualifier = function(frame)&lt;br /&gt;
	local propertyID = mw.text.trim(frame.args[1] or &amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	-- The PropertyID of the qualifier&lt;br /&gt;
	-- whose value is to be returned is passed in named parameter |qual=&lt;br /&gt;
	local qualifierID = frame.args.qual&lt;br /&gt;
	&lt;br /&gt;
	-- Can take a named parameter |qid which is the Wikidata ID for the article.&lt;br /&gt;
	-- This will not normally be used because it&amp;#039;s an expensive call.&lt;br /&gt;
	local qid = frame.args.qid&lt;br /&gt;
	if qid and (#qid == 0) then qid = nil end&lt;br /&gt;
&lt;br /&gt;
	local entity = mw.wikibase.getEntityObject(qid)&lt;br /&gt;
	local props&lt;br /&gt;
	if entity and entity.claims then&lt;br /&gt;
		props = entity.claims[propertyID]&lt;br /&gt;
	end&lt;br /&gt;
	if props then&lt;br /&gt;
		-- Check that the first value of the property is an external id&lt;br /&gt;
		if props[1].mainsnak.datatype == &amp;quot;external-id&amp;quot; then&lt;br /&gt;
			-- get any qualifiers of the first value of the property&lt;br /&gt;
			local quals = props[1].qualifiers&lt;br /&gt;
			if quals and quals[qualifierID] then&lt;br /&gt;
				-- check what the dataype of the first qualifier value is&lt;br /&gt;
				-- if it&amp;#039;s quantity return the amount&lt;br /&gt;
				if quals[qualifierID][1].datatype == &amp;quot;quantity&amp;quot; then&lt;br /&gt;
					return tonumber(quals[qualifierID][1].datavalue.value.amount)&lt;br /&gt;
				end&lt;br /&gt;
				-- checks for other datatypes go here:&lt;br /&gt;
				&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</description>
			<pubDate>Thu, 20 Aug 2026 23:57:18 GMT</pubDate>
			<dc:creator>Admin</dc:creator>
			<comments>https://ziyosfera.uz/ziyo/Modul_munozarasi:WikidataIdentifiers</comments>
		</item>
</channel></rss>