vb.org Archive

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

stonner 11-05-2007 08:32 PM

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

Analogpoint 11-05-2007 08:53 PM

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


stonner 11-05-2007 09:54 PM

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?

Analogpoint 11-06-2007 03:18 PM

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>


stonner 11-08-2007 03:43 PM

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?


All times are GMT. The time now is 06:49 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.01555 seconds
  • Memory Usage 1,729KB
  • 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
  • (3)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