Extension talk:CategoryTree/LQT Archive 1

=2009=

Viewing the tree in multiple columns
I have the following code: Currently this generates a list that are subcategories to the category "features". But the output of it is in a single column, which can get very long if there is a lot of subcategories underneath "features". Is it possible to format the output so the list is in multiple columns? Also, can it be done so it's arranged alphabetically (like the subcategories list generated automatically by the wiki itself -> this is actually the desired output i am trying to get) Thanks in advance!! 128.189.248.8

Different spot in sidebar
Is there any way of making this be above some of the other items in the sidebar? - My Wiki

--38.98.7.10 02:45, 7 March 2009 (UTC)

Go into:

MediaWiki:Sidebar

Put * categorytree-portlet into the list anywhere you want.

72.166.192.10 17:26, 27 April 2009 (UTC)

UNIQ385ee6e553c2262-h-0--QINU
An error occured in German Wikipedia. The heading of section appear e.g. as UNIQ385ee6e553c2262-h-0--QINU (cf. QINU fix). This happens if the tag missing category appears on the page (example). --WIKImaniac 19:59, 6 January 2009 (UTC)
 * This also happens in hebrew mediawiki with this extension. --85.250.59.208 09:42, 24 February 2009 (UTC)


 * Same problem in my wiki in French www.wikitau.org see http://www.wikitau.org/index.php5/Portail:Histoire but strangely not in http://www.wikitau.org/index.php5/Portail:Personnages see Extensions_FAQ FrViPofm 10:31, 3 March 2009 (UTC)


 * Same problem in my german wiki. It's very strange. In some case it work without QINU errors, but in other case it dosn't work. That's approximately 50% of cases. What is the Problem? I have test it with version r46794 (Current) and r45462 (version for mediawiki 1.14.0). P. Vizeli 11:09, 4 March 2009 (UTC)

A request
Is there any way a switch can be added that will allow the function to be set to default to the collapsed state? I am referring to the function. --Jerem43 06:13, 22 January 2009 (UTC)

A different display
Please take a look at en:Category:Application software. The category outline there was designed as a concise display of the category tree, intended for use by people categorizing articles and not knowledgeable of the existing categories. While that outline is hand-coded (and took advantage of some unique characteristics of that category), the rules for generating it were:
 * 1st level categories start a new line and are visually distinct (bold/higlighted/...)
 * 2nd and lower level categories follow on the same line without any indication of level
 * a category only appears once, whether the prior appearance was as a 1st or other level makes no difference
 * in general (it was hand-coded) the maximum depth was 4.

The resulting "outline" makes locating categories quick, usually at a glance. For many uses, it's not the tree structure that is important, but category existence, and the "outline" makes tree walking, expanding branches, unnecessary. Please consider such a display for future revisions. tooold00:36, 29 January 2009 (UTC)


 * Surely then if that were the case - you wouldn't be using Category Tree - which people are choosing to use because thats what they really want. Its a nice layout indeed, but we use Category Tree in the sidebar where such a layout would not function at all.

Nibb 16:17, 25 March 2009 (UTC)

Special:Categories
Is it possible to change the defaults on the Special:Categories page - i.e. instead of seeing a list of categories, seeing them with the + next to the to see sub-categories / pages? How? --Robinson Weijman 08:50, 29 January 2009 (UTC)

CategoryTree Does not show any Categories
Hi,

My wiki does not show Category Tree, eventhough it has categories. The categories pagge displays

Pages in category "Agile" There are 3 pages in this category.

A Agile Challenges Agile Resources Agile Testing

But when i click on Show Tree it shows:"Category Agile not found "

Am using IE7 browser, and have JavaScript enabled.

Installed software

MediaWiki 1.12.0 PHP 5.2.5 (apache2handler) MySQL 5.0.51a

Installed extensions CategoryTree (Version 2008-02-04)

Can anyone help me out. pls.

Just saw something similar. Make sure the categories have category pages created, then Category Tree can see them. Using Media Wiki 1.14.0 and trunk version Category Tree.

FIXED: [+] in Category Tree stopped working with installation of V1.13.4
I use the Category Tree in the sidebar, and with an upgrade to the latest version, now, the [+] buttons no longer work. Also on category pages this feature has stopped working. Any ideas? Applicationswhisperer 23:21, 7 February 2009 (UTC)
 * I found that I had set the permissions to the /extensions folder to 744 instead of 755. Now it's set properly and all is well.

Applicationswhisperer 18:14, 9 February 2009 (UTC)

No Responses
Take a look at the subjects added so far this year. Many subjects but no responses. Does anyone monitor this page to help people using this extension? Please respond. (My question is above.) --Robinson Weijman 12:41, 10 February 2009 (UTC)

Examples of class, style, id, etc
Examples of class, style, id would be grand. 69.138.163.138 17:10, 16 February 2009 (UTC)

parameter DEPTH
Depth requires only 1 number, but the default is shown as "1,0". A description would be nice, rather than our having to experiment. 69.106.246.15 19:30, 20 February 2009 (UTC)

Category Page Trees only show subcategories, not pages
It took me a while to find $wgCategoryTreeCategoryPageOptions because it's not so obvious that this is the needed option. I searched google and found an old talk page for this extension which showed a few hacks to fix it. Anyways I finally did:

$wgCategoryTreeCategoryPageOptions['mode'] = 'all';

--85.250.59.208 09:41, 24 February 2009 (UTC)

I also added the following which worked - sort of:

$wgCategoryTreeDefaultOptions['mode'] = 'all';

For some reason, though, this has no effect on the category tree that displays in the Sidebar.

What are MediaWiki.org's Settings? How to setup Category count and Page count in Tree View ie: (2 C, 10 P)?
What is the default setup in the MediaWiki.org LocalSettings.php for CategoryTree? I've tried about 12 different settings in my wiki and nothing behaves the same as this site, like on this MediaWiki.org page: Category:Top_level

I can't figure out how to configure two things:
 * 1) How to make category page display the statistics like: (2 C, 10 P) for 2 categories and 10 pages.
 * 2) My wiki also only shows [+] next to top level sub-categories, but not in secondary sub-categories.

Where is the documentation to show how to make these functions work with examples?

173.54.95.59 17:39, 10 March 2009 (UTC)


 * About 1. thing: You need to edit follwing article in your wiki: "MediaWiki:categorytree-member-num". You can do this if you put this article name into your search field and push "Go". If do the same on this wiki, or any other Wiki you can copy the setting from there into your own wiki. When including the category tree into a page you need to add the "showcount" option. Hope it helps. Elch71 07:23, 15 April 2009 (UTC)

Missing [+] signs
Got an odd error here, have recently upgraded to MW 1.14.0, I copied our existing virtual domain to a new one, did the upgrade - just being cautious now, and all works just fine. Rename the domain to the one we normally use - and whilst the Category tree loads just fine - I get no [+] signs at all - either in the sidebar or by calling the category tree for example in the Main_page. The list of categories is there, no errors are to be found the Apache log for missing images and so on. Anyone any ideas?

thanks Nibb 16:13, 25 March 2009 (UTC)

Just fixed this for our installation. Looks like maintainers try to enable display of the [+] via javascript only and changed the default to display: none. I went into CategoryTreeFunctions.php and reset the linkattr to display: inline and after clearing browser cache, voila it now works as expected.

665c665 <                      $linkattr['style'] = 'display: inline;'; // Unhidden by JS --- >                      $linkattr['style'] = 'display: none;'; // Unhidden by JS

72.166.192.10 17:31, 27 April 2009 (UTC)

Dude, thats excellent and it worked perfectly, thanks for sharing!! Nibb 14:59, 8 June 2009 (UTC)

Keep nodes expanded
How can I keep the nodes on a category page expanded by default? Can I control the depth, too?

Object expected
Hi, I've installed CategoryTree and it works till I wanna click the "expand node"=> an error occurs at the following line with errot exception: "object expected in line(following) character 48(position of keyword "style"):

[+] TestA

in addition theres an error at the same page in line 7

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">













why is the href-link named with "CategoryTree.css?4 ?

can anybody help me please? Thanks in advance

Freezone 10:15, 06 April 2009 (UTC)

mediawiki 1.14.0 upgrade and can't get past first level of the hierarchy
It used to be when there was an inline tag or when viewing the category page itself, then it would give you the + signs on all the categories and you could keep going deeper and deeper into the structure, for instance you could click the plus sign again to show the pages under the subcategories or more subcategories under a subcategory. We have not changed any settings at all on the wiki except upgrading to 1.14.0 and now we can only expand the first level. It doesn't work on the category page or on the inline tag. We can only see the first level of pages and subcategories and cannot go any farther down into it, there are no more + signs to go any deeper. I guess it looks like nobody is monitoring this page but if someone has an answer can you please post it? We would like this to work properly again. Thanks

yeah so does anybody answers this page ever please?

yeah we need an answer on this too? hello?

redeclare function?
Getting this on a wiki i run. i've have changed the code at all. does anyone have this same problem? does anyone have a solution? please?

Fatal error: Cannot redeclare efcategorytree (previously declared in $IP/extensions/CategoryTree/CategoryTree.php:151) in $IP/extensions/CategoryTree/CategoryTree.php on line 197. Bud0011 08:35, 15 June 2009 (UTC)

Display Sortkey
Joolee 10:16, 16 June 2009 (UTC): I've long had the wish to define the page / category name myself when printing a Tree. I've made a couple of changes to my CategoryTree code (SVN Revision 51955) to display the sortkey.

CategoryTreeFunctions.php Line: ~466 $sql = "SELECT cat.page_namespace, cat.page_title, 				cl_to, cl_from, cl_sortkey 					 $transFields 					  $countFields 				FROM $page as cat 				$ctJoin $categorylinks ON $ctJoinCond 				$transJoin 				$countJoin 				WHERE $ctWhere 				$nsmatch 				"./*AND cat.page_is_redirect = 0*/" 				$transWhere 				ORDER BY cl_sortkey 				LIMIT ". (int)$wgCategoryTreeMaxChildren; CategoryTreeFunctions.php Line: ~503 $s = $this->renderNodeInfo( $t, $cat, $depth-1, false, $row->cl_sortkey); CategoryTreeFunctions.php Line: ~590 function renderNodeInfo( $title, $cat, $children = 0, $loadchildren = false, $sortkey = NULL ) { CategoryTreeFunctions.php Line: ~621 Insert the code if( $sortkey != NULL ) { 	$label = $sortkey; } CategoryPageSubclass.php Line: ~46 $this->children[] = $tree->renderNodeInfo( $title, $cat, 0, false, $sortkey );

Add in CategoryPageSubclass.php before the last } on the last line function addPage( $title, $sortkey, $pageLength, $isRedirect = false ) { 	global $wgContLang; 	$titletext = $wgContLang->convert( $sortkey ); 	$this->articles[] = $isRedirect '''		? ' ' . $this->getSkin->makeKnownLinkObj( $title, $titletext ). ' ' 			: $this->getSkin->makeSizeLinkObj( $pageLength, $title, $titletext );''' 	$this->articles_start_char[] = $wgContLang->convert( $wgContLang->firstChar( $sortkey ) ); }

There probably is a better way for doing this but this was what I could come up with, maby someone would like to pick this up and integrate it in CategoryTree as an option?