[Tutorial]How to edit / add new top links in MyBB[Tutorial]
#1
This user has been denied support. This user has been denied support.
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:


/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.

/images/themename/toplinks/


4. Editing the header template of your theme

On your forum, go to.


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

<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>

These are your top links:

Quote:<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 >

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

Quote:<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 >

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

The easier way

On your top links, eg:
Quote:<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 >

Quote:<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 >

Credit:-Mark
<snip>
Reply


Messages In This Thread
[Tutorial]How to edit / add new top links in MyBB[Tutorial] - by A N K E S H - 2012-10-03, 04:10 PM

Forum Jump:


Users browsing this thread: 5 Guest(s)