Module talk:WikidataIB: Difference between revisions

Content deleted Content added
Tags: Mobile edit Mobile web edit Reply
 
(22 intermediate revisions by 10 users not shown)
Line 1:
{{Permanently protected}}
{{WPBS|
{{WikiProject Wikidata}}
}}
{{banner holder|text=Page history|1=
{{oldtfdfull|date= 2020 September 15 |result=keep |disc=Module:Wikidata Infobox}}
}}
{{to-do|collapsed=yes}}
{{archives|search=yes}}
{{User:MiszaBot/config
|archiveheader = {{talkarchivenav}}
Line 10 ⟶ 17:
|archive = Module talk:WikidataIB/Archive %(counter)d
}}
{{oldtfdfull|date= 2020 September 15 |result=keep |disc=Module:Wikidata Infobox}}
{{archives|search=yes}}
 
==Multiple qualifiers==
== Pulling structured data from Commons ==
Is there a way to usefilter anya value,property likewith inmany modulevalues Wdby two or more qualifiers? [[User:PonorSerresmap|PonorSerresmap]] ([[User talk:PonorSerresmap|talk]]) 18:00:18, 210 JuneApril 20232024 (UTC)
 
:@[[User:Serresmap|Serresmap]]: I don't think so. I recommend using [[Module:Wd]] instead, e.g. <code><nowiki>{{#invoke:wd|properties|Q55|P7295|P518=Q762943|P1365=Q11184}}</nowiki></code>. [[User:LennardHofmann|LennardHofmann]] ([[User talk:LennardHofmann|talk]]) 12:55, 12 April 2024 (UTC)
Is there an equivalent to this module to retrieve structured data from a file on wikimedia commons? E.g. [[c:File:Inhibition_mechanism_(irreversible).svg|this file]] should have P275 = Q20007257. Any ideas? [[User:Evolution and evolvability|T.Shafee(Evo<small>&#38;</small>Evo)]]<sup>[[User talk:Evolution and evolvability|talk]]</sup> 06:29, 10 March 2023 (UTC)
 
==Option to get 'raw value'==
== value instead of Qid in qvalue ==
There should be an option to get '''raw value''' of a wikidata item using this module, similar to what we get from {{code|{{wikidata{{!}}property{{!}}raw{{!}}...}}}}.
 
Absence of this option makes the template difficult to be used in infoboxes which require some wikidata property of a wikidata item which in turn is specified by some property of the given {{para|qid}}.
With module [[:Module:Wd|Wd]] it's possible to do this (for ''total revenue'' in [[:d:Q30288051]]):
*<nowiki>{{#invoke:Wd|property|eid=Q30288051|P2139|P585=2017}}</nowiki> → {{#invoke:Wd|property|eid=Q30288051|P2139|P585=2017}}
but module WikidataIB only takes qualifier ID for qvalue so the following does not work
*<nowiki>{{#invoke:WikidataIB |getValueByQual |qid=Q30288051 |P2139 |qualID=P585 |qvalue=2017}}</nowiki> → {{#invoke:WikidataIB |getValueByQual |qid=Q30288051 |P2139 |qualID=P585 |qvalue=2017}}
Is there a way to use any value, like in module Wd? [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 18:00, 2 June 2023 (UTC)
 
This is necessary in order to comply with [[Wikipedia:Wikidata/2018 Infobox RfC | this RFC]] and [[Wikipedia:Wikidata#Appropriate_usage_in_articles|this list of RFCs]] which make it mandatory to use {{tl|Wdib}} with {{para|osd|true}} in infoboxes.
:@[[User:Ponor|Ponor]]: There is a comment in the code that says "We'll only deal with wikibase-items and strings for now". Checking whether a given date string (e.g. "2017") matches a [https://doc.wikimedia.org/Wikibase/master/php/docs_topics_json.html#json_datavalues_time Wikidata time value] is non-trivial, so I don't expect that getValueByQual will support the <code>time</code> datatype any time soon. [[User:LennardHofmann|LennardHofmann]] ([[User talk:LennardHofmann|talk]]) 18:59, 2 June 2023 (UTC)
 
An example requirement is {{para|mla}} of {{tl|Infobox Indian Constituency (wd)}}. [[User Talk:Riteze|<span style="color:green;">Riteze</span>]] 08:19, 4 March 2025 (UTC)
== Possible bug ==
 
== open and close quotation mark ==
I think <code><nowiki>{{wdib|P38|qid=Q30|sn=true|noicon=true|osd=no|fwd=ALL}}</nowiki></code> should output "[[United States dollar|US dollar]]", not "[[United States dollar]]" (as it does now), because <code>sn=true</code> was given. Is it a bug? [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 08:20, 8 July 2023 (UTC)
 
:@Many of [[User:Janhrach|JanhrachQuotation mark]]:s Fixedhave withopening [[Special:Diff/1164512594|thisand edit]]closing, so both open and close quotation mark should be able to specified in [[Module:WikidataIB/sandboxtitleformats|/titleformats]]. In the meantime, use {{para|shortname}} instead of {{para|sn}}. [[User:LennardHofmannFlatLanguage|LennardHofmannFlatLanguage]] ([[User talk:LennardHofmannFlatLanguage|talk]]) 1518:3354, 926 JulyMarch 20232025 (UTC)
::{{ping|LennardHofmann}}Please Thanksee you[[MOS:CURLY]]. [[User:JanhrachJonesey95|JanhrachJonesey95]] ([[User talk:JanhrachJonesey95|talk]]) 1501:5057, 927 JulyMarch 20232025 (UTC)
::/titleformats is for i18n, so projects other than enwiki should be considered. --[[User:FlatLanguage|FlatLanguage]] ([[User talk:FlatLanguage|talk]]) 01:59, 27 March 2025 (UTC)