MyBB Community Forums

Full Version: Custom navation links code please
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Sorry to bother and I hope this isnt asking too much. I have a site thats nearly finished . MOst of the aiddtional areas are installed and working but I cant for love nore money insert custom navigation without messing up my header code. So my question is, if I supply my header code in full below and what I want added, could someone add it and post again so I can literally copy and paste back to my header? If its an issue then apologies.

Heres what I want in a line beside 'search' 'memberlist' 'help' etc:


And finally because thats clearly not enough, can they all open in new windows? Thanks in advance if it can be done

<div id="container"><a name="top" id="top"></a><div id="header"><div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div><div class="menu"><ul>{$customtab}<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><li><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/memberlist.gif" alt="" title="" />{$lang->toplinks_memberlist}</a></li><li><a href="{$mybb->settings['bburl']}/calendar.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/calendar.gif" alt="" title="" />{$lang->toplinks_calendar}</a></li><li><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/help.gif" alt="" title="" />{$lang->toplinks_help}</a></li></ul></div><hr class="hidden" /><div id="panel">{$welcomeblock}</div></div><hr class="hidden" /><br class="clear" /><div id="content">{$pm_notice}{$extmessage}{$bannedwarning}{$bbclosedwarning}{$unreadreports}<navigation><br />
I have created just the plugin for that, but it supports only one custom link. You can customize it to support as many as you wish.

http://mods.mybboard.net/view/custom-tab

To add custom links follow the example of the gallery link that I will post below and replace the urls, names and images to match the other links that you want to add at the nav bar.

<a href="http://www.emergencyservicesforum.com/gallery/"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/yourimagename.gif" alt="" title="" />Gallery</a></li>

And replace yourimagename.gif with the image that you want to use at the nav bar for the gallery which should be uploaded at the /toplinks/ folder inside the /image/ folder.

Hope it helps.
<li><a href="{$mybb->settings['bburl']}/FILE.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/IMAGE.gif" alt="" title="" />TEXT TO SHOW</a></li>

That's all you need to add to add a new link. lime target="_blank" to the <a> tag to make it open in a new window.
Thanks, Im actually using the custom link plugin at the moment but it only allows one custom link. I dont suppose I can just install it 3 more times can I? Big Grin
(2009-12-10, 10:39 PM)Karlitosway Wrote: [ -> ]Thanks, Im actually using the custom link plugin at the moment but it only allows one custom link. I dont suppose I can just install it 3 more times can I? Big Grin

I will expand my custom tab plugin to support more custom links.