MyBB Central
How To Add Extra Links To Your Header - Printable Version

+- MyBB Central (http://www.mybbcentral.com)
+-- Forum: Archives (http://www.mybbcentral.com/forum-33.html)
+--- Forum: Mybb 1.4x Series Topics (http://www.mybbcentral.com/forum-26.html)
+---- Forum: Mybb 1.4x Theme and Template Releases (http://www.mybbcentral.com/forum-5.html)
+---- Thread: How To Add Extra Links To Your Header (/thread-5335.html)

Pages: 1 2


How To Add Extra Links To Your Header - Kaleb - Jul 14, 2010

Example - http://www.ultrarom.com

You can see i have a link to the awards page up top. Some people may not know how this is possible, well all you need is some minor HTML skills.


First go to your admin panel > templates > header templates > header.

Originally it should be somewhat like this

Code:
<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>
                    <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']}/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}
            {$bannedwarning}
            {$bbclosedwarning}
            {$unreadreports}
            <navigation>
            <br />

So to add a custom code you first want to decide where you want the link to be. For my example im going to say, next to the members list. So im going to write my code after

Code:
<img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/memberlist.gif" alt="" title="" />{$lang->toplinks_memberlist}</a></li>

So for this example were going to do a post of the week link. So first lets get the image, for this example were going to do a star. So first upload the image to your root or image folder, for my example we have uploaded it to the image folder. So right after the member list code were going to add the following.
Code:
<IMG SRC="/images/star.gif" ALT="PoTW">
[/code][/code]
Then a space. Then.
Code:
<a href="/threadlinkhere">Post Of The Week</a>
Make sure in the a href, you only add whats after the / and not the www stuff.

Final demo - http://www.ultrarom.com/


RE: How To Add Extra Links To Your Header - Ally Mac - Jul 15, 2010

Very nice tutorial, many thanks for this Kaleb.

~A


RE: How To Add Extra Links To Your Header - Cybr - Jul 15, 2010

Yeah, I appreciate it.

~C


RE: How To Add Extra Links To Your Header - Kaleb - Jul 15, 2010

You guys are welcome.

~K


RE: How To Add Extra Links To Your Header - Guru - Aug 02, 2010

I don't see this code in header, I need to edit all headers for guest, admin, mods, members separate.
Sorry I ain't able to change it, please help.


RE: How To Add Extra Links To Your Header - Elite Dash - Aug 02, 2010

What theme are you using?

~C


RE: How To Add Extra Links To Your Header - Guru - Aug 02, 2010

Theme designed by Audentio Design.

I downloaded it from mybb.


RE: How To Add Extra Links To Your Header - Elite Dash - Aug 03, 2010

Use the original header template.


RE: How To Add Extra Links To Your Header - upthevale - Aug 08, 2010

Good tut! Smile


RE: How To Add Extra Links To Your Header - Jayfore - Aug 30, 2010

Thanks! This was a great help to me, in adding my "Invite" link.