vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Programming Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=188)
-   -   Collapse Tables by Default (https://vborg.vbsupport.ru/showthread.php?t=67384)

TouchingVirus 07-18-2004 10:00 PM

Collapse Tables by Default
 
Well, i just thought i would tell you all how to make things be collapsed by default because i didnt see anything relating to it on the forums.

In vB3, theres the handy feature to collapse items, but once your cookies are cleared, they are expanded by default again..well here is how to default it to collapsed

in your templates, find the tbody you require.. for example..

Code:

<tbody id="collapseobj_forumhome_XXXXXXXX" style="$vbcollapse[collapseobj_forumhome_XXXXXXXX]">
Change the style variable to display:none, so the example above would now read:

Code:

<tbody id="collapseobj_forumhome_XXXXXXXX" style="display:none">

And thats it, your table is now collapsed by default. Obviously you can expand it as usual. Hope you enjoyed this little tip and apologies if its already posted!

mzenner 01-05-2005 03:22 AM

Thanks :) was playing with this today and it is cool :)
found the stuff also myself but forgot the
style="$vbcollapse[collapseobj_forumhome_XXXXXXXX] -> that is to make sure the cookie remembers it ;)

thanks to this thread i found out what i needed to do :)

Michael Morris 01-05-2005 07:43 PM

Be careful with this - users with javascript disabled won't be able to expand the tables.

Milchi 07-11-2005 02:29 PM

Is it possible to code it so that not all people have always to open all Categories? Now it is like u have to reopen all categories u want each time u visit "Forumhome"

Paul M 07-11-2005 02:48 PM

Won't this also mean it's collapsed everytime you revisit, even if you left it open on your last visit ?


All times are GMT. The time now is 09:13 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01150 seconds
  • Memory Usage 1,708KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete