vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Collapsing (https://vborg.vbsupport.ru/showthread.php?t=88634)

MindTrix 03-13-2004 10:54 AM

Collapsing
 
I've searched this site, vb.com and vb.org and drew a blank.

Can someone give me proper instructions about how to make a table that can collapse and expand? Cheers :)

Tony G 03-13-2004 09:08 PM

I *think* it involes hacking if you want to make a certain table collapse and expand.

MindTrix 03-13-2004 09:10 PM

Just want the collapsin that comes as standard on all tables in vB3 :p

Koutaru 07-27-2004 02:32 AM

Anyone have a clue in this ^^; ? I'm trying to make something collapse but the templates aren't doing it. I've installed hacks that done this without code changes. Very odd.

Natch 07-27-2004 01:44 PM

OK...

You basically need to have your content in a wrapper that will be the visible part when the content is collapsed, and add an id="uniquename" to your content...

Template (this will give you an idea):
HTML Code:

<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
                <td class="tcat" style="$stylevar[left]">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('uniquenamehere')"><img id="collapseimg_uniquenamehere" src="$stylevar[imgdir_button]/collapse_tcat$collapseimg_uniquenamehere.gif" alt="" border="0" /></a>
                        <span class="smallfont">Title Here</strong></span>
                </td>
        </tr>
</thead>
<tbody id="collapseobj_uniquenamehere" style="$collapseobj_uniquenamehere">
        <tr>
                <td class="$getbgrow">

INSERT ALL YOUR CONTENT HERE

                </td>
        </tr>
</tbody>
</table>
<br />

The "trick" is in the "uniquenamehere" value (occurs 5 times!) you will change for each collapsible box - this needs to be different across your entire site, as the functions will store a cookie with this unique value and refer to that to get the collapsed / expanded state of your block of code...

If this is not clear enuff, please let me know ...

Koutaru 07-28-2004 03:05 AM

Hmm I tried that but it still wouldn't collapse right, like if you click on the button, it will disappear but not collapse :/ Very very odd. Let me check it out again I suppose

Fairclough 07-29-2004 09:47 AM

It worked for me.

Thanks for that. :D

Code Monkey 08-24-2004 05:06 AM

This was a great help.

But I don't understand this in tbody

style="$collapseobj_uniquenamehere"

Where is that variable set?

Also, how do you get the cookie set to remember if the table is collapsed or not?

Natch 08-25-2004 02:47 AM

the cookie should be updated with your extra blocks by the javascript that handles it ...

evil kev 09-26-2004 12:52 PM

i too have been trying to make the collapsible menu's and have managed to make them work but not save in the cookies. i don't know what i'm doing wrong but it's really annoying.

does anyone know what the critera is to make the information be saved correctly in the cookies are variables defined somewhere? its really bugging me because a chunk of the redesign of my site relies on having things saved hideable hmm?


All times are GMT. The time now is 11:39 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.03416 seconds
  • Memory Usage 1,732KB
  • 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
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete