PDA

View Full Version : Forum Navigation collapsable


stonner
11-05-2007, 08:32 PM
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:

<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.


<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 1194350802 at 1194350802 ---------------

any ideas?

Analogpoint
11-06-2007, 03:18 PM
This should do it.

<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?