Last modified: 2008-04-28 20:25:30 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T10019, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8019 - Option in categorytree-tag to hide Category-prefix
Option in categorytree-tag to hide Category-prefix
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CategoryTree (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 8011
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-23 17:15 UTC by JePe
Modified: 2008-04-28 20:25 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
CategoryTreeFunctions.php (13.62 KB, patch)
2008-04-28 20:22 UTC, Wiredtape
Details
CategoryTree.php (9.69 KB, patch)
2008-04-28 20:23 UTC, Wiredtape
Details

Description JePe 2006-11-23 17:15:05 UTC
Can there be made an option for the categorytree tag to hide te Category-prefix. 

In bug 8011 there is committed a patch to make this possible, but only if a
configuration variable is set. 

Maybe it can be named 'hideprefix', just like the 'hideroot' option.
Comment 1 Daniel Kinzler 2006-11-23 20:01:03 UTC
in theory, it would be possible. However, it is not as trivial as it sounds -
it's yet another option that needs to be passed through the various calls, and
needs to be taken into account when calculating cache keys. I thought about
doing it, but decided against it for now - I would like to have a nice and clean
way to handle options without having to change the paramater lists of various
functions, think about cache keys, URL parameters, etc, every time. If someone
comes up with a nice solution for this - excellent :)
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-11-23 21:29:11 UTC
Why not member variables of an object?
Comment 3 Daniel Kinzler 2006-11-23 21:35:40 UTC
That would be a little bit better, but not much. Especially, it doesn't
eliminate the need to manually adopt the ajax calls for each new possible
option, and adop the backend function efCategoryTreeAjaxWrapper; the cache key
issue also remains.

All this is not rocket science, it can be done. But i'm reluctant to add
anything new this way, because i'd rather have a nice and clean mechanism for
dealing with new options flexible. Other (future) ajax-based extensions would
probably also benefit from that. 
Comment 4 JePe 2007-01-18 02:14:29 UTC
Maybe you can place the category-prefix in a span with a class, so it can be
hidden by css.
Comment 5 Wiredtape 2008-04-28 20:22:55 UTC
Created attachment 4844 [details]
CategoryTreeFunctions.php
Comment 6 Wiredtape 2008-04-28 20:23:53 UTC
Created attachment 4845 [details]
CategoryTree.php

Added $wgCategoryTreeOmitCatNS to initialized config vars.
Comment 7 Wiredtape 2008-04-28 20:25:30 UTC
Enabled a new config var, to let you choose whether to display Category: prefix when mode=pages or all. 
Making this available as a global config option saves the trouble of finding a fix for this on the individual level.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links