• 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to edit / add new top links in MyBB [Forum]
#1
How to edit / add or remove top links on a MyBB forum


What's a top link? You may be asking, well it's the links that are at the top of your forum, usually to the right hand side.

[Image: rm0478.jpg]


There's two ways to do this, an easy and a less easy way. I'm going to show you both.


The less easy, but proper way.

1. Editing the language file.

Browse to and open:

Code:
/inc/languages/english/global.lang.php

The section you're looking for should be at the top, and look similar, if not the same as:

[Image: 33wm5wm.jpg]


2. In here, just add the top links that you wish to add then save the file, like so:

[Image: vqr80g.jpg]


3. Upload the images you wish to use to your theme's toplink image folder.

Code:
/images/themename/toplinks/

4. Editing the header template of your theme

On your forum, go to.

Code:
Admin control panel (ACP) > Themes and Templates > Templates > Your Template name > Options > Expand > Header Templates > Options > Expand > header

It'll look similar to below:

[code=php]
<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']}/index.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/home.gif" alt="" title="Home" />{$lang->toplinks_home}</a></li>
<li><a href="{$mybb->settings['bburl']}/donate.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/search.gif" alt="" title="Donate" />{$lang->toplinks_donate}</a></li>
<li><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/memberlist.gif" alt="" title="Member List" />{$lang->toplinks_memberlist}</a></li>
<li><a href="{$mybb->settings['bburl']}/member.php?action=emailuser&uid=1"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/calendar.gif" alt="" title="Contact" />{$lang->toplinks_contact}</a></li>
<li><a href="http://twitter.com/mcomputeforums" target="_blank"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/twitter.gif" alt="" title="Twitter" />{$lang->toplinks_twitter}</a></li>
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help&hid=8"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/help.gif" alt="" title="Rules" />{$lang->toplinks_rules}</a></li>
</ul>
</div>
[/code]


These are your top links:

[code=html]<li><a href="{$mybb->settings['bburl']}/index.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/home.gif" alt="" title="Home" />{$lang->toplinks_home}</a></li> [/code]

If you want to do an external link, it's like so:

[code=html]<li><a href="http://twitter.com/mcomputeforums" target="_blank"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/twitter.gif" alt="" title="Twitter" />{$lang->toplinks_twitter}</a></li>[/code]

Just add your links in as desired, remember to add the right image name etc.


The easier way

On your top links, eg:

[code=html]<li><a href="{$mybb->settings['bburl']}/index.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/home.gif" alt="" title="Home" />{$lang->toplinks_home}</a></li>[/code]

Just add the title you want on your link after the title=""/> such as:

[code=html]<li><a href="{$mybb->settings['bburl']}/index.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/home.gif" alt="" title="Home" />Home {$lang->toplinks_home}</a></li>[/code]

That'll do the job.

If you have any questions or problems, please post or PM me. I'd be more than happy to help.
  Reply


Messages In This Thread
How to edit / add new top links in MyBB [Forum] - by Mark - 25-09-2010, 05:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  A few tips on how to secure a MyBB forum Mark 0 19,794 19-11-2014, 03:20 AM
Last Post: Mark
  Large database table mybb_debuglogs MyBB forum Mark 0 10,307 30-09-2014, 03:05 PM
Last Post: Mark
  [HOW TO] Ad placement above the fold on a MyBB Forum - Google Adsense Mark 0 12,739 27-05-2014, 03:24 PM
Last Post: Mark
  How to add spoiler tags to your forum [MyBB 1.4 / 1.6 / 1.6.4] Mark 1 14,996 25-09-2011, 01:54 AM
Last Post: Drumm
  [TUT] How to edit the post reply / new thread box Mark 1 41,218 21-08-2011, 12:03 AM
Last Post: Mark

Forum Jump: