Wikidata
From Halal Explorer
getSiteLink for Commons
What is the syntax to get the Commons page of the article? Like {{#invoke:Wikidata|getSiteLink|enwikivoyage}}, I see enwiki and enwikiquote but what is the code for Commons page? --Traveler100 (talk) 16:39, 20 January 2018 (UTC)
- Was informed by someone at Wikipedia, is commonswiki . --Traveler100 (talk) 17:08, 20 January 2018 (UTC)
get site link from qid (i.e. not current page)
Would like to get the wikipedia page of another page that the current wikivoyage page. However what works on wikipedia does not work here. For example: {{#invoke:Wikidata|getSiteLink|enwiki|qid=Q327162}}. Is there another method or can this module be updated? --Traveler100 (talk) 13:11, 11 November 2018 (UTC)
- The code for getSiteLink was different at en.wikipedia, so I've copied over the version from wikipedia and tested and it's working now. Example: Lua error: Cannot create process: proc_open(/dev/null): Failed to open stream: Operation not permitted -- WOSlinker (talk) 13:37, 11 November 2018 (UTC)
- great, thanks.--Traveler100 (talk) 14:04, 11 November 2018 (UTC)
Single value
Would like to get one (the best) image from wikidata P18. With {{#invoke:Wikidata|getValueFromID|Q1223508 |P18|FETCH_WIKIDATA}} I get multiple values.
- Lua error: Cannot create process: proc_open(/dev/null): Failed to open stream: Operation not permitted
is there another option or a different module command that just returns one image file name?--Traveler100 (talk) 11:02, 15 January 2019 (UTC)
- Module:WikidataIB works better for this, with its maxvals parameter.
- {{#invoke:WikidataIB|getValue|P18|fwd=ALL|osd=no|noicon=true|qid=Q1223508|maxvals=1}}
- Lua error: Cannot create process: proc_open(/dev/null): Failed to open stream: Operation not permitted
- ARR8 (talk | contribs) 14:04, 15 January 2019 (UTC)