Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to add stuff to the Nav Bar
Author Message
Conor Calby Offline
Posting Freak
*****

Posts: 1,018
Joined: Jan 2010
Reputation: 15
Post: #1
How to add stuff to the Nav Bar
Programs Required: FileZilla

Hello, this is a tutorial I am going to show you how to add a button to the Header or "Nav Bar" For those who don't know what that is, its this [Image: navbar10rd.jpg]
so once we add a button to the Nav Bar, you will see a new button next to "Search"

So lets begin 001_smile

You need to go to the Admin Control Panel (ACP)>>Templates and Styles>>Templates>>**Find your templates that your theme is currently using**>>Header Templates>> Header

Now, you should find this.
Quote: <li><a href="{$mybb->settings['bburl']}/search.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/search.gif" alt="" title="" />{$lang->toplinks_search}</a></li>
That is the "search" button. If your buttons are on the right like in the default theme, you need to add your button above that code. If your buttons are on the left, you need to add it below the search button code.

The code for your new button will look like this
Quote:<li><a href="$settings[bburl]/yourlink.php">New Nav-Bar Button</a></li>
What that means is
go to your board domain/yourlink.php
(replace yourlink.php with the link after your board url and replace New Nav-Bar Button with what you want to call it.)

and now you have a nav bar button with no pic 001_smile

to add a pic,
Use this code after the button with no pic code 001_smile
Quote:<img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/button_name.gif" alt="" title="" />{$lang->toplinks_search}</a></li>
So the total "button with image" code will look like this
Quote:<li><a href="$settings[bburl]/yourlink.php">New Nav-Bar Button<img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/button_name.gif"</a></li>

What that means is Image is located in Board URL>Images>ThemeName>Toplinks.
(You need to have the image as .GIF format and it needs to be uploaded to Board URL>Images>ThemeName>Toplinks )
(You may want to remove the name you used for "New Nav-Bar Button" Tongue


And that should work for you,

Please try this on a test forum first, that way you know for sure how to do it 001_smile


Thanks

--Conor
(02-19-2010 12:13 AM)euantor Wrote:  Note: Not all themes use the default links or even the default template for their nav. I personally scatter my nav through the header_welcomeblock_member and header templates when creating themes at my site. This way, I can have member only links in my navbars.

MyBBSource Support Team Member - MyBBSource Tutorials Team Leader
Official MyBB Support Tech
If I helped, why not rep me 001_smile
(This post was last modified: 02-19-2010, 06:44 AM by Conor Calby)
02-18-2010, 08:01 AM
Visit this user's website Find all posts by this user Quote this message in a reply
euantor Offline
Posting Freak
*******
Support

Posts: 887
Joined: Jun 2009
Reputation: 7
Post: #2
RE: How to add stuff to the Nav Bar
Note: Not all themes use the default links or even the default template for their nav. I personally scatter my nav through the header_welcomeblock_member and header templates when creating themes at my site. This way, I can have member only links in my navbars.
02-19-2010, 12:13 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Conor Calby Offline
Posting Freak
*****

Posts: 1,018
Joined: Jan 2010
Reputation: 15
Post: #3
RE: How to add stuff to the Nav Bar
Thanks for the reply, mind if I quote that in my post?

MyBBSource Support Team Member - MyBBSource Tutorials Team Leader
Official MyBB Support Tech
If I helped, why not rep me 001_smile
02-19-2010, 06:16 AM
Visit this user's website Find all posts by this user Quote this message in a reply
euantor Offline
Posting Freak
*******
Support

Posts: 887
Joined: Jun 2009
Reputation: 7
Post: #4
RE: How to add stuff to the Nav Bar
Go ahead ;P
02-19-2010, 06:38 AM
Visit this user's website Find all posts by this user Quote this message in a reply
core300 Offline
Junior Member
**

Posts: 2
Joined: Mar 2010
Reputation: 0
Post: #5
RE: How to add stuff to the Nav Bar
Hello,
How would we add just an image link? I want the image to be the link and I don't want text.

Thanks 001_smile
03-08-2010, 02:10 AM
Find all posts by this user Quote this message in a reply
euantor Offline
Posting Freak
*******
Support

Posts: 887
Joined: Jun 2009
Reputation: 7
Post: #6
RE: How to add stuff to the Nav Bar
Just use:

Code:
<li><a href="yourlink.php"><img src="yourimage.png" /></a></li>

;D
03-08-2010, 02:14 AM
Visit this user's website Find all posts by this user Quote this message in a reply
core300 Offline
Junior Member
**

Posts: 2
Joined: Mar 2010
Reputation: 0
Post: #7
RE: How to add stuff to the Nav Bar
Oh, lol I didn't know it was that easy Tongue
What are the <li> tags though?

Thanks.
03-08-2010, 04:57 AM
Find all posts by this user Quote this message in a reply
Mr-Trainor Offline
Senior Member
****

Posts: 384
Joined: Mar 2010
Reputation: 6
Post: #8
RE: How to add stuff to the Nav Bar
I believe the <li> tags is just for a list item.
'The <li> tag defines a list item.' 001_smile
03-28-2010, 09:25 AM
Find all posts by this user Quote this message in a reply
Don+ Offline
Member
***

Posts: 66
Joined: Aug 2010
Reputation: 0
Post: #9
RE: How to add stuff to the Nav Bar
already saw somewhere else
08-21-2010, 10:43 AM
Find all posts by this user Quote this message in a reply
ms365 Offline
MybbSource Skinner
***

Posts: 98
Joined: Dec 2009
Reputation: 1
Post: #10
RE: How to add stuff to the Nav Bar
Awesome tutorial.And wanna suggest exactly what euantor said Wink:
Code:
Code:
<li><a href="yourlink.php"><img src="yourimage.png" /></a></li>
Coz if u want to link URLs that are outside your forum root directory and show pics that r outside the directory of the directory u mentioned in this code Tongue , then that code wont work Wink Tongue
(This post was last modified: 08-21-2010, 10:53 AM by ms365)
08-21-2010, 10:52 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)