Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
How To Add Additional Links To Your Navbar
peterska2
Join Date: Oct 2003
Posts: 6,504

Manchester, UK
by peterska2 peterska2 is offline 18 Jun 2006

There is one thing that you never seem to have enough of with a modified vBulletin site, and that is navbar space. This article covers how to add additional links to your navbar both on your regular one, and adding another row to it to stop it getting too busy. Also included in this article is showing and hiding links for guests and members.

Part One: Adding Links To Your Standard Navbar

Scenario used: You have a HTML page on your site with a map to the location of a regular meeting place for people from your site. You need to add the link to this page to your navbar for easy access by your visitors. This page is located at yoursite.com/map.html

To add a link to the additional page (it can be a page within vB or not even on your site) you need to use the following code:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This code contains 4 important aspects.


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

This tells you how the link will be displayed. Navbar links use the vbmenu_control class as defined in your CSS so they will always be in this format (Note: Some styles use different formats depending on the level of customization that has been carried out).



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

This tells us where the link is going to. You can link to a page anywhere on the internet by using this format. If the page you are linking to is in the same directory as your forums then you only need to use the page name, in this case map.html



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

This tells your browser to open the link in a new window. If you want it to open in the same window then you simply miss this code out.



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

This displays the title of the link that will be displayed and also ends the link code and section in the navbar.


The best place to add the code for your additional link, is either immediately before or after the link to the calendar
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Part Two: Creating Another Row In Your Navbar

If you have a number of modifications installed that have required additional links on your navbar, it quickly becomes very full. Now you can install a modification to add another navbar to your site, or you can simply create another row in your existing one.

When adding another row, it is important that you use a new table, otherwise your links will be forced into alignment with those on the top row, leaving an unsightly gap at the right side of the row.

In your navbar template, locate the following code:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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

Now you have set up your extra row, you can start adding links to it.

First remove the Sample link from the code above by deleting that line from the template. Then using the method from Part One, add your new links to this row. You can move links from the top row by cutting and pasting them into the new row.


Part Three: Showing Links To Guests Or Members Only

There are some things that you really don't want guests to know about. After all, what is the point of showing a guest the link to the usercp when all they will get is a no permissions message? So what can you do about it? Wrapping the whole code for the link in an if conditional will only show the link to those who meet the criteria set.

To show a link to members only use:

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

This literally means what it says. If you are a member, then show the link.

The same works for guests:

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

Using these two conditions, you can show and hide links to guests and members. Any links that do not use a condition will always show.



I hope that this helps with managing links on your navbar better. Feel free to ask any questions related to this.
Views: 30887
Reply With Quote
Comments
  #2  
Old 24 Jun 2006, 06:05
ckandes1 ckandes1 is offline
 
Join Date: Jun 2006
I hadn't even thought of it, but i could really use this. thanks alot, great writeup!
Reply With Quote
  #3  
Old 16 Aug 2006, 23:09
brownbabe brownbabe is offline
 
Join Date: May 2006
How?

Where exactly do I put adding link line?
Reply With Quote
  #4  
Old 17 Aug 2006, 02:04
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Real name: Kerry-Anne (really!)
The most popular place is either immediately before or after the calendar link.

The code for the link is the last code block in part one.
__________________
Kerry-Anne
Previously known as peterska2

My Sites: peterska2.co.uk Super Clickers World News Zone English Football League Popular Usenet Groups
Do NOT PM or email me for Support or Modification Requests - No Exceptions!!
I do NOT do custom requests. Do not ask for them. - No Exceptions!!
Reply With Quote
  #5  
Old 26 Aug 2006, 07:15
Sangrun Sangrun is offline
 
Join Date: May 2006
Thanks! I was having trouble with that. I now have a second row and more links.

Thanks to all the great people who take their time to post this stuff,
Reply With Quote
  #6  
Old 24 Sep 2006, 23:27
dodgeboard.com's Avatar
dodgeboard.com dodgeboard.com is offline
 
Join Date: Nov 2005
Awesome. Thanks for that little turorial. Helped me a lot!!
Reply With Quote
  #7  
Old 01 Oct 2006, 09:23
Harley-Heaven Harley-Heaven is offline
 
Join Date: Jun 2006
Can you tell me how I can set the navbar so that it is fluid in size, depending on the users browsing window and browser software. At present my NavBar hangs over the edge of the window, is there a simple code to auto resize the NavBar?

Thanks very much
Harley
Reply With Quote
  #8  
Old 01 Oct 2006, 13:54
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Real name: Kerry-Anne (really!)
links do not wrap in the navbar so if it is getting too long to fit then use 2 rows
__________________
Kerry-Anne
Previously known as peterska2

My Sites: peterska2.co.uk Super Clickers World News Zone English Football League Popular Usenet Groups
Do NOT PM or email me for Support or Modification Requests - No Exceptions!!
I do NOT do custom requests. Do not ask for them. - No Exceptions!!
Reply With Quote
  #9  
Old 02 Oct 2006, 09:46
Harley-Heaven Harley-Heaven is offline
 
Join Date: Jun 2006
Thanks Peterska, that's exactly what I did, looks nice and aesthetic. Being a newbie, I just wondered if it was possible to make the bar liquid....
Reply With Quote
  #10  
Old 23 Jul 2007, 18:41
Sitting's Avatar
Sitting Sitting is offline
 
Join Date: Jul 2007
thanks from the clumsy people...
Reply With Quote
  #11  
Old 13 Sep 2007, 22:30
CasualConvo CasualConvo is offline
 
Join Date: Nov 2006
Active Link

I put a "Home" link before the UserCP link in the Navbar but though it works fine, it's the only link that keeps the line underneath the text when all the others only do it on a mouseover. How can I fix this? Thank you!

Nevermind. All I had to do was refresh my page. Working great. Thank you!

Last edited by CasualConvo; 13 Sep 2007 at 22:39. Reason: Automerged Doublepost
Reply With Quote
  #12  
Old 23 Sep 2007, 05:31
kollam003 kollam003 is offline
 
Join Date: May 2007
wow wow and just wow thanks
__________________
Gratitude for everything I have
Reply With Quote
  #13  
Old 06 Oct 2007, 23:30
citroenar citroenar is offline
 
Join Date: Jan 2007
where can I change a text size of a links in navbar?
Reply With Quote
  #14  
Old 08 Oct 2007, 02:43
Mr. Burns Mr. Burns is offline
 
Join Date: Mar 2007
I have added new links, however the font face, size and color do not match what was already there. Any hints to help resolve this?
Reply With Quote
  #15  
Old 23 Apr 2008, 21:12
Jasem's Avatar
Jasem Jasem is offline
 
Join Date: Feb 2006
Location: www.menokia.com
Thank you
__________________
games
Forum Nokia
Reply With Quote
Reply

Similar Article
Article Author Type Replies Last Post
Additional Navbar 3.5.3 and up attroll vBulletin 3.5 Template Modifications 91 26 Dec 2007 01:12
Additional Navbar attroll vBulletin 3.0 Full Releases 235 24 Feb 2006 03:51



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


New To Site? Need Help?

All times are GMT. The time now is 01:42.

Layout Options | Width: Wide Color: