MyBB Community Forums

Full Version: Template > Header (Am I going crazy?)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Right been try this for ages and cant see what is wrong!

I want to take the "user cp", "admin cp" and the "login/logout" from the welcome bar and put it in the head next to the seach.

So go to "Admin CP > Templates > Modify/Delete > Header > Expand" and put this:

	<a name="top" id="top"></a>
	<div id="container">
		<div id="header">
			<center><div class="logo"><a href="http://lolwtf.org/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" /></a></div></center>
			<div class="menu">
				<ul>
					- <li><a href="{$mybb->settings 'bburl']}/usercp.php">{$lang->welcome_usercp}</a></li>
		                       - <li> {$admincplink} </li>
					- <li><a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;uid={$mybb->user['uid']}">{$lang->welcome_logout}</a></li>
					- <li><a href="{$mybb->settings['bburl']}/search.php">{$lang->toplinks_search}</a></li>
					- <li><a href="{$mybb->settings['bburl']}/memberlist.php">{$lang->toplinks_memberlist}</a></li>
					- <li><a href="{$mybb->settings['bburl']}/misc.php?action=help">{$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">
			{$bannedwarning}
			{$bbclosedwarning}
			{$unreadreports}
			<navigation>
			<br class="clear" />

I select my template in the box at the bottom and click update.

But Nothing, I have even just tried and in random letter in the links to see if the letters appear on the site.

Please help!
instead of

- <li><a href="{$mybb->settings 'bburl']}/usercp.php">{$lang->welcome_usercp}</a></li>
                       - <li> {$admincplink} </li>
- <li><a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;uid={$mybb->user['uid']}">
{$lang->welcome_logout}</a></li>

try this:

&mdash; <li>
<a href="{$mybb->settings['bburl']}/usercp.php"><strong>{$lang->welcome_usercp}</strong></a>  {$admincplink} &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;uid={$mybb->user['uid']}">{$lang->welcome_logout}</a></li>

But I do notice that you've left off [ in front of one of your 'bburl'].

I have tested this code and it works on my forum! Big Grin
Moved to templates.
Thanks for the help guys, it must have been some odd Firefox/Caching problem as when I got to work those changes I showed above weren't even changed Confused but thanks for pointing out the missing '['

Anyways now I have another problem.

I am trying to put a search box along side the logo, with logo on the left and search on the right.

However no matter how I do it the search seems to go on the line below the log (see here: www.lolwtf.org ).

In the Theme for my site in the Extra CSS at the bottom, I have added:

.top_search
{
float: right;
}

and then contained the search box withing a div so it all looks like:

	<a name="top" id="top"></a>
	<div id="container">
		<div id="header">
			<div class="logo"><a href="http://lolwtf.org/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" /></a>
<div class="top_search">
<form method="post" action="{$mybb->settings['bburl']}/search.php">
<strong>SEARCH:</strong>
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="threads" />
<input type="text" class="textbox" name="keywords" value="" />
{$gobutton}
</form><br />
<span class="smalltext">
<a href="{$mybb->settings['bburl']}/search.php">{$lang->advanced_search}</a>
</span>
</div>
</div>



		<div class="menu">
				<ul>
					
 <li><a href="{$mybb->settings ['bburl']}/usercp.php">{$lang->welcome_usercp}</a></li>
                       <li> {$admincplink} </li>
<li><a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;uid={$mybb->user['uid']}">{$lang->welcome_logout}</a></li>


<li><a href="{$mybb->settings['bburl']}/search.php"><img src="{$theme['imgdir']}/toplinks/search.gif" alt="" />{$lang->toplinks_search}</a></li>

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

					<li><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$theme['imgdir']}/toplinks/help.gif" alt="" />{$lang->toplinks_help}</a></li>
				</ul>
			</div>
			<hr class="hidden" />
			<div id="panel">
				{$welcomeblock}
			</div>
		</div>
		<hr class="hidden" />
		<br class="clear" />
		<!--QUOTES-->
		<div id="content">
			{$bannedwarning}
			{$bbclosedwarning}
			{$unreadreports}
			<navigation>
			<br class="clear" />

What am I doing wong?

Also I noticed that the logo is contained within a div class called "logo" yet I cant find any reference to this anywhere in the theme?