Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
How To Add Drop Down Menus To Your Navbar
peterska2
Join Date: Oct 2003
Posts: 6,504

 

Manchester, UK
Show Printable Version Email this Page Subscription
peterska2 peterska2 is offline 07-29-2006, 10:00 PM

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']">
and add after it
Code:
<td id="custommenu" class="vbmenu_control">
    <a href="#">Custom Menu</a>
    <script type="text/javascript">
        vbmenu_register("custommenu");
    </script>
</td>
Replace Custom Menu with the title for this menu which you want displayed on your navbar and custommenu with the name that you want to give your link. Note that spaces are not to be used as this will break the connection with the actual menu.

Next, in your navbar template find
Code:
<!-- NAVBAR POPUP MENUS -->
and add after it
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>
Again replace custommenu with the name given to your link. Make sure that you leave the _menu after it as this identifies it as the menu part of the link. Also replace Custom Menu again with the title that you have used for your link.

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>
as required to add additional links onto your menu.

If you wish to break your menu into sections like the quicklinks use then add
Code:
<tr>
            <td class="thead">Custom Menu</td>
        </tr>
everywhere that you wish to add a new header.

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.
Reply With Quote
  #72  
Old 09-12-2007, 06:37 AM
tipoboy's Avatar
tipoboy tipoboy is offline
 
Join Date: Dec 2005
Location: scotland
Posts: 693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try placing the first part (where you want the link to show) inthe relitive part of your header template and the (second part) in the correct place in the navbar template. i'm not sure if it would work but it would be the first thing i tried!

EDIT: that does not work! sorry
Reply With Quote
  #73  
Old 10-04-2007, 04:15 PM
ncangler's Avatar
ncangler ncangler is offline
 
Join Date: Dec 2004
Location: North Carolina
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kerry-Anne,

I can't thank you enough for this. You've eliminated my Navbar clutter. Thanks!
Reply With Quote
  #74  
Old 10-04-2007, 11:50 PM
Phooey Phooey is offline
 
Join Date: May 2004
Location: Wisconsin, USA
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone know how to center the drop down box below the item as opposed to it lining up on the left? Thanks!
Reply With Quote
  #75  
Old 10-31-2007, 08:25 PM
madotds madotds is offline
 
Join Date: Oct 2007
Location: UK
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi I know this is an old article but i hope there is stall some support for it

I have in stalled this and have it working fine but for on problem! underneath the navbar on the left handside i get a link "member links" which lead to nowhere! if i disable the drop down list it disappears

Please see for yourself HERE

It is doing my head in now!

Please help

Edit: Never mind had to do it the hard way but got it sorted now
Reply With Quote
  #76  
Old 11-20-2007, 08:06 AM
powerful_rogue powerful_rogue is offline
 
Join Date: Jan 2007
Location: Kent
Posts: 603
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Ive just installed this on my forum and got it working Thank you

Is there anyway though of moving where the dropdown shows on the navbar? Ive attatched a screenshot of where it currently is and where I would like to move it to. Ive tried having a play around, but i cant get it to work.

Below is my navbar template as well.

If anyone can help, this would really be appreciated.
Attached Images
File Type: jpg link.jpg (16.8 KB, 0 views)
Attached Files
File Type: txt navbar.txt (23.1 KB, 17 views)
Reply With Quote
  #77  
Old 02-28-2008, 06:39 PM
odln018's Avatar
odln018 odln018 is offline
 
Join Date: Mar 2006
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kerry, I'm having some difficulty with this. Could I get your assistance via PM?
Reply With Quote
  #78  
Old 03-02-2008, 11:35 AM
FOMSCU Forum's Avatar
FOMSCU Forum FOMSCU Forum is offline
 
Join Date: Jan 2008
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry did not work with me at all
Reply With Quote
  #79  
Old 03-15-2008, 02:56 PM
queueposition queueposition is offline
 
Join Date: Feb 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent article , love your style of writing , very easy to follow and edit. Please post more articles if possible on editing the main page structure.
Reply With Quote
  #80  
Old 03-18-2008, 05:41 AM
R1lover's Avatar
R1lover R1lover is offline
 
Join Date: Apr 2006
Location: Northern Ca
Posts: 428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In 3.7 Beta 6 (if that matters) the pop up is showing up to the left of the link on the navbar?

I have tried several things to correct this and I'm stumped?

any help?

I copied the code exactly as above.

--------------- Added [DATE]1205822677[/DATE] at [TIME]1205822677[/TIME] ---------------





--------------- Added [DATE]1205864561[/DATE] at [TIME]1205864561[/TIME] ---------------

Any help here?

The drop down menu shows up to the left of the menu title for the drop down... It seems others have this issue to after some searching and no answers so far.

???
Reply With Quote
  #81  
Old 03-19-2008, 09:53 AM
storpappa storpappa is offline
 
Join Date: Dec 2006
Location: USA
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a mod that lets the users add to the menu from within the Admin UI? I am setting up a forum for a customer and am trying to keep everything within the UI as much as possible. Ty
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:35 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07156 seconds
  • Memory Usage 2,327KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete