The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
How To Add Drop Down Menus To Your Navbar
I think everyone has encountered the situation at some point or other where their navbar has got very cluttered and they are faced with either adding yet another navbar, or adding some dropdown menus to group some items. This tutorial explains how to create an additional drop down menu in your navbar. Firstly, locate in your navbar template the first instace of Code:
<if condition="$show['popups']"> Code:
<td id="custommenu" class="vbmenu_control"> <a href="#">Custom Menu</a> <script type="text/javascript"> vbmenu_register("custommenu"); </script> </td> Next, in your navbar template find Code:
<!-- NAVBAR POPUP MENUS --> Code:
<div class="vbmenu_popup" id="custommenu_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0"> <tr> <td class="thead">Custom Menu</td> </tr> <tr> <td class="vbmenu_option" title="nohilite"> content row </td> </tr> </table> </div> The content row should be replaced with the actual menu item that you want to have in your new drop down menu. Repeat the code Code:
<tr> <td class="vbmenu_option" title="nohilite"> content row </td> </tr> If you wish to break your menu into sections like the quicklinks use then add Code:
<tr> <td class="thead">Custom Menu</td> </tr> The content added should be in the normal html format for links. If you wish to add more than one menu, repeat the process for each one, ensuring that you use a different name for each menu otherwise they will not function correctly. I hope you find this useful. |
#162
|
||||
|
||||
Quote:
|
#163
|
|||
|
|||
Oh. Duh. Sorry to bother you. Thanks for kickstarting my brain!
|
#164
|
|||
|
|||
i cant get this to work in 3.8.4....do the instructions on the first post work in 3.8.4?
|
#165
|
||||
|
||||
Yes. But, if you are using a custom style, you may have to change things slightly due to changes between the default style and your custom style.
|
#166
|
|||
|
|||
I've tried to get this work and no luck. It hasn't showed up in the nav bar for me. For a quick instance it showed up next to my log in information, but that disappeared.
Here's my code. As far as I can see for Step 1 I found the correct. Here's my code broken up with the bolded parts being what I had added in. If the entire code is needed, let me know. I figured this would might be easy to determine if and where I messed up Code:
<if condition="$show['notifications']"> <div><span id="notifications"><a href="usercp.php$session[sessionurl_q]">$vbphrase[your_notifications]:</a> <strong>$notifications_total</strong></span></div> <if condition="$show['popups']"> <td id="links" class="vbmenu_control"> <a href="http://www.pittsburghsportstavern.com/cmps_index.php?pageid=steelersaffiliates">Links</a> <script type="text/javascript"> vbmenu_register("links"); </script> </td> <script type="text/javascript"> vBmenu.register("notifications"); </script> <else /> <script type="text/javascript" Code:
<if condition="$show['popups']"> <!-- NAVBAR POPUP MENUS --> <div class="vbmenu_popup" id="links_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0"> <tr> <td class="thead">Links</td> </tr> <tr> <td class="thead">Steelers Links</td> </tr> <tr> <td class="vbmenu_option" title="nohilite"> <a href="http://www.pittsburghsportstavern.com/cmps_index.php?pageid=steelersaffiliates">Steelers Affiates</a> </td> </tr> <tr> <td class="vbmenu_option" title="nohilite"> <a href="http://www.pittsburghsportstavern.com/cmps_index.php?pageid=steelersnewslinks">Steelers News Sites</a> </td> </tr> <td class="vbmenu_option" title="nohilite"> <a href="http://www.pittsburghsportstavern.com/cmps_index.php?pageid=nflsites">NFL News And Info</a> </td> </tr> <tr> <td class="thead">Penguins Links</td> </tr> <td class="vbmenu_option" title="nohilite"> <a href="http://www.pittsburghsportstavern.com/cmps_index.php?pageid=penstavernaffiliates">Pens Affiliates</a> </td> </tr> <td class="vbmenu_option" title="nohilite"> <a href="http://www.pittsburghsportstavern.com/cmps_index.php?pageid=pensnewssites">Pens News Sites</a> </td> </tr> <td class="vbmenu_option" title="nohilite"> <a href="http://www.pittsburghsportstavern.com/cmps_index.php?pageid=nhlnews">NHL News And Info</a> </td> </tr> <tr> <td class="thead">Piarates Links</td> </tr> <td class="vbmenu_option" title="nohilite"> <a href="http://www.pittsburghsportstavern.com/cmps_index.php?pageid=piratesfriends">Pirates Affiliates</a> </td> </tr> <td class="vbmenu_option" title="nohilite"> <a href="http://www.pittsburghsportstavern.com/cmps_index.php?pageid=piratesnews">Pirates News Sites</a> </td> </tr> <td class="vbmenu_option" title="nohilite"> <a href="http://www.pittsburghsportstavern.com/cmps_index.php?pageid=mlbnews">MLB News And Info</a> </td> </tr> </table> </div> <if condition="$show['communitylink']"> <!-- community link menu --> |
#167
|
||||
|
||||
You are adding the code into your navbar where the Notifications are supposed to go. You need to add it amongst the other navbar links.
|
#168
|
|||
|
|||
Ah... Thank you. I had been wondering why I wasn't putting any code where the Nav Buttons are. I guess for 3.8 it would be the 2nd instance of
Code:
<if condition=$show['popups']"> |
#169
|
||||
|
||||
Try it and see. (Sorry, I've always left that there, so I don't know what happens if you remove it.)
|
#170
|
|||
|
|||
Will this work with
PHP Code:
|
#171
|
||||
|
||||
I don't know why you have that extra <if>. This should work:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|