Page 1 of 1

Javascript for Categories Plugin

Posted: Mon Aug 01, 2011 7:37 am
by danst0
Hi,

my categories sidebar plugin is getting more and more crowded (and it will grow further in the future). So I am looking for ways to reduce the length of the plugin and make it easier to understand (is there really no word for "übersichtlicher"?).

So my questions:
* In general what would you suggest to make this better from a design perspective?
* One thing I thought of was using javascript to hide the subcategories until clicked. Does this sound like a good idea?
* I am pretty sure I am not the first one who has done this, so can anyone recommend me some code examples for that?

Thanks,
Daniel

Re: Javascript for Categories Plugin

Posted: Mon Aug 01, 2011 8:50 am
by garvinhicking
Hi!

theres a serendipity_plugin_categories_dhtml plugin or something like that which allows to fold in /out categories...maybe you want to give that a try...

Regards,
Garvin

Re: Javascript for Categories Plugin

Posted: Mon Aug 01, 2011 9:50 am
by danst0
Ok I tried that: I put PEAR::Treemenu into the plugin directory, now I get:

Fatal error: Call to a member function addItem() on a non-object in /usr/www/users/xxx/plugins/serendipity_plugin_category_dhtml_menu/serendipity_plugin_category_dhtml_menu.php on line 193

Any hints?

Daniel

Re: Javascript for Categories Plugin

Posted: Mon Aug 01, 2011 7:50 pm
by garvinhicking
Hi!

The Pear TreeMenu is a bit picky about where and how to place. Which file/directory structure do you have now exactly, where is the TreeMenu put into? Maybe the TreeMenu people also changed their API and "addItem" is no longer available, in which case the plugin would need a rewrite...I'm not sure, I think also somewhere someone contributed a dtree.js version of that exact same plugin...?!

Regards,
Garvin