Page MenuHomePhabricator

Add filter by project on Special:GlobalUsage
Open, LowPublic

Description

Author: crochet.david

Description:
In Wikimedia Commons, on Special:GlobalUsage, we can only search a file. And the result list start with an alphabetic sort list of project.

Can you add some box filter as :

"Search only in the project : (p|b|wikt|n|v|...)"
"Search only in this language : (en|fr|ar|br|...)"

Thanks

Details

Reference
bz36859
Related Gerrit Patches:
mediawiki/extensions/GlobalUsage : masterAdd filter by project on Special:GlobalUsage [WIP]
mediawiki/extensions/GlobalUsage : master[WIP] Add filter by project on Special:GlobalUsage

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:25 AM
bzimport added a project: GlobalUsage.
bzimport set Reference to bz36859.
bzimport added a subscriber: Unknown Object (MLST).

Thehelpfulonewiki wrote:

This seems like it could be a lot of extra work - the purpose of Special:GlobalUsage is to see where a file is used *globally* across the Wikimedia Foundation projects - do lots of users need to limit themselves to a particular project and language often?

Bryan.TongMinh wrote:

Due to the way that projects are named on Wikimedia, and the way that the index is built up, it would only be possible to efficiently scan by a single language (e.g., gil_wiki LIKE 'en%'), but not by project (gil_wiki LIKE '%wiktionary').

Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 5:56 PM
Restricted Application added subscribers: Steinsplitter, Matanya, Aklapper. · View Herald TranscriptSep 4 2015, 5:56 PM

I need to work on this microtask in order to work on a project (T91192). Can someone help me get started?
Am I referring to the correct link for instructions?- https://www.mediawiki.org/wiki/Extension:GlobalUsage

Hi @Saylikarnik, thanks for your interest! The link is correct. Please specify "get started" by checking https://www.mediawiki.org/wiki/Outreach_programs/Life_of_a_successful_project#Answering_your_questions for information on best audiences and good questions. Thank you! :)

What does step 2 in the installation (https://www.mediawiki.org/wiki/Extension:GlobalUsage) exactly do?
And what do I have to set $wgGlobalUsageDatabase as in my LocalSettings?

Hi I have added a input type that asks for the project name to be filtered.
What I am trying to do is for each result I check whether it is in the specified project or not.
This how it looks if the file is present in specified Project

This how it looks when file is not in specified Project

I can include Language filter by using Index as said by Bryan.TongMinh

Due to the way that projects are named on Wikimedia, and the way that the index is built up, it would only be possible to efficiently scan by a single language (e.g., gil_wiki LIKE 'en%'), but not by project (gil_wiki LIKE '%wiktionary').

Have you uploaded code for this to gerrit? If so please link.

I imagine we would probably want some sort of drop down box. Users will probably not know the db names of all the projects. On the other hand the drop down box would be huge for wmf since we have about 800 wikis, so maybe a text box is ok.

I wonder if we should just have a language selector and not the full project name (maybe as an input box that takes a comma separated list of languages, with auto-suggest js). Doing lang filtering is a bit wmf specific, but the full project filter probably isnt as useful as a language selector, as you can already get the per wiki usages by going to the image page on an individual wiki.

I didn't upload the change to gerrit as I wanted to add the language filter too.
Input box with comma separated Language filter would be nice.

Feel free to upload work in progress things in gerrit (just make sure that the commit message starts with "[WIP]" so others know its a work in progress)

Change 277503 had a related patch set uploaded (by Harjotsingh):
[WIP] Add filter by project on Special:GlobalUsage

https://gerrit.wikimedia.org/r/277503

@Bawolff I'm working on this as micro-task for T91192.I was hoping if you would mentor the project and give me some micro-tasks to get familiar with code-base.

Change 342076 had a related patch set uploaded (by Harjotsingh):
[mediawiki/extensions/GlobalUsage] Add filter by project on Special:GlobalUsage [WIP]

https://gerrit.wikimedia.org/r/342076

Change 277503 abandoned by Harjotsingh:
[WIP] Add filter by project on Special:GlobalUsage

https://gerrit.wikimedia.org/r/277503

I have done changes according to the new code.
Let me know how to proceed with this