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 11-05-2007, 08:32 PM
stonner stonner is offline
 
Join Date: Jun 2006
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Forum Navigation collapsable

Hi,

I made a new module in vbadvanced for the forum navigation: www.schuelercommunity.com/forum.php

Now, I'd like to make main forums such as "Lehrerzimmer" and "Lounge" collapsable. They should be collapsed by default.

I'm using a template module with the following template-content:

Code:
<tr class="alt2">
<td class="smallfont"><a href="http://www.schuelercommunity.com/forum/forumdisplay.php?f=6">&raquo; <b>Lehrerzimmer</b></td>
</a></tr>
<tr class="alt1">
<td class="smallfont"><a href="http://www.schuelercommunity.com/forum/forumdisplay.php?f=60">Fragen zu SC</a></td>
</tr>
<tr class="alt1">
<td class="smallfont"><a href="http://www.schuelercommunity.com/forum/forumdisplay.php?f=10">News</td>
</tr>
<tr class="alt1">
<td class="smallfont"><a href="http://www.schuelercommunity.com/forum/forumdisplay.php?f=40">Lob, Kritik & Vorschl?ge</a></td>
</tr>

<tr class="alt2">
<td class="smallfont"><a href="http://www.schuelercommunity.com/forum/forumdisplay.php?f=7">&raquo; <b>Lounge</b></a></td>
</tr>
<tr class="alt1">
<td class="smallfont"><a href="http://www.schuelercommunity.com/forum/forumdisplay.php?f=20">Schule allgemein</a></td>
</tr>
<tr class="alt1">
<td class="smallfont"><a href="http://www.schuelercommunity.com/forum/forumdisplay.php?f=11">Plauderecke</a></td>
</tr>
<tr class="alt1">
<td class="smallfont"><a href="http://www.schuelercommunity.com/forum/forumdisplay.php?f=27">Stell dich vor</a></td>
</tr>
<tr class="alt1">
<td class="smallfont"><a href="http://www.schuelercommunity.com/forum/forumdisplay.php?f=29">Game Lounge</a></td>
</tr>
<tr class="alt1">
<td class="smallfont"><a href="http://www.schuelercommunity.com/forum/forumdisplay.php?f=12">Marktplatz</a></td>
</tr>
<tr class="alt1">
<td class="smallfont"><a href="http://www.schuelercommunity.com/forum/forumdisplay.php?f=52">Arbeitswelt</a></td>
</tr>
I appreciate any help!
thank you
Reply With Quote
  #2  
Old 11-05-2007, 08:53 PM
Analogpoint's Avatar
Analogpoint Analogpoint is offline
 
Join Date: Feb 2007
Posts: 656
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's a template for making collapsible boxes. Extract what you need from it.

Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="180">
<thead>
<tr>
	<td class="thead">
		<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('MYBOX')"><img id="collapseimg_MYBOX" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_MYBOX].gif" alt="" border="0" /></a>
		TITLE HERE
	</td>
</tr>
</thead>
<tbody id="collapseobj_MYBOX" style="$vbcollapse[collapseobj_MYBOX]">
<tr>
	<td class="alt1" nowrap="nowrap">CONTENTS HERE</td>
</tr>
</tbody>
</table>

see also
https://vborg.vbsupport.ru/showthread.php?t=119931
Reply With Quote
  #3  
Old 11-05-2007, 09:54 PM
stonner stonner is offline
 
Join Date: Jun 2006
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you very much!

I could use this code: www.schuelercommunity.com/forum.php

Now, is it possible to make the by default collapsed?

And the first collaps-button of the module doesn't collaps anymore. This is not serious but how could I solve this?

thank you

--------------- Added [DATE]1194350802[/DATE] at [TIME]1194350802[/TIME] ---------------

any ideas?
Reply With Quote
  #4  
Old 11-06-2007, 03:18 PM
Analogpoint's Avatar
Analogpoint Analogpoint is offline
 
Join Date: Feb 2007
Posts: 656
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This should do it.
Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="180">
<thead>
<tr>
	<td class="thead">
		<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('MYBOX')"><img id="collapseimg_MYBOX" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_MYBOX].gif" alt="" border="0" /></a>
		TITLE HERE
	</td>
</tr>
</thead>
<tbody id="collapseobj_MYBOX" style="<if condition="isset($vbcollapse[collapseobj_MYBOX])">$vbcollapse[collapseobj_MYBOX]<else />display: none;</if>">
<tr>
	<td class="alt1" nowrap="nowrap">CONTENTS HERE</td>
</tr>
</tbody>
</table>
Reply With Quote
  #5  
Old 11-08-2007, 03:43 PM
stonner stonner is offline
 
Join Date: Jun 2006
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much! That worked!

But now, it doesnt save the setting of the user. they are collapsed on every page load.

Before that, I saved if one was collapsed or not and it saved this.

is this also possible?
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 07:14 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03704 seconds
  • Memory Usage 2,209KB
  • 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
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete