Page MenuHomePhabricator

Define new "magic word" {{MEDIAINCATEGORY:categoryname}}
Closed, ResolvedPublic

Description

Author: test5555

Description:
Similar to {{PAGESINCATEGORY:categoryname}} and {{PAGESINCAT:Help}}, please define a new magic word that counts just the number of media in a category.

For commons, the number of pages/subcategories isn't generally that interesting, but the number of media (images/photos/videos etc.) is.

The information might already be available somewhere as parent categories already display the number of files, pages and subcategories separately.


Version: 1.16.x
Severity: enhancement

Details

Reference
bz21822

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:51 PM
bzimport set Reference to bz21822.
bzimport added a subscriber: Unknown Object (MLST).
  • This bug has been marked as a duplicate of bug 14237 ***

test5555 wrote:

I rather see a magic word that's there just for media. Commons needs primarily this, not all others.

This should be a param for PAGESINCATEGORY to allow the following syntax:

  • {{PAGESINCATEGORY:cat}}
  • {{PAGESINCATEGORY:cat|all}} - as alias for the first one
  • {{PAGESINCATEGORY:cat|files}}
  • {{PAGESINCATEGORY:cat|subcats}}
  • {{PAGESINCATEGORY:cat|pages}} - this number is not stored in the database, but should be compute by "all - files - subcats"

test5555 wrote:

If {{PAGESINCATEGORY:cat|files}} ever gets implemented, {{MEDIAINCATEGORY:cat}} could be an alias for this. bug 14237 dates from 2008, so it seems unlikely that it will ever get done. There isn't really a clear use for most other cases anyway.

If {{MEDIAINCATEGORY:cat}} is implemented, {{PAGESINCATEGORY:cat|files}} could be an alias for {{MEDIAINCATEGORY:cat}}.

gerrit 12790 is successfully merged

You can use {{PAGESINCATEGORY:catname|files}} or {{PAGESINCATEGORY:catname|files|R}} or {{PAGESINCATEGORY:catname|R|files}} to get the count of files inside the category.