MyBB Community Forums

Full Version: Creating a Collapsable section in my header ...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have found a couple of topics on this, but they are old and don't seem to work anymore ... So I searched in the code and found this :

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead" colspan="5">
<div class="expcolimage"><img src="{$theme['imgdir']}/{$expcolimage}" id="cat_{$forum['fid']}_img" class="expander" alt="{$expaltext}" /></div>
<div><strong><a href="forumdisplay.php?fid={$forum['fid']}">{$forum['name']}</a></strong><br /><div class="smalltext">{$forum['description']}</div></div>
</td>
</tr>
</thead>
<tbody style="{$expdisplay}" id="cat_{$forum['fid']}_e">
<tr>
<td class="tcat" width="35">&nbsp;</td>
<td class="tcat"><strong>{$lang->forumbit_forum}</strong></td>
<td class="tcat" width="85" align="center" style="white-space: nowrap"><strong>{$lang->forumbit_threads}</strong></td>
<td class="tcat" width="85" align="center" style="white-space: nowrap"><strong>{$lang->forumbit_posts}</strong></td>
<td class="tcat" width="200" align="center"><strong>{$lang->forumbit_lastpost}</strong></td>
</tr>
{$sub_forums}
</tbody>
</table>

It seems that these parts are responsible for the collapsing features :

<div class="expcolimage"><img src="{$theme['imgdir']}/{$expcolimage}" id="cat_{$forum['fid']}_img" class="expander" alt="{$expaltext}" /></div>

<tbody style="{$expdisplay}" id="cat_{$forum['fid']}_e">
</tbody>

The code is suppose to show (or not) what's inside the tbody tags right ?

But my problem is that the code doesn't seem to "render" the {$expcolimage}{$expaltext}{$expdisplay} variables ...

Anyways ... what's the best way to do this ?