MediaWiki talk:Gadget-EasyQuery.js
Please rename columns in query to something like this: SELECT%20%3Fitem%20%28%3FitemLabel%20as%20%3Flabel%20%29%20%3Fimage%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3A%27%20%2B%20pid%20%2B%20%27%20wd%3A%27%20%2B%20qid%20%2B%20%27.%0A%20%20%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%27%20%2B%20mw.config.get%28%20%27wgUserLanguage%27%20%29%20%2B%20%27%22.%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP18%20%3Fimage.%20%7D%0A%7D%0ALIMIT%20100
@Ladsgroup: --Jonas Kress (WMDE) (talk) 11:04, 22 July 2016 (UTC)
Use wikibase-snakview-indicators
[edit]Now that the dedicated wikibase-snakview-indicators
area has been deployed, I suggest that this gadget should be updated to use it, by changing line 108 from
createPopupAndAddIcon( this, url, 'More "' + pLabelTemp + '" "'+ qLabel + '"', '"' + pLabelTemp + '" "'+ qLabel + '"' );
to
createPopupAndAddIcon( $( this ).siblings( '.wikibase-snakview-indicators' ), url, 'More "' + pLabelTemp + '" "'+ qLabel + '"', '"' + pLabelTemp + '" "'+ qLabel + '"' );
(perhaps with some refactoring, e. g. extract $( this ).siblings( … )
to a variable). This would fix this gadget’s equivalent of phabricator:T167869.
It’s probably prudent to wait a bit with this change, just in case Wikidata needs to be rolled back to an earlier software version for build-related reasons. There’s also a minor remaining bug (see comment) which should be fixed soon. --Lucas Werkmeister (WMDE) (talk) 18:28, 22 November 2017 (UTC)
- So
wikibase-snakview-indicators
has been available for some time now, and the remaining bug is fixed as well… does anyone want to make this edit? I tried it out (manually running the updated version), and it works and fixes phabricator:T167869 as expected. --Lucas Werkmeister (WMDE) (talk) 17:12, 30 January 2018 (UTC)- Done, use
{{Edit request}}
next time to gain attention. :) Sjoerd de Bruin (talk) 17:31, 30 January 2018 (UTC)- Thanks! And good to know (though Template:edit request/doc is more confusing than enlightening :P ) --Lucas Werkmeister (WMDE) (talk) 18:01, 30 January 2018 (UTC)
- Done, use
Discussion on project chat
[edit]{{Editrequest}}
@Lucas Werkmeister (WMDE):
Please see Wikidata:Project_chat/Archive/2021/03#easy_SPARQL_wrapper and changes suggest by @Tagishsimon:. --- Jura 13:21, 1 March 2021 (UTC)
- You pinged the wrong person – I’m not an interface administrator. --Lucas Werkmeister (WMDE) (talk) 13:41, 1 March 2021 (UTC)
- Looking at Special:ListGroupRights, I suppose you could. Maybe @Nikki:? --- Jura 14:02, 1 March 2021 (UTC)
- @Jura1@Lucas Werkmeister (WMDE)@Tagishsimon @Nikki could we solve this forgotten edit request? Estopedist1 (talk) 15:39, 29 August 2022 (UTC)
- (I’m still not an interface administrator.) Lucas Werkmeister (WMDE) (talk) 16:23, 29 August 2022 (UTC)
- @Jura1@Lucas Werkmeister (WMDE)@Tagishsimon @Nikki could we solve this forgotten edit request? Estopedist1 (talk) 15:39, 29 August 2022 (UTC)
- @Ymblanter, Putnik:, please, could you copy&paste User:Lockal/Gadget-EasyQuery.js into MediaWiki:Gadget-EasyQuery.js? I've rewrote this gadget and fixed multiple problems:
- Removed optional ?_image as useless and harmful when item has multiple values
- Added descriptions instead
- Fixed timeouts for very basic cases like P31=Q5
- Added fallback languages
- Fixed a problem hardcoded zero in
entityData.claims[ pidTemp ][ 0 ].mainsnak
, so now it works correctly with multiple values
- thx! --Lockal (talk) 14:49, 11 February 2023 (UTC)
- I do not mind but this is a big deal, so I would like to hear a couple of more tech-oriented users that this is fine. Ymblanter (talk) 15:23, 11 February 2023 (UTC)
- Done I think it is fine. --Matěj Suchánek (talk) 11:30, 3 December 2023 (UTC)
Modification suggested
[edit]Hello, for some reasons about this useful quick-gadget, I'd like to request these suggestions :
- remove the P18 from the query
- remove
?item rdfs:label ?label
- instead, write
?itemLabel, ?itemDescription
for the default SPARQL code
- instead, write
- For identifiers, there is no button available, they appear only on normal properties. Make easyqueries available for identifiers Bouzinac 💬●✒️●💛 17:28, 31 July 2023 (UTC)