Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
NAVTAB Combo Drop-Menu with Sub-Items
cory_booth
Join Date: Jul 2006
Posts: 224

by cory_booth cory_booth is offline 14 Jan 2010

I have seen several hack to add a NAVTAB menu item (we are talking about the main links).
However, I had not ran across anything that would do exactly what I wanted.

Here is what this does.
Say you have a few pages you want a drop-down link (from the NAVTAB).
For example, I have an add-on gallery.
I wanted a single NAVTAB button called "GALLERY" but a drop-down to select the add on or VB Albums.

There is documentation to cover that, however...
Once the user clicks the drop-down menu, the NAVTAB "GALLERY" button is no longer "selected" and you do not have those nice sub-menu items.

This little combo hack will do this.

First, you must know the THIS_SCRIPT for the pages you will load with the drop-menu.

Once you know this, you can add them to the THIS_SCRIPT area and do two comparisons.
If you are not on one of the THIS_SCRIPT pages, the NAVTAB will be a drop-down.
If you are on one of the THIS_SCRIPT pages, the NAVTAB will be a selected link with submenu items.

Make a new plugin and add this code.



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Attached Images
File Type: jpg drop.JPG (10.0 KB, 702 views)
File Type: jpg drop2.JPG (8.0 KB, 514 views)
Views: 5186
Reply With Quote
Comments
  #2  
Old 02 Jun 2010, 23:32
Fuhrmann Fuhrmann is offline
 
Join Date: May 2010
Nice Article. I get this error:

"Parse error: syntax error, unexpected '<' in /home/combatar/public_html/pfps/includes/class_bootstrap.php(509) : eval()'d code on line 52"

I will look what it is...
Reply With Quote
  #3  
Old 09 Jun 2010, 07:32
as7apcool's Avatar
as7apcool as7apcool is offline
 
Join Date: Feb 2009
thanks alot 4 your work
Reply With Quote
  #4  
Old 10 Jun 2010, 21:00
Front Range Front Range is offline
 
Join Date: Apr 2008
Thanks Cory, very nice write-up! I now have 6 category drop-downs with 5 or so drop menus.
Reply With Quote
  #5  
Old 12 Jun 2010, 08:56
Skyborg Skyborg is offline
 
Join Date: Jul 2009
Hi,

if i would like to create a plugin.
I need to choose "Add-on" and "Hook".

Can somebody tell me what to choose?

Thank you.

Skyborg
Reply With Quote
  #6  
Old 24 Sep 2010, 12:26
FCS-Webmaster FCS-Webmaster is offline
 
Join Date: Aug 2007
Don't work with 4.0.7.

I tried to implement that code but only get an error:
Parse error: syntax error, unexpected '<' in wholeserverpath/home/includes/class_bootstrap.php(517) : eval()'d code on line

Okay it seems to be that you have an error in your syntax


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And for some reason I don't why the submenu shows not right

Last edited by FCS-Webmaster; 24 Sep 2010 at 13:00.
Reply With Quote
  #7  
Old 30 Sep 2010, 03:18
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Aug 2009
Real name: Chris
I use the following hack and it works great.

http://www.vbulletin.org/forum/showthread.php?t=233629
Reply With Quote
  #8  
Old 01 Oct 2010, 04:38
ssslippy's Avatar
ssslippy ssslippy is offline
 
Join Date: Jan 2006
This should be cleaner code no reason for an else in there.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Immortal Guild - My Guilds Website
Reply With Quote
  #9  
Old 14 Dec 2010, 23:38
sailnet sailnet is offline
 
Join Date: Oct 2009
I'd like to use this mod but I am very confused as to the definition of this_script.

does this_script refer to page name such as forum.php, forumdisplay.php, showthread.php, etc?

is that what it means?

I'd like to use the tabbed menu built into vb4 because I'm currently using a commercial product in my vb3.8 install.

please help me understand.
Reply With Quote
  #10  
Old 20 Nov 2013, 09:03
craigvm's Avatar
craigvm craigvm is offline
 
Join Date: Aug 2012
Originally Posted by ozzy47 View Post
I use the following hack and it works great.

http://www.vbulletin.org/forum/showthread.php?t=233629
thanks just installed this and it works great
__________________
www.fordownersnetwork.com
The Ford Modified Owners Club & Forum is a online community forum offering free advice & help for your Ford.
We cover all Fords & all models from a basic spec right upto XR/SI/ST & the RS
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

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


New To Site? Need Help?

All times are GMT. The time now is 09:57.

Layout Options | Width: Wide Color: