MyBB Community Forums

Full Version: How to add another button to the theme menu?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Just would like to say hi all since this is my firs post . I am currently using the royal red theme and would like to know how i can add another button to the index page on the main menu in the header.I found a few threads on this topic but still am not able to solve this problem . The new button i want to add should look the same as the thems buttons and redirect to folder i created in my root directory. Here is the url of my forum , http://canadianwildfeeds.prairiewind.hostei.com . The code i was trying didnt even show an image or text when i made the modifications in the header teamplate . Here is a copy of my header template .

<div id="container">
<a name="top" id="top"></a>
<div id="header">
<div class="menu">
<ul>

<li><a href="{$mybb->settings['bburl']}/search.php">&nbsp;&nbsp;{$lang->toplinks_search}</a></li>
<li><a href="{$mybb->settings['bburl']}/memberlist.php">&nbsp;&nbsp;{$lang->toplinks_memberlist}</a></li>
<li><a href="{$mybb->settings['bburl']}/calendar.php">&nbsp;&nbsp;{$lang->toplinks_calendar}</a></li>
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help">&nbsp;&nbsp;{$lang->toplinks_help}</a></li>

</ul>
</div>


<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>

<hr class="hidden" />
<div id="panel">
{$welcomeblock}
</div>
</div>
<hr class="hidden" />
<br class="clear" />
<div id="content">
{$pm_notice}
{$bannedwarning}
{$bbclosedwarning}
{$unreadreports}
{$pending_joinrequests}
<navigation>
<br />


Any help would be greatly appreciated . Thanks in advance .
Firstly this is the wrong forum but,

You need to place another line like this:
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help">&nbsp;&nbsp;{$lang->toplinks_help}</a></li>
under the others.

EG:
<li><a href="http://mybb.com">&nbsp;&nbsp;MyBB is Cool</a></li>
(2011-05-02, 08:07 PM)Tom K. Wrote: [ -> ]Firstly this is the wrong forum but,

You need to place another line like this:
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help">&nbsp;&nbsp;{$lang->toplinks_help}</a></li>
under the others.

EG:
<li><a href="http://mybb.com">&nbsp;&nbsp;MyBB is Cool</a></li>

Sorry for posting in the wrong forum . Thanks again for the reply . So the second line of code is what i am need and just have to Change url and Mybb is cool part right . Forgive me i'm not to great at this code editing stuff but i read alot and am starting to learn a little . Now i wanted to add an image to this as well and I uploaded it to the toplinks folder . Do i need extra code to point to this image as well?.
Where it says: "MyBB is Cool" change it to:

<img src="http://link.to/image.here" />  MyBB is Cool
(2011-05-02, 08:39 PM)Tom K. Wrote: [ -> ]Where it says: "MyBB is Cool" change it to:

<img src="http://link.to/image.here" />  MyBB is Cool

Thanks so much , but i still cannot get this working , must have something to do with my url setting to image or something like that because nothing shows up on the main menu in the header. I pasted this code

<li><a href=" http://canadianwildfeeds.prairiewind.hostei.com/store">&nbsp;&nbsp; <img src=" http://canadianwildfeeds.prairiewind.hos.../toplinks/ store.gif" /></a></li>

Have to take a break must be doing something wrong . But thanks again for the help.
This would be the correct code:

<li><a href="http://canadianwildfeeds.prairiewind.hostei.com/store">&nbsp;&nbsp; <img src=" http://canadianwildfeeds.prairiewind.hostei.com/images/toplinks/store.gif" /></a></li>
Your URL has spaces in it Wink between " and http://, and also between "/toplinks/" and store.gif Smile
(2011-05-02, 09:37 PM)pyridine Wrote: [ -> ]This would be the correct code:

<li><a href="http://canadianwildfeeds.prairiewind.hostei.com/store">&nbsp;&nbsp; <img src=" http://canadianwildfeeds.prairiewind.hostei.com/images/toplinks/store.gif" /></a></li>

Great support in this forum , well i tryed to no avail to even get my image on the main header bar but no luck . i probably did something wrong there not really sure what though . I used the code in the quoted post but don't see no image or button for that matter . Oh well it will come eventually . I'm editing the header template of the theme i am using i think thats correct . What part of the code above displays the button? or the text on the button ?. I'll get this figured out yet lol.Big Grin
Where did you place it, post the updated header template (with the changes you made) in [code] tags Smile





<div id="container">
		<a name="top" id="top"></a>
<div id="header">
		<div class="menu">
				<ul>
<li><a href="{$mybb->settings['bburl']}/search.php">&nbsp;&nbsp;{$lang->toplinks_search}</a></li>
					<li><a href="{$mybb->settings['bburl']}/memberlist.php">&nbsp;&nbsp;{$lang->toplinks_memberlist}</a></li>
					<li><a href="{$mybb->settings['bburl']}/calendar.php">&nbsp;&nbsp;{$lang->toplinks_calendar}</a></li>
					<li><a href="{$mybb->settings['bburl']}/misc.php?action=help">&nbsp;&nbsp;{$lang->toplinks_help}</a></li>
                                                                      <li><a href="http://canadianwildfeeds.prairiewind.hostei.com/store">&nbsp;&nbsp;<http://canadianwildfeeds.prairiewind.hostei.com/images/toplinks/store.gif/>New</a></li>

				</ul>
			</div>
                    
                       			
                        <div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>
			
			<hr class="hidden" />
			<div id="panel">
				{$welcomeblock}
			</div>
		</div>
		<hr class="hidden" />
		<br class="clear" />
		<div id="content">
			{$pm_notice}
			{$bannedwarning}
			{$bbclosedwarning}
			{$unreadreports}
			{$pending_joinrequests}
			<navigation>
			<br />
Pages: 1 2