• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • 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 !

Status
Not open for further replies.

cclaerhout

Well-known member
#1
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

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


Configuration
> 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
Translations
References
Paypal donation
License
 

Attachments

cclaerhout

Well-known member
#3
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 :)
 

cclaerhout

Well-known member
#5
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)
 

ManuTdi

Active member
#6
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?
 

cclaerhout

Well-known member
#8
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?
The memory is based on cookie not on database. So if you log out, we will have to press back on the collapsed button.
 

DRE

Well-known member
#9
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.
 

cclaerhout

Well-known member
#10
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.
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 :)
 

DRE

Well-known member
#13
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 :)
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.

Examples:

World Time Map Page
http://www.the8thlegion.com/forum/threads/world-time-map-page.5926/

Pixlr Online Photo Editor
http://www.the8thlegion.com/forum/threads/pixlr-online-photo-editor.5877/

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.
 

cclaerhout

Well-known member
#14
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.

Examples:

World Time Map Page
http://www.the8thlegion.com/forum/threads/world-time-map-page.5926/

Pixlr Online Photo Editor
http://www.the8thlegion.com/forum/threads/pixlr-online-photo-editor.5877/

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.
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).
 

DRE

Well-known member
#15
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).
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!

Thanks!

BUT

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.
 

yavuz

Well-known member
#16
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.
 

Luis

Well-known member
#19
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.
 
Status
Not open for further replies.