MyBB Community Forums

Full Version: Editing Navigation Bar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi.

I'm trying to edit my navigation bar to add two links. I'm having trouble doing it though. [Image: Image9.png]
As you can see, I cant get the links 'Radio' and 'Arcade' to look like the other links.

This is the code for the navigation bar:

<div class="upper_panel">
<span class="float_right"><a href="javascript:popUp('http://74.53.235.2/~bombbob/bb/radio.html')">Radio</a><a href="games.php">Arcade</a><a href="{$mybb->settings['bburl']}/search.php" class="search">{$lang->toplinks_search}</a><a href="{$mybb->settings['bburl']}/memberlist.php" class="memberlist">{$lang->toplinks_memberlist}</a><a href="{$mybb->settings['bburl']}/calendar.php" class="calendar">{$lang->toplinks_calendar}</a><a href="{$mybb->settings['bburl']}/misc.php?action=help" class="help">{$lang->toplinks_help}</a></span>
<span>{$lang->welcome_back} <a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}" class="logout">{$lang->welcome_logout}</a></span>
</div>



I think my problem might be that I don't know what 'settings['bburl']}/calendar.php' means.

How do I change the text of the of the links using a link like this:
<a href="{$mybb->settings['bburl']}/search.php" class="search">{$lang->toplinks_search}</a>

Thanks.
{$mybb->settings['bburl']} is the variable that grabs your Board URL from your settings. So instead of http://community.mybboard.net/index.php you have {$mybb->settings['bburl']}/index.php, see??

<a href="{$mybb->settings['bburl']}/FILE PATH AND FILE NAME" class="CSS CLASS">TEXT TO SHOW</a>


The only thing you might have trouble with is the CSS class. Open your global.css (I think), see how the CSS for the other toplinks is set out, copy a block, and edit it to your needs (basically change the image). Give this new block a name and add that name to the line of code above.
{$mybb->settings['bburl']} is the URL to your forums. It's implemented so that all of the links stay on the same website.

To change the links, just replace /search.php with /yourlink.php and to change the title text, just replace {$lang->toplinks_search} with "Link Title"(without the quotes).

Hope that helps!

Sincerely,
TomL
Thanks. This problem has been bugging me for a while.
No problem. Just hope that helps you out.Smile

Sincerely,
TomL
I added this to the CSS file, and edited it for what i wanted.

}

.upper_panel a.arcade {
background: url(http://www.iconarchive.com/icons/aha-sof...-16x16.png) no-repeat;
}

Then I added this link to the header:

<a href="{$mybb->settings['bburl']}/games.php" class="arcade">Arcade</a>

Should this work? Or have I done something wrong? The image wont change to what I want it to.
If you just copy and paste exactly what the one for, say, search is, and see where the text that is in the template shows in the CSS, and edit this bit.
(2008-12-15, 09:44 PM)MattR Wrote: [ -> ]If you just copy and paste exactly what the one for, say, search is, and see where the text that is in the template shows in the CSS, and edit this bit.

As this is a suggestion that will get the job done, I suggest learning CSS and HTML just so you know it. You'd be surprised at how easy both are to learn. CSS isn't the hard part, but getting both CSS and HTML to validate w3c standards can be.

I'm not saying you have to learn it - I just always suggest that people do so they can fix problems if one were to arise.

Sincerely,
TomL
The best place to actually learn CSS (without buying a book) is actually the W3C itself:

W3School's CSS Tutorials

They teach the basics you need to get you by without going into massive detail. Smile
Yes, thank you for your help. I finally worked it out last night, I have some experience with CSS before.

Thanks again for all your help. My forum looks quite alot more professional now.

Cheers.

Rob.
Pages: 1 2