=== Collapsing Categories === Contributors: robfelty Donate link: http://blog.robfelty.com/plugins Plugin URI: http://blog.robfelty.com/plugins Tags: categories, sidebar, widget Requires at least: 2.8 Tested up to: 3.0 Stable tag: 1.2.2 This plugin uses Javascript to dynamically expand or collapsable the set of posts for each category. == Description == This is a very simple plugin that uses Javascript to form a collapsable set of links in the sidebar for the categories. Every post corresponding to a given category will be expanded. = What's New?= * 1.2.2 (2010.08.05) * fixed self class for category archive pages (error pointed out by ltache) * 1.2.1 (2010.07.25) * Fixed bug where top-level categories did not show up if only had posts in sub-sub categories. * Fixed post counting errors * 1.2 (2010.06.18) * Added option to automatically expand categories to which a post is assigned on single post pages * Storing posts in a javascript array and only adding to the DOM when requested (speeds page load) * fixed bug where empty subcategory with non-empty subsubcategory doesn't show up = CSS Class changes = Version 1.1 introduces different css classes to the collapsing categories and posts, which should make it easier to style in the future, and more consistent across my other collapsing plugins Please see below for an explanation of the css classes == Installation == IMPORTANT! Please deactivate before upgrading, then re-activate the plugin. Unpackage contents to wp-content/plugins/ so that the files are in a collapsing-categories directory. = Widget installation = Activate the plugin, then simply go the Presentation > Widgets section and drag over the Collapsing Categories Widget. = Manual installation = Activate the plugin, then insert the following into your template: (probably in sidebar.php). See the Options section for more information on specifying options. ` \n"; if (function_exists('collapsCat')) { collapsCat(); } else { wp_get_categories('your_options_here'); } echo "\n"; ?> ` == Frequently Asked Questions == = What is the option about the ID of the sidebar? = Here is the deal. If you have a rule in your theme like: `#sidebar ul li ul li {color:blue}` it will override a rule like `li.collapsArch {color:red}` because it uses an ID, instead of a class. That is the way CSS works. So if you change our rule to: `#sidebar li.collapsArch {color:red}` then this alleviates that problem. The option for the ID of the sidebar does this automatically for you. = How do I use different symbols for collapsing and expanding? = If you want to use images, you can upload your own images to http://yourblogaddress/wp-content/plugins/collapsing-categories/img/collapse.gif and expand.gif There is an option for this. = I have selected a category to expand by default, but it doesn't seem to work = If you select a sub-category to expand by default, but not the parent category, you will not see the sub-category expanded until you expand the parent category. You probably want to add both the parent and the sub-category into the expand by default list. = I can't get including or excluding to work = Make sure you specify category names, not ids. = There seems to be a newline between the collapsing/expanding symbol and the category name. How do I fix this? = If your theme has some css that says something like #sidebar li a {display:block} that is the problem. You probably want to add a float:left to the .sym class = No categories are showing up! What's wrong?" = Are you using categories or tags? By default, collapsing categories only lists categories. Please check the options in the settings page (or in the widget if you are using the widget) = How do I change the style of the collapsing categories lists? = As of version 0.9, there are several default styles that come with collapsing-categories. You can choose from these in the settings panel, or you can create your own custom style. A good strategy is to choose a default, then modify it slightly to your needs. The following classes are used: * collapsing - applied to all ul and li elements * categories - applied to all ul and li elements * list - applied to the top-level ul * item - applied to each li which has no sub-elements * expand - applied to a category which can be expanded (is currently collapsed) * collapse - applied to a category which can be collapsed (is currently expanded) * sym - class for the expanding / collapsing symbol An example: `