Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Collapsible Panel

24

Comments

  • New Description, contains some useful info. I'll take a look at the problem with the images when I have some more time skube but thanks for the heads-up.
  • Wow, quick update and neat settings interface, thanks a lot!

    Now if you're still ready for some coding frenzy... I've got something for you :P

    I was playing with Discussion Overview and various addons, trying to turn Vanilla into a kind of blog/forum hybrid, then suddenly thought collapsible categories with Discussion Overview would be freaking awesome.

    Does it sound possible? Something like a simple button next to the category title, allowing to collapse/expand the discussions under the category, working the same way than Collapsible Panel. I guess it would make happy everyone who keeps asking for categories on the front page and make an interesting discussions list alternative (and it would make me very happy too.)
  • If the HTML's already there then making things collapsible is pretty easy (especially with Mootools). From what I can see, Discussion Overview only shows the most recent post in each category so I don't see much point to expanding/collapsing one row. If Discussion Overview showed, say, the 10 most recent posts then I could employ a pretty cool Accordion effect.
  • In fact it shows the ten most recent posts in each category (and there's a setting for the number of posts). The reason why I'd like to make the discussions collapsible in overview mode is because the "block category" option looks quite blunt in my opinion, a bit like if it was about saying "this category sucks, please block it".

    Gently collapsing discussions sounds (and looks) way more friendly than "blocking" in my opinion. And the block option doesn't seem to work with Discussion Overview anyway...

    In my case I intend to use Discussion Overview to display different categories with role-based access: one for official announcements, several allowing comments but no new discussion, one allowing everything, etc. Compared to the "classic" Vanilla setup, the front page would display the five most recent posts of each of the ten (or around ten) categories. That's also why collapsing would make navigation easier for people who don't want a loooong home page.
  • Seems perfectly possible. So you want to allow people to see the first 5 (configurable) most recent posts in a category block but have each of those category blocks collapsible. Presumably you want to prevent people from seeing the categories they cannot view (read access). Would you like the same setup as with Collapsible Panels in that their settings would be saved or would you prefer a simpler, Accordion effect which only allows one category to be open at any one time?
  • I was thinking about the five latest posts for each category because I've read in another thread that someone had major speed issues with displaying lots of discussions with Discussion Overview. He really had too much categories and his home page was huge, but in my case the number of categories could grow up quite easily, so I wanted to display a minimal amount of discussions just in case. A configurable amount of discussions would be useful, of course.

    As you said, categories not supposed to be seen shouldn't appear (I've tried CategoryRoles for the more specific access settings and it works fine.)

    About the accordion effect, maybe it could be a user preference. It sounds nice, but if for example a user is especially interested in two categories, he would have to read them one after the other constantly. Collapsed items staying collapsed and expanded items staying expanded sounds more navigation-friendly.

    There would still be some "View all" links for each category block, allowing to go directly to a category's page. Another feature (but this could be a different extension) would be to add a "Browse next category" link at the end of each category page, a bit like Next Unread Discussion but for categories. This way people wouldn't have to come back to the home page to check all posts in a given category.

    Thanks for your time!
  • Hi Fyorl, I've just noticed there seems to be a problem with Collapsible Panel and the categories settings page. Dragging & dropping doesn't work when Collapsible Panel is enabled, and Firebug gives me a couple of errors when I try to re-order categories. Sorry I can't paste them here, I don't have access to my local installation right now.
  • Yup, that's the scriptaculous incompatibility again. I'll try to have that fixed in the next Mootools release.
  • with this extension, if i try an preview a post i get this error "Fatal error: Call to a member function on a non-object in /home/virtual/site448/fst/var/www/html/extensions/CollapsiblePanel/default.php on line 31"
  • bump, anyone?
  • OK well that's a bit weird. I'll have a look into it first chance I get.
  • thanks, let me know if you need more info from me FIXED BY UPDATING TO THE NEWEST PREVIEW POST EXTENSION
  • Huh? That's weird... I'll ignore the error for now as I can't reproduce it. Line 31 shouldn't cause any problems really.
  • Progress Update: After much digging, the compatibility issues with Mootools and Scriptaculous only occur with CollapsiblePanel because of its use of the 'Hash' plugin. Some slight modifications to change the namespace should be all that's necessary to rectify these issues.
  • Uploaded version 2.1 of Collapsible Panel.
  • The Hash.Cookie problem is fixed but there are still errors occurring when prototype is present. I have no idea what's causing these errors as they seem to occur in the prototype.js file.
  • I get this error with Firebug:

    MooHash is not defined
    [Break on this error] var HashCookie = new MooHash.Cookie('CP_Settings', {duration: 3650});
  • Ah yes, I forgot to mention that you'll also need to update the Mootools extension and delete all the files in its cache folder.
  • If you don't use the Mootools extension, I'll just quickly update the fallback script to use the new namespace.
  • Uploaded version 2.1 of Collapsible Panel.
This discussion has been closed.