Extension talk:CategoryTree/LQT Archive 1

=2011=

Preloading page links to avoid "loading..." ? (for use in sidebar)
I'm using CategoryTree in the sidebar of my site as the primary means of navigation. It's working great, except that you have to wait for the page links to load when you expand a category. (This becomes particularly tedious when you have to wait for them to load every time you want to navigate to a new page.) It would work much better if it would preload the page links in the background so they would instantly appear when you expand the category. I haven't found a setting to do this, but maybe it exists? Or is there a way to tweak it to do this? Maybe this is just a feature-request. --Waltztime 17:06, 23 September 2011 (UTC)

Hang on loading after upgrade
I've just upgraded my wiki from 1.15 to 1.17, got the categorytree from the SVN today but my categories are not working and the extensions is hung on on "loading...". I followed all the instructions (.htaccess rule, ajax enabled and so) but nothing. Can you please give me a hint? Thanx! 93.62.139.46 10:43, 13 July 2011 (UTC)

Screencap
It would be cool to see a screencap on this article. I'm going to try this extension on the English Wikipedia. :) Mheart 19:46, 9 February 2011 (UTC)

Display images in sub-categories
When I view a category, I can see all the image thumbnails (files) for that category. However, when I click on the + to open a sub-category, I only see the file names for that category, not the thumbnails. Is there a way to view the thumbnails here also? --Robinson Weijman 09:44, 12 February 2011 (UTC)

Show pages (mode=all) in Sidebar
Hi, the sidebar option is great however I'd like to show all pages in the tree rather than just the subcategories as normally done by mode=all. Is this possible in the sidebar?

Namespaces setting not working
I have MediaWiki 1.16.0, and CategoryTree latest stable version r62678. I have 2 namespaces called "KB" and "HowTo", where the article/documents are residing. 2 documents coming from the two namespaces are linked to a Category called Category:SuSe, and from there, that category (SuSe), its linked to Category:Linux.

I want a CategoryTree to only show the articles/documents from the "HowTo" namespace that are linked to the "Category:SuSe". I am trying the following syntax:

'' }} --SimonLitt 06:48, 9 August 2011 (UTC)


 * Thanx Simon, had the same problem and your code fixes it - Daniel K. Schneider 16:17, 16 August 2011 (UTC)

CategoryTree and alternative table of contents templates
Recently I reported a problem with CategoryTree which affected the behaviour of MediaWiki categories. With the new version for MW 1.17, that appears to be sorted now (!). However, the TOC templates for categories as used on Wikipedia, such as this one here, don't currently work with CategoryTree. Does anyone know of a fix? Cavila 14:02, 3 August 2011 (UTC)
 * Never mind, it's neither CategoryTree nor Ajax. It must be something else in MW 1.17 or other extensions may not be compatible. Cavila 08:24, 4 August 2011 (UTC)
 * Fixed. Cavila MW 1.17, MySQL 5.1.57, Php 5.2.17 10:05, 9 August 2011 (UTC)

Please Help With the Following Error
Why am I getting this error?

"Database error A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

(SQL query hidden)

from within function "CategoryTree::renderChildren". Database returned error "1054: Unknown column 'cl_type' in 'where clause' (localhost)"."

Thank you, -Brad


 * I am getting the same error. I noticed that this query seems to have gotten no response and i wanted to bump it since i am having the same issue. Also if i try to go to the special page 'categorytree' i get a html error as if the wiki isn't there.

I am using: MediaWiki 1.16.5, PHP 5.3.8 (cgi-fcgi), MySQL 5.0.41-log. I installed the extension and for the moment have not added anything to localsettings except the useajax line and the call to the extension. $wgUseAjax = true; require_once("$IP/extensions/CategoryTree/CategoryTree.php");

--Kay 08:41, 14 November 2011 (UTC)

Loop if category is member of itself
If a category is a member of itself you can click on the + and the tree will expand showing the category again where you can click on the + again and so on. A category loop detection would be more elegant --Danwe 13:22, 27 August 2011 (UTC)

Sort your categories & articles with DEFAULTSORT
Hi,

A short post to share a useful tip: Put the following line in your categories and/or articles if you want to sort them differently to the default alphabetic order:

Where value is a string like 001, abc...

Many thanks for this nice extension :-)

Philippe --Cornucopia 26 September 2011

Formatting does not work
Custom formatting doesn't work in our 1.17.0 Mediawiki, it looks like the entire term is covered in nowiki-brackets or something similar:

Test2 +  Test3 + Test4  + Test5

added to the MediaWiki:Categorytree-member-num page is shown as

Test2 +  Test3 + Test4  + Test5

on every output page of CategoryTree. Guess that shouldn't be the case. --Bzzz 11:15, 29 October 2011 (UTC)

Show pages only
Is it possible to have a mode option for that shows only pages inside category and subcategories, without showing subcategories?--Nickanc 14:20, 30 October 2011 (UTC)

JS tricks
The follow can be done in the JavaScript console like Firebug

To open one level of subcategories: $('SPAN.CategoryTreeToggle[title="expand"]').click Keep doing that until it returns zero items, and then all items have been expanded.

To obtain a list of unique pages: pages = $('A.CategoryTreeLabelPage'); page_hrefs = pages.map(function{ return $(this).attr('href') }); distinct_page_hrefs = $.grep(page_hrefs,function(v,k){ return $.inArray(v,page_hrefs) === k; });

Then "distinct_page_hrefs.length" will report how many there are. John Vandenberg 05:11, 4 November 2011 (UTC)