Extension talk:CategoryTree

From MediaWiki.org
Jump to: navigation, search
First page
First page
Previous page
Previous page
Last page
Last page

Suggestion: CategoryTree enhancement for touch screens

Touch Problem: [edit]

On tablet touch devices I do not have the fine finger control necessary to 'touch' activate the '+' and '-' signs to show or reveal the items contained by a category. I usually end up touching the category name itself, which takes me away from the page I'm on, to the category page. This is not what I want to happen. What I'm interested in is to 'show' items in the category while staying on my current page, and then 'touch' linking to one of the pages in the category, not to the category page itself.

Suggestion: [edit]

Make the category names themselves, in the hierarchical tree, 'link' to showing beneath them the list of items in the category, rather than taking users off to a separate page devoted to that category.

This behaviour could be controlled by a parameter, users could set it to do things the way the extension currently works, or to do things the way I am suggesting here, i.e. to have clicking or finger tapping on category names showing the items under that category while keeping the user on the page they were already viewing.

Dennis J au (talk)13:09, 7 May 2013

How to keep CategoryTree stayed opened after clicking any category in sidebar in Vector skin?

When I am going down in one category and subcategories (depth 5-6), after loading the specified category and then hitting the "back" button on the browser , the category tree is folded again. Is there any chance the tree stays opened? Please reply ASAP... How to keep nodes expaneded even after clicking back button in browser.Any code changes to be done in Categorytree extension? It would be great to have the tree expanded to the current page after clicking any article , so that the users can get a quick impression about the location of the current article in the overall context.

Satyamcompany (talk)21:30, 25 April 2013

namespace= not limiting showcount value

When I use <categorytree namespaces="-" showcount="on" depth="0"> I'm getting a full page count of all pages in the category instead of just the ones that are listed when I click on the [+]. Am I not passing all of the parameters right, or is this a known issue?

T13   ( C • M • Click to learn how to view this signature as intended )</spa18:28, 15 April 2013

Problem with namespaces in category tree

We are using the category tree on a page to allow users to "browse" for a Case via Jurisdiction. We have added two namespaces to our wiki because we did have some pages with identical names. The two new namespaces are "Case" and "Statute". For this page we want the tree to show all of the categories and subcategories and then all of the pages in the namespace Case in those categories or subcategories. We do not want to see anything in the main namespace or the Statute namespace.

Code for the tree on this page:

<categorytree mode=pages showcount=on namespace= Case>State</categorytree>
<categorytree mode=pages showcount=on namespace= Case>Federal</categorytree>

This is what we would like to see happen:

(Parent Category: Jurisdiction)

State --> California --> People v. John Doe (2012)

Federal --> Supreme Court --> Miranda v. Arizona (1966)

This is what does happen:

State (4) --> California (17) --> nothing found

Federal (9) --> Supreme Court (2) --> nothing found

Using the above code we see the categories and subcategories, items in the main namespace but none of the pages in the namespace "case". The count next to each category and subcategory is correct, it reflects all of the pages within including those pages in the "Case" namespace. If you click on something that we know has pages in the Case namespace you see "nothing found"

Here are the results from some trial and error:

namespace= case --> I see categories, subcategories, items in the main namespace, nothing in the case namespace

namespace= statute --> I see categories, subcategories, items in the main namespace, nothing in the Statute namespace

namespaces= case, category --> see everything in all namespaces (category, main namespace, statute and case)

namespaces = statute, category --> see everything in all namespaces (category, main namespace, statute and case)

namespaces= case, statute --> see everything in all namespaces (category, main namespace, statute and case)

I believe the issue may exist beyond the category tree (I have a feeling it might be in the configuration somewhere but have no idea where) because I just went to the categories page, clicked on the (+) on one of the categories and saw "nothing found" but when I clicked to open the subcategory I saw all of the files (the files are only in the Case or Statute namespace)

Another question: Not that important but I figured I would ask: Is there a way to have the category tree list certain categories but stop at a certain level showing subcategories:

Ex. Jurisdiction (main category)

--State

---California ("Case" namespace pages are here) 

----Statute

-----Penal Code

If the pages I want are under California, anyway to stop if from showing Statute, Penal Code, etc.? (The goal of the page is to have someone "browse" for cases from x, y, or z state)

Thank you in advance!

Amarilla2012 (talk)17:42, 17 July 2012

Can't check now, but did you try namespace id/number rather than name?

Nemo18:30, 28 September 2012

The directions for use of this extension specifically state: "namespaces: a list of namespaces from which pages should be shown in the tree (since rev:36864, July 2008). The entries in the list must be namespace names, separated by spaces. The main namespaces can be represented by "-" or "0". This overrides the mode option." Also, I notice that you didn't wrap your arguments in quotes and you used commas. Try namespace="case" - namespace="statue" - namespace="case category" - namespace="statue category" - namespace="case statue" instead.

T13   ( C • M • Click to learn how to view this signature as intended )</spa18:25, 15 April 2013
 
 

Incompatibility with Extension:CSS

After an upgrade to 1.20.2, I found an incompatibility between Extension:CSS and Extension:CategoryTree. If there is a {{#css: ... }} function in a page, the tree from Extension:CategoryTree won't display. It worked whith Extension:CSS v 1.0.7 and a previous version of Extension:CategoryTree (not numered...).

Varlin (talk)18:18, 28 December 2012

I haven't seen anything specific to CategoryTree about CSS, but I have found using {{#css: }} on pages tends to kill all the javascript, and since CategoryTree is a javascript thing, is it possible that's the issue, or is this something else?

I haven't really looked into it much on account of explosions elsewhere. Massive explosions.

-— Isarra 02:04, 29 December 2012
 

I just discovered that CSS doen no longer import articles in the form {{#css:MyStyles.css}} after upgrading to 1.20.2. {{#css: div {background: yellow;} }} however still works.

Bescheid (talk)22:55, 16 January 2013
 

Problem loading data. Please wait a moment and try again.

Hello

In my site, click all [+] wil show this errom: Problem loading data.Please wait a moment and try again.
No matter in category page or Special:Categories page.

Here is the version info for my site:
CategoryTree-master-2fadcdc
MediaWiki 1.20.0
PHP 5.3.16
MySQL 5.1.66

Thank you!

JoesSR (talk)12:48, 16 January 2013

Icons instead of C, P, F.

Not a techie guy so my question is rather than simple: is it possible to replace the text from the system messages with images?

More specific, the problem seems to be that when MediaWiki:Categorytree-member-num (or mediawiki:categorytree-num-xxx) is edited, it ignores any wiki code so it donesn't have any effect. Example:

$1 [[File:IconForPage.png|16px]]

will render as it is, with no image at all. HTML tags are ignored too.

With no wiki code or html working, I ran out of ideas. I'd like to know if there is a way to sort this out...?

Thanks in advance.

189.138.249.8016:32, 12 January 2013

Version page is empty after install

When I finished installing the extension (not working for me, yet), I've noticed that the Special:Version page, where I supposed to see the version of the extension, is now empty and there is no extension. If I delete the require_once line of the extension, it's all back to normal.

I didn't see anything wrong with permissions or in the log. Does anybody know what could cause this or where I was wrong?

Thanks!

Arieljannai (talk)13:29, 9 January 2013

CategoryTree extension and Mediawiki v1.20

The CategoryTree extension page defines that this extension is available to Mediawiki V 1.13.

Does it works with more recent mediawiki updates such as v1.20?

Thanks

213.165.185.20010:28, 19 December 2012

Heiya, I would guess so. I just changed the info box a bit to make this more clear. Since Wikimedia is using this extensions on their wikis and they are already on the MW 1.21 branch it should definitely work for MW 1.20. Cheers

[[kgh]] (talk)15:09, 19 December 2012

It's not working here on 1.21, try it out at Special:CategoryTree/Top_level.

Robkam (talk)15:51, 19 December 2012

Ah I see. I guess or better hope that a bug was filed for this. Cheers

[[kgh]] (talk)16:00, 19 December 2012

Bugzilla:43253 now fixed :-)

Robkam (talk)16:37, 19 December 2012

Great to see that things happened. :)

[[kgh]] (talk)10:28, 20 December 2012
 
 
 
 
 

"depth" parameter not working with pages

Hello, I have only a small hierarchy and I would like that the categorytree is initially fully expanded including pages and possibly subpages. Because of this I use the "depth" parameter.

Here an example of the following hierarchy: main_category->programming_category->ada_page
main_category->programming_category->c_page
<categorytree hideroot="on" mode="pages" depth="5">main_category</categorytree>

But the cateory tree only initially shows the categories, i.e. "programming_category" The pages are not shown initially. But if I manually click on the "+" left to "programming_category" then the pages are shown.

What do I have to do to initially expand "pages/subpages"? Why is the depth parameter only relating to categories and not to pages?

I'm using a 1.19 mediawiki and the latest stable version of the categorytree extension.

Thank you.

Best regards,
Dirk

Dirk 80 (talk)09:34, 17 December 2012

no categories!

I try to view a tree of categories, nothing works. I have followed all the instructions; I can go to Special:CategoryTree but when I enter a category name, it doesn't exist.

Pages are created for all categories.

Help... Any help...

I'm hosted on HostGator using these versions: MediaWiki v1.20.0 PHP v5.3.15 (cgi-fcgi) MySQL v5.5.23-55

I downloaded CategoryTree just today as instructed.

68.189.49.1200:14, 3 December 2012

I have the same problem with CategoryTree (ac61645). I'm running Mediawiki 1.20.1, PHP 5.4.9, MySQL 5.5.28. In addition to Special:CategoryTree not working, I cannot use the <categorytree> tag either. Axanon (talk) 21:49, 3 December 2012 (UTC)

Axanon (talk)21:49, 3 December 2012
 

I just realized that this extension is not currently supported on Mediawiki versions > 1.18 (yet?) Edit: This snapshot appears to be working 75d974a. It is the same version used by this wiki. Axanon (talk) 22:57, 3 December 2012 (UTC)

Axanon (talk)22:45, 3 December 2012

I am using Strict Standards: Declaration of CategoryTreeCategoryViewer::addSubcategoryObject() should be compatible with that of CategoryViewer::addSubcategoryObject() in C:\PlayNet\Wiki4Playout\extensions\CategoryTree\CategoryPageSubclass.php on line 14 Catchable fatal error: Argument 2 passed to CategoryViewer::__construct() must implement interface IContextSource, null given, called in C:\PlayNet\Wiki4Playout\extensions\CategoryTree\CategoryPageSubclass.php on line 9 and defined in C:\PlayNet\Wiki4Playout\includes\CategoryViewer.php on line 78

81.92.239.520:03, 6 December 2012
 

Darn, so it was sort of a waste of time for me to install it then? I just came here looking for help to get it working, but if it's not working for more recent Mediawiki installations, then there's no real point in continuing with it.

Banaticus (talk)20:03, 6 December 2012

I get version from July 2010 and that works almost! In order to makes click on categ and sub categ working I add on CategoryPageSubclass.php on class CategoryTreeCategoryPage in function closeShowCategory a test for on both variables $from and $until then I let call of new CategoryTreeCategoryViewer. but it lets destruction of css style and sidebar is not working also anymore

81.92.239.520:20, 6 December 2012

I'm not sure I understand what you did. I don't need sidebar or anything like that working, I'd like to implement your fix. Could you post a little more detail on it or perhaps the modified file (or a link to it)?

2600:1010:B11D:5C3B:9856:A19B:66B6:DB1409:10, 10 December 2012
 
 

I also get the version 75d974a and it work in any page with mediawiki 1.20.2, but not into sidebar. I've tries to debug it, but didn't find the problem. Anyone have an idea where to look at ?

Jm.lefevre (talk)13:34, 11 December 2012

Same here:

  • the default current (Dec 11 2012 snapshot) doesn't work at all
  • Version 75d974a works, but not in the sidebar.

MediaWiki 1.20.2 PHP 5.3.2-1ubuntu4.18 (apache2handler) MySQL 5.1.66-0ubuntu0.10.04.1

However:

  • An old version I used with 1.18.x version does work :) But I can't figure out the version number..
Daniel K. Schneider (talk)14:55, 11 December 2012

Can you post it somewhere ... maybe a diff will make me find how to make it work with sidebar

Jm.lefevre (talk)19:06, 11 December 2012
 

I am new to using GIT and older versions, can someone help direct me how to download the older 75d974a version? Thanks

Tiggerjay (talk)00:37, 12 December 2012

You can use the link from Axanon (talk) on the ‎3 décembre 2012 à 22:45 just above. Then click on snapshot link on the opened page

Jm.lefevre (talk)04:26, 12 December 2012
 
 
 
 
 

$wgCategoryTreeDefaultMode default

Why should $wgCategoryTreeDefaultMode default to CT_MODE_CATEGORIES? Why not CT_MODE_ALL?

Leucosticte (talk)07:27, 11 November 2012

sort in reverse order?

Is there some way to reverse the order of the items? We use our internal wiki to record meeting minutes, so a category will have articles with names using the <topic> minutes yyyy-mm-dd pattern (using mode=pages). CategoryTree sorts alphanumerically in ascending order, but I'd like an option so that the most recent meeting is listed first, not last. thanks

DavidBiesack (talk)19:02, 7 November 2012

In case there is no "reverse order" feature in the CategoryTree extension, I suggest to use {{DEFAULTSORT:sortkey}} in all your meeting minutes articles (see https://www.mediawiki.org/wiki/Help:Magic_words for more details). For instance, add {{DEFAULTSORT:999}} in a new meeting minutes and add {{DEFAULTSORT:998}} in the next meeting minutes and so on... Of course, you have an extra work for previous meeting minutes articles but for new meeting minutes, it should not be so much work :)

Note that DEFAULTSORT works for both articles and categories so I do not use DEFAULTCATEGORYSORT (MediaWiki 1.17). Hope it helps :-)

Cornucopia (talk)10:53, 8 November 2012
 

Snapshot download not downloading

The download a snapshot is not downloading anything. It reports this error message: "Invalid response from Extension Distributor remote client."

Rogerhc (talk)00:21, 20 October 2012

How to hide subcategories in "Special: Categories" page?

Don't know if it's supposed to work this way, but the Special:Categories page lists categories and subcategories. When a category is added to another category page to convert the category to a subcategory, I need it to disappear from the Special:Categories page. It's confusing to see subcategories appear in the same list as the top level categories.

Is my setting wrong, or is this the default setting? If this is the norm, is it possible to hide subcategories on the Special:Categories page?

74.61.181.408:46, 4 March 2012

No. Subcategories are categories.

Nemo18:57, 28 September 2012
 

What links here / Oprhan pages

In my wiki we use the category tree extension dynamically in a few pages to have convenient links to other pages. This means when people create new pages, all they have to do is add the appropriate category to their page and then the link will show up automatically on the master page. This saves our users time as they don't have to worry about manually adding links or link rot.

Unfortunately pages that a linked to in this way do not count under 'what links here' and therefore also show up on the orphaned page list. This makes it more difficult for the wiki admins to see if a particular page is dead/cruft that can be deleted (as usually pages with no links to them are) because it may actually be a valuable page that is only linked to via a the category tree expansion.

Is it possible for this extension to have this functionality added? I guess it would need to be configurable, as not all wikis may want this behaviour by default.

202.49.72.3603:42, 23 March 2012

No, it's not possible.

Nemo18:51, 28 September 2012
 

Removing Subcategory and Page listings from a Category page

Since the CategoryTree extension can display all Subcategories and pages within one Category, I want to remove these 2 listings, that are created automatically with the creation of a category page, from the page. It just looks too confusing.
Is this possible?

Messym (talk)10:38, 15 May 2012

Not that I know. You could look for some HTML class which you can alter in your MediaWiki:Common.css to hide those sections.

Nemo18:43, 28 September 2012
 

error in installation

I am getting &lt;categorytree&gt; on the page Special:SpecialPages. Does anyone know what would be causing this? Bud0011 (talk) 22:10, 20 May 2012 (UTC)

Bud0011 (talk)22:10, 20 May 2012

Missing MediaWiki:categorytree.

Nemo18:41, 28 September 2012
 

memorize opened in tree categories

It became necessary to store(or memorize?) opened in tree categories and after move to another page we should open those categories. Other words - we are opening several categories in the tree, then we click several times at various articles and we should see the tree in the same form (those several categories should be still opened).

What the easiest way to do it? Big thx for help!



PS: sorry for my pure english

217.28.218.12212:22, 23 May 2012

categorytree is always dynamic, I don't think that's possible.

Nemo18:39, 28 September 2012
 

[+] Somtimes Not Showing

Seems to be similar with topic below... but different in details.

For the first 3~4 times of refreshing a category page after starting up a new browser, the [+] sign does not show up. After more retry of refreshing the page, the [+] show up evetually.

Both(with [+] and without [+]) HTML codes are exactly the same. So, I guess the browser fails to show the [+] sign.

What can affect the web browser showing the [+] sign?

Jskang (talk)09:23, 17 September 2012

Which version of CategoryTree and MediaWiki were you using, and which browser?

siebrand (talk)21:55, 19 September 2012
 
First page
First page
Previous page
Previous page
Last page
Last page