Javascript for Categories Plugin

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Javascript for Categories Plugin

Post 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
Attachments
My current categories
My current categories
categories.png (32.4 KiB) Viewed 3849 times
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Javascript for Categories Plugin

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Re: Javascript for Categories Plugin

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Javascript for Categories Plugin

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply