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.
51 Comments
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!
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.
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?
Sure, sounds good.
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.
Perhaps (in a future release) I will include an additional configuration option for a list of widgets to hide by default.
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.
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.
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
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.
Why not use the cool sliding effects in prototype, since it comes with 2.1 now?
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.
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.
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.
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
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.
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?
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.
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..
First one is an admin one…hehehe
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
Thanks!
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
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.
YOU are a bloody legend
Have a good weekend
Kelly
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.
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;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
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
Perhaps. I’m thinking about an option that would allow for that now.
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)
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
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.
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.
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.
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.
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?
I’ll check it out as soon as I can.
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.
I think the link to the download is broken
I keep getting an Internal Server Error.
It is, sorry. I’ll have it back up again shortly.
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!
Sorry, should be up now.
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
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.
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!
i’m nearly ready to give up, where am i going wrong with this code?
<!–Calendar for
–>
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
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.
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);
}
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.
Great plugin - thank you so much for making it! I’ve been searching for something like this for months. It works like a charm.
Hi. Nice plugin there, but it’s not working right with my theme. Help! =P
It works nice up to the point where it creates the a node, but after that it doesn’t add the text node that should display the [+] link.
In the default theme it works fine, so I don’t know where’s the flaw.
Thanks!
If it’s working for you in the default theme, then the issue is probably related to the difference in the HTML that your other theme generates.
There are some basic settings to adjust for this in the admin options panel (the ID of the sidebar div, widget CSS class names, etc.), which are hopefully enough to get things working for you.