Sidebar Widget Collapser 2.5 - Released

I just posted the latest version of the Sidebar Widget Collapser plugin.

Major changes:

  • This release includes an administrative options page to override the default settings, for people with sidebars configured differently.
  • The two files can now be placed directly in the plugins directory OR any subdirectory under it.

49 Comments

  1. Posted February 13, 2007 at 1:22 am | Permalink

    The new version still not work with me :(
    I changed the Sidebar ID to “wp-content-sec” (which I guess it have been used in my theme) but still no use. Do you have any idea on this?

    Thanks in advance!

  2. Posted February 13, 2007 at 10:00 am | Permalink

    Yes, in looking at your page structure, it looks like everything is configured properly except one setting. The “Sidebar List Element” in the option page is set to “UL” by default, but it looks like your theme uses an “OL” list. If you change the “UL” setting to “OL” in the options panel for this plugin, it should work fine.

    Thanks.

  3. Posted February 13, 2007 at 10:44 am | Permalink

    It works! Thank you so much for your help and also for the great plugin!

    Anyway, do yo plan to add effect like fade or something like this in the future?

  4. Posted February 13, 2007 at 1:46 pm | Permalink

    Sure, sounds good.

  5. Posted February 13, 2007 at 3:47 pm | Permalink

    Is there a way to have the widgets start out as hidden? I love the idea of this plugin, but would like to have the widgets hidden as some of the widgets I have contain a lot of links and information.

  6. Posted February 13, 2007 at 5:08 pm | Permalink

    Perhaps (in a future release) I will include an additional configuration option for a list of widgets to hide by default.

  7. Posted February 13, 2007 at 8:33 pm | Permalink

    This is a great idea and I love how it works on your site.
    I am seeing themes with shorter and shorter index pages.
    Will this work with multiple dynamic sidebars? Will it work for one and not the other?
    What do I need to modify in the TypoXP Reloaded theme to make it work.
    Thanks for your advice.

  8. Posted February 13, 2007 at 8:46 pm | Permalink

    skarld - It won’t currently work with multiple sidebars; I’ll have to add that in a future version.

    There shouldn’t be any particular theme modifications required in order for it to work, unless the themes somehow alter the usual way that sidebar widgets are rendered.

    Unfortunately I won’t be able to offer specific support for all the various themes and layouts, as each one can be so different and it would quickly become overwhelming.

    Ideally I’d like to focus most of the support effort around enhancing general compatibility with the default widget implementation, as well as new features and bug fixes. Of course, whenever I can offer some additional, more specific advice (as above) I will, but I can’t promise that.

    For your site in particular (if it’s the one you linked to) it doesn’t appear to me that you’re currently using the Sidebar Widgets plugin (as referenced at the top of this page). My plugin depends on that one being installed and activated in order to work.

  9. Posted February 14, 2007 at 4:07 am | Permalink

    Hi, love the idea of this plugin, but simply cannot get it to work!
    I’ve altered the id to correct one, and as far as I can tell the other settings are correct too, have tried several different variations, all to no avail…
    Any help would be greatly appreciated!
    I’m using wp version 2.1
    CHeers, Kelly

  10. Posted February 14, 2007 at 4:15 am | Permalink

    It still does not work for me; you might want to take a look. I use WP 2.05 with the Cordobo Green Park theme, modified to my needs.

  11. Posted February 14, 2007 at 8:01 am | Permalink

    Why not use the cool sliding effects in prototype, since it comes with 2.1 now?

  12. Posted February 14, 2007 at 10:33 am | Permalink

    debambam - Looks like you have another script on your page that overrides the window.onload event (as opposed to adding to any existing one, such as my plugin tries to do). So basically what is happening is that the script you’ve got that uses window.onload = function.... is overwriting the trigger that should cause the sidebar collapser to draw.

    If it’s at all possible to move that script up above the line that references this plugin it would work, but that is a short term solution. It’s probably actually a bug in this design because I shouldn’t rely on other themes or plugins not exclusively overwriting existing window.onload functions, even though it’s not very polite of them. :) I’ll plan to change that in the next release.

    emre - It appears that your source is not using the standard implemetnation of the widgets plugin. Specifically, there is no class name present on the list items in the sidebar, even though a couple items (within the LI’s) do have the class of “widgettitle”. Not sure what’s going on there.

    Dan - I probably will, I just didn’t want to focus on the fancy stuff until I got the kinks worked out in the basic functionality.

  13. Posted February 14, 2007 at 11:46 am | Permalink

    I think Dan’s onto something. A lot of plug-ins use prototype or moo.fx these days, so it’s not like you’d be adding excess weight.

  14. Posted February 14, 2007 at 12:05 pm | Permalink

    Yeah, I think I will. As Dan mentioned, since WordPress already distributes prototype (and now scriptaculous I believe, which is prototype based) I would definitely go with a prototype based solution, since I wouldn’t want to require an additional third party library (like moo.fx).

    This particular plugin seems to be generating quite a lot of interest, (based on the number of page views / downloads in my stats) so I’ll probably tackle that sooner rather than later.

  15. Posted February 15, 2007 at 5:30 am | Permalink

    Ok, I found it, it’s the script and coding that allows for the rounded corners. Now you realise your swearing at me when it comes to coding, I’m just very good at following instructions, BUT I think the other script is set to run last so I’m not sure how I’m going to do it :) Perhaps I’ll wait for the next version??!!
    Thanks for the help though..will wait eagerly…
    Kelly

  16. Posted February 15, 2007 at 7:39 am | Permalink

    Sure. I will change it shortly to not use the window.onload event, since I suspect that there are probably several other plugins and themes that overwrite it.

  17. Fiuuuuuuu
    Posted February 15, 2007 at 1:46 pm | Permalink

    My sidebar comprises div-right (one UL) and div-left (other UL). So this probably does not work?

    Does it let me collapse/expand single link categories? Not the whole links widget but some category of links inside it?

  18. Posted February 15, 2007 at 7:05 pm | Permalink

    It should be OK, assuming it’s still using widgets. The only drawback is that the current version only supports a single sidebar.

    No support for the links widget for now. It looks like it doesn’t use that standard convention for list items that the other widgets do.

  19. Posted February 15, 2007 at 10:36 pm | Permalink

    Ok, it turns out it’s actually WORKING, but not on all the widgets..I couldn’t see the [+/-] because it’s showing up as the same color as the background…interesting to note it still works with the image replacement plugin I have that renders the widget titles as images..
    If you hover mouseover at end of each title you can click…this will show you which ones it’s working on and which ones it isn’t.
    Are there any plans to have the widgets closed by default in future releases? If so, it would make it my second fav plugin of all time :) First one is an admin one…hehehe
    Thanks!

  20. Posted February 15, 2007 at 11:42 pm | Permalink

    Okay altered the css sheet so you can now see it….only one it’s not working on now is the default links one. I did have another plugin for my links, that showed the [+/-] but it wouldn’t work….anyway I’m off for the weekend, just thought i’d let you know so you know what your working with!
    Cheers, Kelly

  21. Posted February 16, 2007 at 10:17 am | Permalink

    Ah, cool. I’ll look at the default links widget and see if there’s anything I can add to accommodate that. I’ll also plan on adding an admin option for the default state of all the items, so you can set collapsed as the default.

  22. Posted February 16, 2007 at 3:43 pm | Permalink

    YOU are a bloody legend :) Have a good weekend
    Kelly

  23. Brian
    Posted February 18, 2007 at 1:09 pm | Permalink

    I am unable to get the open (+) and closed (-) indicators to be on the same line as the widget title (the indicators are by themselves in a line below each widget title). The widget’s title is controlled as a variable from within the widget so I am not sure how to work with your code’s parameters. The website is currently under construction so if you need to see the code, I’ll email to you separately.

  24. Posted February 18, 2007 at 5:55 pm | Permalink

    Brian, here’s the CSS I currently use to achieve that effect:

    #sidebar h2 a.SideBarWidgetToggle {
    position: absolute;
    top: 0em;
    right: 0em;
    }

    Note: To make this work, the parent title item (h2, in my case) needs to be set to position: relative;

  25. Posted February 20, 2007 at 2:59 am | Permalink

    Not sure whether this helps or not, but I figured out that with the widgets where I was using php calls, and I’d included before/after settings THEN it wouldn’t work…but not when after is br. Seemed to happen with li and /li..
    Anyway I’ll stop bugging you now, just thought I’d let you know in case it helps!
    Cheers, Kelly

  26. Guy
    Posted February 21, 2007 at 10:16 pm | Permalink

    Hi there,

    Would love to use this plugin - looks great! However my site doesn’t use widgets… any plans to make a version which non-widgetted (is that a word) blogs can use?

    Cheers :-) Guy

  27. Posted February 22, 2007 at 10:12 am | Permalink

    Perhaps. I’m thinking about an option that would allow for that now.

  28. Posted February 23, 2007 at 1:21 pm | Permalink

    Hello :o) I think you are doing an awesome job and I love this plugin - at least, I love the idea of this plugin because I can’t get it to work on my site! ;o) I was using a script written by squidfingers so I though that was the problem and removed the .js call from my header - however, it’s still not working. Is it possible that it’s not working because I have a four column theme running? Thanks in advance for your help :o)

  29. Anonymous
    Posted March 1, 2007 at 4:15 pm | Permalink

    Have you heard of instances where the toggle will not display in IE but displays fine in Firefox. It had been displaying in both browsers for me but is now only displaying correctly in Firefox. I had made some changes in my style.css file today for another plugin but nothing that should impact the display of the widget collapser. Is IE that sensitive? I’ll keep looking but am running out of ideas.

    Brian

  30. Brian
    Posted March 1, 2007 at 8:34 pm | Permalink

    Just an aside from the last comment. I was using IE6 which also didn’t show the white descriptions to the left of the reply boxes (which is why the reply came in as anonymous). I am using IE7 at home which shows the reply descriptions to the left of the reply boxes but still doesn’t show the widget toggles. Again viewing in Firefox is fine.

  31. PW
    Posted April 16, 2007 at 9:09 pm | Permalink

    Possible bug?

    This not only happens when I view my site, but when I visit your site as well.

    I clear my cache and cookies.
    Visit the blog home page “blog/”.
    Widgets all collapse and expand as expected.
    Visit the previous posts page “blog/page/2/”.
    The top widget will collapse but will no longer expand and the “-” indicator remains.

    Any thoughts?

    Thank you.

  32. Posted May 15, 2007 at 9:02 am | Permalink

    Hi, I’m trying to use this plugin on a WP 2.0.2 site and am having no luck getting it to work. I have the widgets working properly, and can see the config screen for the collapse plugin, but no luck. any ideas? you can see the dev here.

  33. Posted May 15, 2007 at 9:28 am | Permalink

    Hmm. Your sidebar does have a bit of a different structure than I’ve seen before, but if the settings on the config page are correct than I don’t see anything offhand that would interfere with the plugin working. I did notice that there was quite a lot of other javascript on the page, though, so there could be a potential for conflict there as well.

    The version of WordPress shouldn’t matter too much at all, although I would encourage you to upgrade to 2.1.x if you can, for other reasons.

  34. PW
    Posted May 16, 2007 at 11:08 am | Permalink

    One more try…

    I visit this page:
    http://freepressblog.org/2007/02/13/sidebar-widget-collapser-25-released

    It’s rendered with the “Oasis” theme.

    I click a random link in the “Archives” section of the Sidebar.

    I click a random post in the archive.

    I am taken to:
    http://freepressblog.org/2007/01/21/credit-where-credit-is-due/

    I click the top “Links” sidebar widget and the widget collapses but still displays the “[-]” link to close it.

    The “Links” widget will not re-open unless the page is refreshed.

    Does anyone else experience the same problem?

  35. Posted May 16, 2007 at 12:10 pm | Permalink

    I’ll check it out as soon as I can.

  36. Posted June 9, 2007 at 4:11 am | Permalink

    Thanks for this, it works like a dream.

    Unfortunately, only for single sidebars - I tried defining a common class for each sidebar (but it works on ID, and I can’t have two of those).

    Is there any chance of updating so that it works on more than 1 sidebar ID? I would suggest making 3 the limit.

  37. Michelle
    Posted June 28, 2007 at 6:53 am | Permalink

    I think the link to the download is broken :( I keep getting an Internal Server Error.

  38. Posted June 28, 2007 at 9:40 am | Permalink

    It is, sorry. I’ll have it back up again shortly.

  39. Posted June 29, 2007 at 11:05 pm | Permalink

    Hi, the download link is still not working. There seems to be a Server Error.

    Would appreciate if you could fix the link soon. Thanks!

  40. Posted June 29, 2007 at 11:54 pm | Permalink

    Sorry, should be up now.

  41. Posted July 25, 2007 at 12:20 am | Permalink

    Do you know to make it so that after you click on the + or - icon, the border around the icon is invisible. The way it functions now, the border remains after clicking on it. I tried to edit a:visted in style.css, but maybe thats not the problem?

    Awesome plugin though!
    Eli

  42. Posted July 25, 2007 at 4:40 pm | Permalink

    I think that might be a browser specific behavior that can’t be changed in a standard way with CSS. I could be wrong about that though, so let me know if anyone finds out.

  43. Posted October 5, 2007 at 7:48 pm | Permalink

    I am using the sidebar widgets plugin and the sidebar collapser does not seem to work automatically with it. How do I make it work? Thanks!

  44. Posted January 16, 2008 at 4:47 am | Permalink

    i’m nearly ready to give up, where am i going wrong with this code?

    <!–Calendar for

    –>

  45. Posted February 5, 2008 at 8:46 am | Permalink

    I would like to install this widgets, but first I would like to know where I can change the way it looks.
    in my general css from wordpress or is there a special one for this widget?

    thanx
    well done,
    julakim

  46. Posted February 5, 2008 at 12:17 pm | Permalink

    There is an options page in the admin section where you can change things like what text is used for the expand collapse links.

    Everything else (as far as appearance goes) would be set in your theme’s CSS file.

  47. Posted April 24, 2008 at 11:38 am | Permalink

    Thanks for this plugin.

    It would be cooler still if it was possible to set the default state to “collapsed”, as others have mentioned previously. For those enterprising (read: knowing just enough to be dangerous) users who don’t mind tinkering with the code, lines 33-38 of the .js file are worth a look.

    I basically flipped some simple values and names around and got the default state to be collapsed.

    var storedValue = SideBarWidgetGetCookie(sidebarItems[i].id);
    if(storedValue==’Y') {
    ShowSidebarWidget(sidebarItems[i].id);
    }
    else {
    HideSidebarWidget(sidebarItems[i].id);
    }

  48. Posted May 28, 2008 at 5:12 pm | Permalink

    Didn’t work for me :(
    The + and - only showed after the category header and not for each category. And the categories did not expand. I really really would like this to work, I have unsophisticated visitors who need to see the expanded lists. Hope you can help.

  49. David
    Posted June 8, 2008 at 11:12 am | Permalink

    Great plugin - thank you so much for making it! I’ve been searching for something like this for months. It works like a charm.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*