Problem with collapsing sections

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shaun Lyon
    Member
    • Apr 2004
    • 70
    • 3.0.0 'Gold'

    Problem with collapsing sections

    I've recently altered my forumhome_forumbit_level2_post template in order to have the subforums list be collapsible. It works perfectly, EXCEPT it doesn't hold the settings. It seems to write information into the cookies list in my browser, but while the main sections keep their collapsed/expanded settings fine, for some reason this doesn't work.

    Can anyone help? I'm baffled as to why it's not keeping the cookie information to keep this expanded or collapsed, while other expand/collapse options on level1_nopost works just fine!

    <tr align="center">
    <td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>
    <if condition="$show['subforums']">
    <td class="alt1Active" align="$stylevar[left]" id="$forum[forumid]" style="padding-top: 5px; padding-bottom: 5px; padding-left: 6px"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
    <else />
    <td class="alt1Active" align="$stylevar[left]" id="$forum[forumid]" style="padding-left: 6px">
    </if>
    <div>
    <if condition="$show['browsers']">
    <span class=cell onmouseover='changeBkgr(this)' onmouseout='changeBack(this)'><a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]" title="<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>"><strong>$forum[title]</strong></a></span>
    <else />
    <span class=cell onmouseover='changeBkgr(this)' onmouseout='changeBack(this)'><a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a></span>
    </if>
    </div>
    <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
    <if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&amp;f=$forum[forumid]">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>

    </td>
    <td class="alt2" nowrap="nowrap">$forum[lastpostinfo]</td>
    <td class="alt1">$forum[threadcount]</td>
    <td class="alt2">$forum[replycount]</td>
    <if condition="$vboptions['showmoderatorcolumn']">
    <td class="alt1"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
    </if>
    </tr>

    <if condition="$show['subforums']">
    <tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
    <td class="alt2">&nbsp;</td><td class="alt2Active" align="$stylevar[left]" id="$forum[forumid]" style="padding-left: 6px"><span class="startedby"><b>$vbphrase[subforums]</b>:</span> $forum[subforums]</td><td class="alt2">&nbsp;</td><td class="alt1">&nbsp;</td><td class="alt2">&nbsp;</td><if condition="$vboptions['showmoderatorcolumn']"><td class="alt1">&nbsp;</td></if>
    </tr>
    </tbody>
    </if>
    $childforumbits
    </if>
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    Try using:

    Code:
    style="$vbcollapse[collapseobj_forumbit_$forumid]"
    ...for the page element you want to be collapsed. Like this:

    Code:
    <if condition="$show['subforums']">
    <tbody id="collapseobj_forumbit_$forumid" [color=red]style="$vbcollapse[collapseobj_forumbit_$forumid]"[/color]>
    <td class="alt2">&nbsp;</td><td class="alt2Active" align="$stylevar[left]" id="$forum[forumid]" style="padding-left: 6px"><span class="startedby"><b>$vbphrase[subforums]</b>:</span> $forum[subforums]</td><td class="alt2">&nbsp;</td><td class="alt1">&nbsp;</td><td class="alt2">&nbsp;</td><if condition="$vboptions['showmoderatorcolumn']"><td class="alt1">&nbsp;</td></if>
    </tr>
    </tbody>
    </if>
    $childforumbits
    </if>

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    😀
    😂
    🥰
    😘
    🤢
    😎
    😞
    😡
    👍
    👎