I hope the zip is not too big to attach correctly. If it works, here it is, minus the GPL license file as that adds a big chunk to it.
Please let me know about your experience so I can make any necessary corrections/improvements before submitting to Plugins.
Thank you. Will try it out now :)
Hello,
Tested it on 1.5.1 and getting a blank page. It says there's a syntax error on line 14 of categories_dressing_functions.php.
Back on using the old version for now, how do you turn off the ch_categories sidebox in the homepage but on for other pages?
That would take an if() test in /includes/modules/sideboxes/your_template/ch_categories.php wrapped around the entire file code content, like this:This will let the sidebox be processed only when it is not in the homepage.Code:if (!$this_is_home_page) { //the file code }
The PHP error is a typo in the file (obviously not debugged since the last time I worked on it). I spent a good while trying to see what was wrong with
$new_style = constant('CAT_SPECIAL_CATEGORY_' . $path);
before realizing that I had left the colon : off of the preceding line. It should be
There is another typo in that file. In this:Code:case (defined('CAT_SPECIAL_CATEGORY_' . $path)): $new_style = constant('CAT_SPECIAL_CATEGORY_' . $path);the last line (line 37) should have parentheses around the count() arguments. Not sure how I forgot that one...PHP Code:
function cat_path_common_parent($path1,$path2) {
$parent_paths1 = explode('_',$path1);
$parent_paths2 = explode('_',$path2);
for($i=0;$i=max(count$parent_paths1,count$parent_paths2)-1;$i++){
And finally, at line 132:PHP Code:
for($i=0;$i=max(count($parent_paths1),count($parent_paths2))-1;$i++){
the last parenthesis ) should be a curly brace }PHP Code:
if ($new_group) {
$path_parents = cat_path_common_parent($prev_path,$current_path);
// $path_parents[0][$i] $path_parents[1]
)
I really need new glasses :) to see little letter quirks better...PHP Code:
if ($new_group) {
$path_parents = cat_path_common_parent($prev_path,$current_path);
// $path_parents[0][$i] $path_parents[1]
}
Here's a new zip with the function edits included.
Glenn, I tried using the index_home stylesheet approach that you suggested. It was a simple and elegant solution which never crossed my mind (been away too long, I guess ) I had it working as far as the flyouts went, but when I started mucking with the way I wanted it to look the rest of the time, the flyouts stopped working and I haven't been able to get them working again since then. I suspect it has something to do with my active setting in the defines more so than the stylesheet changes. Since I was satisfied with the way I changed things, I dropped trying to get the flyouts working, but since I see you were getting ready to release the new code, I wanted to bring this to your attention in case it was the active levels that broke it for me. I am not at my development computer right now, so can't give you the levels I am using, but functionally I have the top levels showing always and then I have all the 1st level subcats for only the active top level and all the 2nd level subcats only for the active subcat level. I am still having problems with getting one of the top cats to look the way I want, but that is for a different post. The top cats with subcats are all looking the way I want, but the flyouts won't work anymore.
Let me know if you need more details from my defines or stylesheets to test that your new code for flyouts before you release it for the plugins.
Thanks! Karen
Along the same lines of what Berserker wants to do... I've got one ezpage hierarchy where I don't want the cats to show at all. I do want the sidebox title to show as a link to a page where my categories would normally show. I figure if I needed to, I can probably duplicate the sidebox title look as an ezpage link that replaces the ch_categories sidebox when I'm in this particular ezpage hierarchy and then I wouldn't have to turn off display of all the cats, but was wondering if there is a better way utilizing the power of CD to do this. I could make a linkable header that resides below the sidebox title if all the other cats are off, but I still need to have a way to control the linkable header based on the pagename. In the pagename.css I would need a .categories or #chcategories override that sets display: none blanket to cover all the ul and li conditions.
Thanks, Karen
Hi again, Glenn, I've got one more thing that's been kicking my ########! My last top category has no sub cats and has an image that resides above it. This category name is five words long and unlike the other top cats which are left justified, I want to center this category name in two lines (first two words on one line, last three words on second line) below the image. I know how to style it uniquely, but my problem is figuring out how to get it to look exactly like I want. Is there a way to give the category a different name than is the actual one in the database - a nickname of sorts? The next thing I was going to try is to rename the category in the database to be "word1 word2" only and then use the subtext option to add "word3 word4 word5" below it. This has wide ranging impacts, though, with things like the address bar and breadcrumbs, but more importantly, I'll still have to find a way to put "word3 word4 word5" back into the category name everywhere in the center area. Unfortunately, the spacing of my sidebox is such that I need it to be wide enough that the default formatting allows "word1 word2 word3" to fit on the first line. I've also considered coding a line break into the category name where I want the word break, but I haven't gotten to the point of seeing what that does to the database. I did try using major header and minor header in the image define, but even without any padding and margin settings in the stylesheet for the header formatting, I couldn't get rid of extra spacing above and below them because of the extra breaks in the html, and even so I couldn't figure out how to make that link to the category (realized there was probably a way to make the image the linkable "category" title, but didn't get into that option yet!)
Thanks, Karen
Bookmarks