Special:LongPages seems to support only pages in the NS:0 namespace. It'd be good if it supported all namespaces and we could also sort them by namespaces as we do with, ie, Special:UnconnectedPages.
Description
Details
| Subject | Author | Repo | Branch | Lines +/- | |
|---|---|---|---|---|---|
| feat: add filter to Short and Long Pages | Kooogi | mediawiki/core | master | +56 -4 |
Related Objects
Event Timeline
@MarcoAurelio the Special:UnconnectedPages cannot be found in includes/specials/. What specials page did you actually referred to? Where can I find it?
You can find Special:UnconnectedPages
at https://phabricator.wikimedia.org/diffusion/EWBA/browse/master/client/includes/Specials/SpecialUnconnectedPages.php, It is Part of Wikibase.
Last Night I played with Special:LongPages. See P6670, You need to write Callback and Namespace Filter Functions.
Namespace Filter can be done by
$excludenamespace= array_filter( MWNamespace::getValidNamespaces(),
'MWNamespace::isTalk' );I also have the need to search for the longest pages in other namespaces. For example on Wikidata it would be good to know which are the biggest properities and lexemes.
On Wikipedia it would be interesting to see which Help-pages are the longest to split/improve/consolidate them for making it easier for beginners.
I'm thinking about implementing this, but I'm not sure if what I have in mind right now is the best way of doing this.
Seeing that SpecialShortPages (which SpecialLongPages extends) and many similar special pages extend QueryPage, maybe it would be good to have a general solution that is implemented for most, if not all of the query pages. We could have an abstract class called FilteredQueryPage which extends QueryPage. This abstract class automatically creates a form similar to the one Special:AllPages has, as seen below.
The abstract class also handles the logic for the form like the query parameters.
All query pages where this feature would be useful could then extend FilteredQueryPage to also provide this functionality.
Would this be a good solution to implement this feature?
(Also as this is a more general solution, maybe this should be moved to another parent/subtask)
@SomeRandomDeveloper possibly
In general, it seems that this querypage already uses a page+namespace index, so performance wise, I think this ticket is solvable. It should be noted that the long and shortpages, are not actually filtered on being a single specific namespace currently. They are filtered on being content namespaces. So wiki's that have multiple namespaces for their content will actually have this query contain multiple namespaces right now, and this might also be functionality that would have to be preserved in some sort of 'namespace' selector. (So that you could have: content namespaces, talk namespaces, each and every specific namespace)
Change #1104391 had a related patch set uploaded (by Kooogi; author: Kooogi):
[mediawiki/core@master] feat: Implement namspace filtering for Short and Long Pages
Change #1104391 abandoned by Hashar:
[mediawiki/core@master] feat: add filter to Short and Long Pages
Change #1104391 restored by Thcipriani:
[mediawiki/core@master] feat: add filter to Short and Long Pages
