Back to vBulletin 3.6 Add-ons

navbar forumjump dropdown
Mod Version: 1.00, by Floris

This modification is in the archives.
vB Version: 3.6.4 Rating: (2 votes - 4.50 average) Installs: 12
Released: 21 Dec 2006 Last Update: Never Downloads: 52
Not Supported Uses Plugins Template Edits Is in Beta Stage  

This is beta, and I won't support it.

What does this do?

This will add a dropdown to your navbar that lists the forums below a parent forum.

On my bro's site we have a list of 12 worksheets, and each worksheet is a forum. We needed a list of all 12 worksheets for quick navigation. Instead of me getting emails every time they make a forum change, the dropdown is now auto updated, populated and I don't have to worry those emails anymore.

It uses forumcache (tnx danny) so it won't add a query to each page, unless it needs to.

===== TEMPLATE CHANGES =====
Open the template: navbar, and find this code:
Code:
<if condition="$show['registerbutton']">
Above this, add the following code:
Code:
<td id="navforums" class="vbmenu_control"><a href="$show[nojs_link]#navforums">Pick a Forum!</a> <script type="text/javascript"> vbmenu_register("navforums"); </script></td>
Then find this code:
Code:
<!-- / NAVBAR POPUP MENUS -->
And above this, add the following code:
Code:
<!-- popup navforums -->
    <div class="vbmenu_popup" id="navforums_menu" style="display:none">
        <table cellpadding="4" cellspacing="1" border="0">
            <tr><td class="thead">Quickly jump to one of the forums</td></tr>
                $navbarforum
        </table>
    </div>
    <!-- / popup navforums -->
And save the template.

===== PLUGIN =====
Create a new plugin in the global_start hook location, call it navbarforums and give it this code:
Code:
if (is_array($vbulletin->forumcache))
{
    foreach ($vbulletin->forumcache AS $forum)
    {
          if ($forum[parentid] == 7)
          {
        $navforumid = $forum[forumid];
                $navforumtitle = $forum[title]; 
                $navbarforum .= "<tr><td class=\"vbmenu_option\"><a href=\"forumdisplay.php?f=".$navforumid."\" rel=\"nofollow\">".$navforumtitle."</a></td></tr>";
          }
    }
}
else
{
       $navbarforums = $db->query_read("
        SELECT forumid, title
        FROM " . TABLE_PREFIX . "forum
        WHERE parentid = '7'
        ");
        while ($navbarresult = $db->fetch_array($navbarforums))
        {
            $navforumid = $navbarresult[forumid];
            $navforumtitle = $navbarresult[title];
            $navbarforum .= "<tr><td class=\"vbmenu_option\"><a href=\"forumdisplay.php?f=".$navforumid."\" rel=\"nofollow\">".$navforumtitle."</a></td></tr>";
        }
}
Find the if ($forum[parentid] == 7) to point to your forumid
(that means, change the 7 to your PARENT forumid, as it will get all the childforums below this parent)

And you're done.

Q : Does it list the subforums below the forums too?
A : No, only the first level forums below the parentid.

Q : My list is too long!
A : Your parentid has a lot of forums.

Download

This modification is archived, downloads are still allowed.

File Type: %1$s install_plugin_navbarforums.txt (2.1 KB, 82 downloads)

Similar Mods

End-User Options Navbar Forumjump- Adds a DHTML "Forum Jump" menu to your Navbar vBulletin 3.6 Add-ons
Mini Mods Move forumjump to the navbar with javascript vBulletin 3.6 Template Modifications

vblts.ru supports vBulletin®, 2022-2024