Making Subforums Collapsible

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • QtrCafe
    Member
    • Feb 2005
    • 71

    Making Subforums Collapsible

    Hello All,

    I have recently changed the layout of my subforums to look like a navigation in a side column rather than being on top of my threads.

    I have so many subforums of subforums and will be creating even more. Most probably 500+ hence I would like to use the collapsible boxes in order to get things looking neat

    I have tried using the below code however the code will only work on the first category. If I click in the last category the effect will take place for the first as well. I think the code is not picking up all the categories IDs. I would appreciate it if someone could help.

    Here is the code that I am using for forumhome_forumbit_level1_post
    Code:
    <tbody>
        <tr>
            <td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
                <a style="float:$stylevar[left]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')">$forum[title]</a>
                <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
                <if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
            </td>
        </tr>
        <if condition="$childforumbits">
            <tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}; display:none">
            <tr>
                <td>
                $childforumbits
                </td>
            </tr>
            </tbody>
        </if>
    </tbody>
    Regards,
    Omar
    Last edited by QtrCafe; Thu 16 Jul '09, 7:50am.
  • daPLAYBOY
    New Member
    • Aug 2006
    • 20
    • 4.1.x

    #2
    hope this helps..look here:



    and:

    Comment

    • QtrCafe
      Member
      • Feb 2005
      • 71

      #3
      Originally posted by daPLAYBOY
      Thanks .. however I am not looking for a dropdown menu. I would like to have a collapsible table instead as I will be using it as a navigation

      thanks anyways

      Comment

      • QtrCafe
        Member
        • Feb 2005
        • 71

        #4
        Anyone ??!!

        Comment

        • QtrCafe
          Member
          • Feb 2005
          • 71

          #5
          I got it
          if anyone is interested then here it is

          Code:
          <div class="tcat">
             <if condition="$childforumbits">
             <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forum[forumid]')"><img id="collapseimg_forumbit_$forum[forumid]" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forum[forumid]}.gif" alt="" border="0" /></a>
             </if>
             <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
             <if condition="$show['forumdescription']"><span class="smallfont"> &raquo; $forum[description]</span></if>
             <if condition="$show['subforums']"><span class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
          </div>
          <div class="border_left_top"<if condition="!$show['collapsable_forums']"> id="collapseobj_forumbit_$forum[forumid]" style="{$collapseobj_forum[forumid]}"</if>>
          <if condition="$childforumbits">
          $childforumbits
          </if>
          </div>
          Thanks to the guys in vbcodex.com

          Comment

          • kehindelawal
            Member
            • Apr 2014
            • 71
            • 5.0.X

            #6
            Hi . you did not say where to add this code. i take it it is the css_additional.css. will try that and report. thanks.

            Comment

            • Wayne Luke
              vBulletin Technical Support Lead
              • Aug 2000
              • 73976

              #7
              Originally posted by kehindelawal
              Hi . you did not say where to add this code. i take it it is the css_additional.css. will try that and report. thanks.

              It is not css_additional.css and the above code will not work in vBulletin 5.X.
              Translations provided by Google.

              Wayne Luke
              The Rabid Badger - a vBulletin Cloud demonstration site.
              vBulletin 5 API

              Comment

              • kehindelawal
                Member
                • Apr 2014
                • 71
                • 5.0.X

                #8
                Originally posted by Wayne Luke


                It is not css_additional.css and the above code will not work in vBulletin 5.X.
                Thanks for this. is it doable at all in vbulletin 5?

                Comment

                • OneEyedJack
                  New Member
                  • May 2017
                  • 3
                  • 5.3.x

                  #9
                  Following

                  Comment

                  • Mark.B
                    vBulletin Support
                    • Feb 2004
                    • 24286
                    • 6.0.X

                    #10
                    This doesn't work in vBulletin 5. The thread was last posted to almost three years ago, the original code was posted nine years ago, and the person who posted it no longer even has a vBulletin license.

                    I would suggest "following" this thread isn't likely to yield a great deal.
                    MARK.B
                    vBulletin Support
                    ------------
                    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
                    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

                    Comment

                    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                    Working...