Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-13-2004, 10:54 AM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 03-13-2004, 09:08 PM
Tony G's Avatar
Tony G Tony G is offline
 
Join Date: Nov 2001
Location: Melbourne, Australia
Posts: 8,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I *think* it involes hacking if you want to make a certain table collapse and expand.
Reply With Quote
  #3  
Old 03-13-2004, 09:10 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just want the collapsin that comes as standard on all tables in vB3
Reply With Quote
  #4  
Old 07-27-2004, 02:32 AM
Koutaru's Avatar
Koutaru Koutaru is offline
 
Join Date: Feb 2003
Location: IL
Posts: 589
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 07-27-2004, 01:44 PM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ...
Reply With Quote
  #6  
Old 07-28-2004, 03:05 AM
Koutaru's Avatar
Koutaru Koutaru is offline
 
Join Date: Feb 2003
Location: IL
Posts: 589
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 07-29-2004, 09:47 AM
Fairclough Fairclough is offline
 
Join Date: Mar 2004
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It worked for me.

Thanks for that.
Reply With Quote
  #8  
Old 08-24-2004, 05:06 AM
Code Monkey's Avatar
Code Monkey Code Monkey is offline
 
Join Date: May 2004
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #9  
Old 08-25-2004, 02:47 AM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the cookie should be updated with your extra blocks by the javascript that handles it ...
Reply With Quote
  #10  
Old 09-26-2004, 12:52 PM
evil kev evil kev is offline
 
Join Date: May 2004
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:11 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.04439 seconds
  • Memory Usage 2,254KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete