PDA

View Full Version : Add A Drop Down Menu In Nav


v5etboyphc
01-19-2007, 10:00 PM
Add A Drop Down Menu In Your Navigation

What does it do?
add a drop down list for your navigation

Template to edit: Navbar

Instructions:
open template: navbar
find:
<if condition="$show['registerbutton']">
<td class="vbmenu_control"><a href="register.php?$session[sessionurl]" rel="nofollow">$vbphrase[register]</a></td>
</if>

Add below
<td id="yourmenu" class="vbmenu_control"><a href="$show[nojs_link]#YOURMENU">NAME</a> <script type="text/javascript"> vbmenu_register("YOURMENU"); </script></td>



In same template
Find:
<!-- / NAVBAR POPUP MENUS -->
Above add:
<if condition="$show['member']">
<!-- your tools menu -->
<div class="vbmenu_popup" id="YOURMENU_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$vbphrase[name]</td></tr>
<tr><td class="vbmenu_option"><a href="LINK">NAME</a></td></tr>
<tr><td class="vbmenu_option"><a href="LINK">NAME</a></td></tr>
<tr><td class="vbmenu_option"><a href="LINK">NAME</a></td></tr>
<tr><td class="vbmenu_option"><a href="LINK">NAME</a></td></tr>
</if>

</table>
</div>
<!-- / your tools menu -->
</if>

If you want more links simple just add
<tr><td class="vbmenu_option"><a href="LINK">NAME</a></td></tr>

before the
</if>

Last Part
Change all
YOURMENU
LINK
NAME
change all those and you all set

DEMO (http://www.g-worldz.com/forums/?styleid=1)

It seem hard but it pretty easy if you understand those and where to find and edit them

ShackMaster
01-29-2007, 05:01 AM
Any idea why my dropdown menu would open to the far left of my screen instead of directly beneath the menu link?

http://www.hometheatershack.com/forums (Shack Stores Shopping Mall)

Thanks,
Sonnie

v5etboyphc
01-29-2007, 05:18 AM
oh that easy.. cuz your dropdown menu is in the second navbar move that to the top nav and it will work fine

ShackMaster
01-29-2007, 11:10 PM
I moved it to the top, but it still wants to dropdown at the far left of the dropdown link.

Notice that UserCP drops down centered. I have everything the same for those two except the names and links. Doesn't make much sense.

Doug Nelson
04-16-2007, 08:26 AM
I can't get this to work in 3.6.5

It shows the link on the navbar, but no little downarrow. And when you click it, the page reloads with the non-js navbar displayed.

Doug Nelson
04-19-2007, 02:20 AM
I reverted my navbar template, then it worked great. Thanks.

rayw
04-27-2007, 09:41 AM
Been looking for this for ages, finally found it. Working great on 3.6.5.

Thanks a lot. :)

ttramell
04-28-2007, 10:10 PM
Installed. So, I changed the code but I'm not sure what to do for the "LAST PART CHANGE ALL" Little help please

PapaSmurf
04-30-2007, 01:56 PM
I'm wondering if this menu can be implemented into any other buttons? I have buttons on the top of my site and i would rather have the drop down menus there as the navbar is not enabled on the main page.

Here is the button code.

<td><a href="LINK"><img src="$stylevar[imgdir_misc]/links_gallery.gif" alt="" width="100" height="29" border="0"></a></td>

Thanks in advance.

The Bish
05-07-2007, 07:23 PM
Any help with the FAR LEFT issue would be nice. Ever since I added this my Quick Links also is skewed left.

ShawneyJ
06-21-2007, 08:01 AM
man come on lol shocking

tminus
08-01-2007, 02:03 AM
Anyone gotten this to work in 3.6.8 or know of other ways to add custom drop menus to the navbar? I have done everything but I think I am screwing up on the yourmenu YOURMENU replacement. I tried only replacing the capitalized YOURMENU and not the lower case one, but no good. The menu title shows up as a link, with no drop down menu or links. The link points to /forum/index.php?nojs=1#MYMENU instead of the intended address that I replaced LINK with: /forum/local_links.php?catid=1
Any help would be appreciated. Thanks~

Stefano Virgill
08-01-2007, 03:22 AM
Hi Tminus,
I've had your same problem.
I really don't know why everything were fixed once I changed all YOURMENU with another word.

Greetings

Stefano

tminus
08-01-2007, 05:14 AM
Hi Tminus,
I've had your same problem.
I really don't know why everything were fixed once I changed all YOURMENU with another word.

Greetings

Stefano
Thanks Stefano. So edit just the capitalized YOURMENU or all yourmenus? I tried both in 3.6.8 and it didn't work. The only modification to navbar in the 3.6.8 release was just a redundant <div> tag removal, but I don't think that would make a difference. I am in no rush so I will try again and post my results. Any other suggestions would be helpful. Does anyone have this running on 3.6.8?

Stefano Virgill
08-01-2007, 05:57 AM
Hi, I've just substitued all the YOURMENU (4 in navbar) with "Gallery".
And now it works. I don't know why, honestly ;)

greetings

Stefano

tminus
08-01-2007, 10:19 AM
Hi, I've just substitued all the YOURMENU (4 in navbar) with "Gallery".
And now it works. I don't know why, honestly ;)

greetings

Stefano
Ok, thanks. I will just try again, but you are running 3.6.8 right?

Stefano Virgill
08-02-2007, 02:07 AM
Ops, sorry!
not yet.
Now is 3.6.7

Bye

Steve

raiderlax
08-08-2007, 10:46 PM
How do you fix the problem with this moving too far to the left????

Thanks

tminus
08-09-2007, 06:51 AM
How do you fix the problem with this moving too far to the left????

Thanks
It depends on where you place the code. Place it after the listing of the navbar listing you want. The directions are for register, but you can move it down by putting it after one of the other menus.

raiderlax
08-09-2007, 02:18 PM
Thanks, but I'm moving this code everywhere and it is not fixing the problem, what to do please?

toolmanwill
08-09-2007, 05:52 PM
ok i have a problem here, I have made this and is working but having a class issue.

with certain non default skins the background is not right, when i remove the class=vbmenu_control part it displays correctly in non-default type skins but then messes up button background on default type skins(we have 4 installed 2 default type using class and 2 that are diff type, using no class).
Any help to fix this so it shows properly on all skins would be awesome!!

TIA,

Will

tminus
08-10-2007, 09:57 AM
Thanks, but I'm moving this code everywhere and it is not fixing the problem, what to do please?
Well, I thought it would work. I haven't actually been able to get it to run on 3.6.8. I ended up customizing a small product that installs a navbar menu. I used this product (https://vborg.vbsupport.ru/showthread.php?t=154024) and added this code (https://vborg.vbsupport.ru/showpost.php?p=1304430&postcount=5) in with it. I am still learning how to understand and write it from scratch, but I can go into more detail on the quick solution when I have time again. Probably this time tomorrow. :)

ok i have a problem here, I have made this and is working but having a class issue.

with certain non default skins the background is not right, when i remove the class=vbmenu_control part it displays correctly in non-default type skins but then messes up button background on default type skins(we have 4 installed 2 default type using class and 2 that are diff type, using no class).
Any help to fix this so it shows properly on all skins would be awesome!!

It doesn't have any global hooks. I suggest you do what I did too and either write a product for it, or use the method I described above. Another solution is to get TMS (https://vborg.vbsupport.ru/showthread.php?t=152931) and you can apply your template mods globally. The only thing with that is I am running 3.6.8 and having problems with it so I don't use it. I just decided to write product/s instead that will install all of my mod related navbar links/menus quickly.

Gharibe
12-08-2007, 05:56 PM
i couldn't use it
it just add a simple link in the navbar

Chris Sotier
03-02-2008, 05:29 PM
I can't get this to work in 3.6.5

It shows the link on the navbar, but no little downarrow. And when you click it, the page reloads with the non-js navbar displayed.

I cant get it same problem!

ade_dnb
03-03-2008, 04:50 PM
I cant get it same problem!

Hi, I've just substitued all the YOURMENU (4 in navbar) with "Gallery".
And now it works. I don't know why, honestly

greetings

Stefano

That works. Try it and see if it helps.

yinyang
03-05-2008, 02:56 PM
installed and working in vb3.7 beta5... thanks!

karnevil
03-06-2008, 10:30 AM
installed and works perfectly first time :) Thanks

xHLHx Darkskilz
03-08-2008, 11:09 AM
Im not getting a dropdown menu.

When i clink on NAME, it opens stuff in the nav bar link, mark forum as read, view buddy list. This has never been in there. This was in my Quick Links drop down menu.

Edit: Could it be a problem is im using 3.6.8?

Edog
03-09-2008, 01:15 AM
Im not getting a dropdown menu.

When i clink on NAME, it opens stuff in the nav bar link, mark forum as read, view buddy list. This has never been in there. This was in my Quick Links drop down menu.

Edit: Could it be a problem is im using 3.6.8?


Same here

Outbackmark
03-09-2008, 11:25 AM
I had all sorts of problems with it, ended up adding links into the "Quick Links" drop down menu as my Navbar was getting a bit cluttered.
I am using 3.5.8 as well.

xHLHx Darkskilz
03-15-2008, 08:29 PM
You there?