1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

ToggleME !

Discussion in 'Add-on Releases [Archive]' started by cclaerhout, Nov 28, 2011.

Thread Status:
Not open for further replies.
  1. cclaerhout

    cclaerhout Well-Known Member

    ToggleME v.1.6.1
    by Cédric CLAERHOUT
    Addon Presentation
    This addon will allow your users to collapse/expand forum categories on forum page (using one cookie to memorize user choice) and/or will allow them to expand the user extra information in postbit (see pictures). Several configuration options are available.
    (Tested on default style with FF, IE 8 , CHROME and OPERA)

    Version History
    2011/12/10: v.1.6.1
    • Small update to phrase three admin selection options. No need to update
    • Arg, I can't attach here more than 12 files. So the previous released have been included inside the main zip.
    2011/12/09: v.1.6
    • ToggleME now works with "wrapped subforums inside forum" with cookie memory
    • Previous Javascript code has been simplified
    • New CSS management: 1 css template for automatic update when using the xenForo Style properties options; 1 css to manually edit picture buttons (if needed)
    • ToggleME style configuration options are now in its own group: Appearance->Styles Properties->ToggleME
    • "CollaSped" mistake has been corrected ^^
    • >> Update special information: if you see a graphic problem with the new button, just edit the template "toggleme_page_container_js"... without editing it, but still saving it.
    2011/12/08: v.1.5
    • ToggleME shoud now be compatible with every themes and addons
    • Fix IE no white space bug when category collapsed
    2011/12/07: v.1.4
    • ToggleME now works in Conversations (extension of the postbit)
    • >>Top update from 1.3: just upload files
    2011/12/07: v.1.3
    • ToggleME options: per usergroups, per styles, per area (forumhome, postbit)
    • >>To update: upload files AND import xml to update AND configure this addon in admin->home->options->ToggleME
    2011/12/04: v.1.2
    • Toggle user extra information in postbit
    • >>Upload files AND import xml to update
    2011/11/30: v.1.1
    • Just one cookie to manage toggle memory (in version 1.0 : one cookie per category)
    • The code will now be compatible with addons using 'forum categories' (providing they respect a certain coding pattern)
    • >>Upload files to update
    2011/11/29: v.1.0 release

    1) Upload the files on your forum directory
    2) Import xml file

    > Configure this addon in admin->home->options->ToggleME
    > To configure the Appearance of the Collasped category, go to:
    admincp=>Appearance=>Style Properties=>Forum / Node List
    You will find three new settings:
    • -Category Strip Collasped
    • -Category Strip Collasped Title
    • -Category Strip Collasped Description
    Paypal donation

    Attached Files:

    CFodder, ShadyX, M@rc and 12 others like this.
  2. Digital Doctor

    Digital Doctor Well-Known Member


    Cool. Looks good.
    So if I clicked the [+] in the top right in the Main Category header, all the forums would be hidden ?
    Manu Ruiz Esteve likes this.
  3. cclaerhout

    cclaerhout Well-Known Member

    Nope, the Main Category is a "collapsed" group forum ;) I just wanted to show the toggle function also changed the colour of the category. And this colour can be easily configured thanks to xenForo system :)
  4. Digital Doctor

    Digital Doctor Well-Known Member

    So if I clicked the [-] in Categorie test, the forum super would not be shown ?
  5. cclaerhout

    cclaerhout Well-Known Member

    It's a classic toggle function :
    [-] : collapse the category (or forum alone or page alone ; I've implemented this as well)
    [+] : expand the category (or forum alone or page alone ; I've implemented this as well)
  6. ManuTdi

    ManuTdi Active Member

    Question: the collapse a category, if I leave my user account and go back inside, do the collapsed category still estandolo? Or I have to go back to collapse? Do you have memory?
  7. Digital Doctor

    Digital Doctor Well-Known Member

    It is using cookies, so I assume that is so the Toggles will persist [are memorized].
  8. cclaerhout

    cclaerhout Well-Known Member

    The memory is based on cookie not on database. So if you log out, we will have to press back on the collapsed button.
  9. DRE

    DRE Well-Known Member

    Installed, checked it out. I like it. Gonna keep it but just have one suggestion.

    Please consider adding an option to choose which categories are automatically collapsed or not through the category options under Node Tree options.
    Morgain and Manu Ruiz Esteve like this.
  10. cclaerhout

    cclaerhout Well-Known Member

    I could do it with some regex, but it wouldn't be clean. I would need a hook in the template "node_category_level_1" to check its id. So, this option won't be integrated yet, but I keep it in mind ;)

    I've just made this addon to try to understand how xenforo works... and try to get more familiar with jquery. Now I need time to do my own xen theme :)
  11. PoLiZe

    PoLiZe Well-Known Member

    Very great add-on !! I can translate this to Spanish Language to post only translation files on XenFacil (Spanish Community for XenForo) ?
    Manu Ruiz Esteve likes this.
  12. cclaerhout

    cclaerhout Well-Known Member

    I had forgot to mention this. My hacks here will be under the Creative Commons License "By 3.0". So feel free to distribute it or update it.
    Manu Ruiz Esteve and Romchik® like this.
  13. DRE

    DRE Well-Known Member

    Oh okay I'll explain why I suggested this feature in detail then.

    Although Admins can create their own pages, The only built-in menu for a list of pages is by creating a category of Pages. If an admin created a lot of pages then the page listing will be pretty long and clutter the forum index. For instance, I have my list of pages under the category 'Pages'. The only way I can see this category is by going to the admin panel because I do not have the node displayed (to prevent clutter). To prevent admins from having to go inside the admin panel to see their list of pages it would be a great idea to add that feature. Not only is it convenient for the admin, it's convenient for members who do not know about those extra pages even if you linked them in other places on your website.


    World Time Map Page

    Pixlr Online Photo Editor

    Those are pages that are not main navigation tabs. Some are underneath the navigation tabs but most members don't even look underneath for some reason. One of the links is a link in member's sidebar_visitor_panel, but most people haven't even noticed it. That's why the ability to leave a page node category collapsed or not collapsed would really come in handy so they could know what all you added.
  14. cclaerhout

    cclaerhout Well-Known Member

    I took me time to understand ^^ First, this version of the hack already works with pages as category or forum as category on the forum display page (level 0/node root). What you ask me, is to memorize user preference in the database. This is something I don't know how to do, and even on vBulletin, I only played with database when I was forced too ^^ I will have a look if there is some information on how to use database with Xen, but I can't promise you anything.

    I've been to your website. It's nicely done. I've seen the Toggle doesn't work with the shoutbox. You should try to replace the JS file with this one (in js directory). Tell me then if it works (with cookie memory).
  15. DRE

    DRE Well-Known Member

    Thank you! I work on the forum everyday. Glad it's showing!

    I uploaded it, cleared my cookies and temporary internet files and tried it in both Firefox 9 Beta, the latest version of Google Chrome and IE8 and it collapse the TaigaChat!



    This one automatically closes all nodes everytime I load the page after closing it the first time and re-opening it. It's doing that to me in firefox so I'm going to re-upload the old file.

    When I was referring to the node collapse option, I didn't mean to remember a user's preference. What I mean is the option to set a node to be collasped or uncollapsed on default.

    For instance, I'd want the forum node's subforums to show every time like the way it is now. But for the Page node, I'd like the page listing to not show. Anytime someone wants to see the list of pages they would have to click on it. The toggle does not have to remember if they toggled it on or off or not.
  16. yavuz

    yavuz Well-Known Member

    I uploaded the .js file to /js/toggleme and replaced the underscore with a dot. I can now confirm that it works with TaigaChat and remembers the toggle choise.
    cclaerhout likes this.
  17. cclaerhout

    cclaerhout Well-Known Member

    Thanks for feedback and to have found my mistake.
  18. cclaerhout

    cclaerhout Well-Known Member

    Version 1.1 released.
  19. Luis

    Luis Well-Known Member

    Thanks for the complement cclaerhout, only i have a question or suggestion, could this be adapted for use in the profiles of users in the posbit.

    Sorry for the english, i am using a translator.
  20. cclaerhout

    cclaerhout Well-Known Member

    Show me a picture please.
Thread Status:
Not open for further replies.

Share This Page