PDA

View Full Version : Add A Drop Down Menu In Nav


v5etboyphc
20 Jan 2007, 01:58
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
29 Jan 2007, 06:01
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
29 Jan 2007, 06:18
oh that easy.. cuz your dropdown menu is in the second navbar move that to the top nav and it will work fine

ShackMaster
30 Jan 2007, 00:10
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
16 Apr 2007, 09:26
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
19 Apr 2007, 03:20
I reverted my navbar template, then it worked great. Thanks.

rayw
27 Apr 2007, 10:41
Been looking for this for ages, finally found it. Working great on 3.6.5.

Thanks a lot. :)

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

PapaSmurf
30 Apr 2007, 14:56
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
07 May 2007, 20:23
Any help with the FAR LEFT issue would be nice. Ever since I added this my Quick Links also is skewed left.

ShawneyJ
21 Jun 2007, 09:01
man come on lol shocking

tminus
01 Aug 2007, 03:03
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
01 Aug 2007, 04:22
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
01 Aug 2007, 06:14
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
01 Aug 2007, 06:57
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
01 Aug 2007, 11:19
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
02 Aug 2007, 03:07
Ops, sorry!
not yet.
Now is 3.6.7

Bye

Steve

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

Thanks

tminus
09 Aug 2007, 07:51
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
09 Aug 2007, 15:18
Thanks, but I'm moving this code everywhere and it is not fixing the problem, what to do please?

toolmanwill
09 Aug 2007, 18:52
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
10 Aug 2007, 10:57
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 (http://www.vbulletin.org/forum/showthread.php?t=154024) and added this code (http://www.vbulletin.org/forum/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 (http://www.vbulletin.org/forum/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
08 Dec 2007, 18:56
i couldn't use it
it just add a simple link in the navbar

Chris Sotier
02 Mar 2008, 18:29
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 Mar 2008, 17:50
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
05 Mar 2008, 15:56
installed and working in vb3.7 beta5... thanks!

karnevil
06 Mar 2008, 11:30
installed and works perfectly first time :) Thanks

xHLHx Darkskilz
08 Mar 2008, 12:09
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
09 Mar 2008, 01:15
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
09 Mar 2008, 12:25
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
15 Mar 2008, 21:29
You there?