MediaWiki talk:Gadget-GlobalUsageUI.js
This script, GlobalUsageUI, is a JavaScript gadget which can be enabled or disabled in your Preferences. The documentation page is located at Help:Gadget-GlobalUsageUI. The discussion page is located at MediaWiki talk:Gadget-GlobalUsageUI.js. |
i18n | Gadget translations:
missing or unrecognised i18n type |
Simple version
[edit]Can this tool also only display this on Special:GlobalUsage (example)!? Or should this be an new extra gadget? @Rillke: ↔ User: Perhelion (Commons: = crap?) 21:58, 11 May 2015 (UTC)
- If it would only display on Special:GlobalUsage, it would be completely useless. Did you gasp what this gadget does? If not, have a look at its documentation. -- Rillke(q?) 22:06, 11 May 2015 (UTC)
- Hm (yes it can be I miss something)? Can you quick say me the count of the given example?
- PS: I see now there seems a max limit of this tool by 36!? ↔ User: Perhelion (Commons: = crap?) 22:29, 11 May 2015 (UTC) ↔ User: Perhelion (Commons: = crap?) 22:35, 11 May 2015 (UTC)
- Ah, sorry. The point is that you have a gallery and see which images are used (this is also why a limit is in place and because it should be quick). It is not for finding out how much in use a file is you found through e.g. google search. Perhaps it should be renamed. Feel free to suggest a better name. For a display on Special:GlobalUsage, just use MediaWiki:Gadget-GlobalUsage.js
mw.loader.using('ext.gadget.GlobalUsage', function () { window.mw.libs.GlobalUsage().query({ 'File:Test.svg': undefined }).done(function (status, result) { console.log('GlobalUsage> DONE!', arguments); console.log(result['File:Test.svg']); }); });
- So this would be an extra-gadget but it won't be super-helpful because currently it would only check for the first 36 usages (there is no API, AFAIR, to obtain counts only) in case of one file. In order to code this efficiently, you need a query service at Toollabs. If you like, I can set up one on expose-data. -- Rillke(q?) 22:42, 11 May 2015 (UTC)
- Oh okay (yes I'm very new to this tool sorry), now I see this also in categories, with some images 340+. So the limit seems sporadically!? Yes a tool would be helpful, I wondering because some people can say her personal imagecount-usage (I mean I saw such tool from Magnus Manske [1] I also very wondering that the tools at Toollabs/?list are not linked!?) and other single-image global-usage count!? Thanks for you hints. ↔ User: Perhelion (Commons: = crap?) 22:49, 11 May 2015 (UTC)
- The limit is calculated. The issue is that you can't limit global usage entries for a single file. So if you query, let's say 30 files and file one has 300 global usages, and you have limited to 300, no global usage information would be returned for the remaining images, or they would need an extra-query. This is why I decided to add some heuristic calculations that allow fast determination for a huge set of files like big galleries (VisualFileChange, Commons:MyGallery, categories).
- I wondering because some people can say her personal imagecount-usage – not sure what you want to say here and in the next sentences. Can you elaborate? Have a good night. -- Rillke(q?) 23:16, 11 May 2015 (UTC)
- Ok, sorry my English seems not the best, thank you.
- Ich meinte, dass man mit Gadget-Glamorous die Benutzung aller Dateien eines Benutzers aufzählen lassen kann (also muss es auch für Einzelne gehen). Ich habe mal File:Wikipedia-W-bold-in-square-Clean.svg unter (any namespace) eingetragen und bekomme aber leider einen Count für 3 Bilder :-/ "649461 Distinct images used 3"
- Des Weiteren habe ich mich muckiert über die "Text"-Liste (ohne Links) der Tools auf toollabs:.
- Da muss es doch was geben!? LG ↔ User: Perhelion (Commons: = crap?) 07:29, 12 May 2015 (UTC)
- Oh okay (yes I'm very new to this tool sorry), now I see this also in categories, with some images 340+. So the limit seems sporadically!? Yes a tool would be helpful, I wondering because some people can say her personal imagecount-usage (I mean I saw such tool from Magnus Manske [1] I also very wondering that the tools at Toollabs/?list are not linked!?) and other single-image global-usage count!? Thanks for you hints. ↔ User: Perhelion (Commons: = crap?) 22:49, 11 May 2015 (UTC)
Include local usage?
[edit]Would it be possible to tweak this so it includes local usage on Commons as well? Optimist on the run (talk) 18:07, 25 January 2016 (UTC)
Localized usage
[edit]Hi ! I would really like to be able to configure this tool to have a by-project usage, on top of the global usage. Ideally, instead of having just "8" in red background for global usage, I would have "2" in blue background for usage on fr-wikipedia, "1" on green background for usage on wikidata, and "8" for usage globally. We would thus need to configure the pairs project/color for each user :) Léna (talk) 13:58, 27 September 2016 (UTC)
Not working
[edit]This stopped working today all of a sudden, any clues what went wrong @Rillke: or @Magog the Ogre: ? --Stemoc 04:31, 11 May 2017 (UTC)
- Yes indeed, I guess it is the removed jQuery.tipsy Modul, which need a replacement. (@Krinkle: ?) -- User: Perhelion 14:10, 11 May 2017 (UTC)
- Done It seems the following maintenance edit from Krinkle fixed it for me. Thank you -- User: Perhelion 00:43, 12 May 2017 (UTC)
Not working for me as of now --Herzi Pinki (talk) 19:11, 17 May 2017 (UTC)
- click on question mark has no effect, @Krinkle and Magog the Ogre: --Herzi Pinki (talk) 21:47, 17 May 2017 (UTC)
- I broke it, my bad. I believe it's fixed now. Magog the Ogre (talk) (contribs) 04:16, 18 May 2017 (UTC)
- You fixed it, your good :-) (and fast) thanks, it's working again. --Herzi Pinki (talk) 05:22, 18 May 2017 (UTC)
- I broke it, my bad. I believe it's fixed now. Magog the Ogre (talk) (contribs) 04:16, 18 May 2017 (UTC)
Currently broken. The badges with numbers of usages are displayed, but mouseover no longer provides details. --A.Savin 12:04, 1 December 2017 (UTC)
- I can confirm this as well. Jean-Fred (talk) 16:20, 1 December 2017 (UTC)
- +1 --Herzi Pinki (talk) 15:04, 2 December 2017 (UTC)
- +1 Gruss --Nightflyer (talk) 19:34, 5 December 2017 (UTC)
- @Zhuyifei1999 and Krinkle: The replaced badge module is not the same (now there are 3 options and some other class-names). That's the problem here. So the question is, should we adjust the module or the scripts!? -- User: Perhelion 14:16, 6 December 2017 (UTC)
- PS: new, old: (ping only @Kaldari: ) -- User: Perhelion 14:21, 6 December 2017 (UTC)
- I'd say adjust GlobalUsageUI or any other script that uses jquery.badge, and keep jquery.badge up to date. The old version is, well, old... --Zhuyifei1999 (talk) 15:02, 6 December 2017 (UTC)
- OK I updated some. A small problem left, it seems the GlobalUsage-lib can't recognize an existing zero display option (so I made it default as some requested[2]). -- User: Perhelion 15:15, 6 December 2017 (UTC)
- I'd say adjust GlobalUsageUI or any other script that uses jquery.badge, and keep jquery.badge up to date. The old version is, well, old... --Zhuyifei1999 (talk) 15:02, 6 December 2017 (UTC)
- PS: new, old: (ping only @Kaldari: ) -- User: Perhelion 14:21, 6 December 2017 (UTC)
partly not working
[edit]File:Redox reaction.png at the moment in Top 200 chemistry images that should use vector graphics
the global usage for this file is 42 at the moment - the gadget (red box) counts 0
in this site the usage is counted also from a bot (in description for each file) - this is a good way to test the gadget
bot: Commons:Bots/Requests/AntiCompositeBot
greets --Mrmw (talk) 10:05, 13 January 2020 (UTC)
- Probably same problem for File:Codc.png, which is used (transcluded) in User:Codc/codcf10 and consequently hundreds of pages, but the gadget shows 0. RoyZuo (talk) 09:24, 12 October 2024 (UTC)
Videos
[edit]Hello, the gadget doesn't work with videos. Eg. Category:Firefighting in Geneva. Pyb (talk) 11:48, 25 April 2020 (UTC)
Usage in other wikis
[edit]How do I use this gadget in other Wikimedia projects, for example: English Wikipedia? --Sreejith K (talk) 20:09, 11 June 2021 (UTC)
- @Sreejithk2000 i guess you need to copy it over there and make some localisation code changes. RoyZuo (talk) 09:22, 12 October 2024 (UTC)