MyBB Community Forums

Full Version: Change location of login
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all. I'm just starting out with my myBB experience but I need a little help.

I have attached a small picture in which I wish to accomplish.
I would like to remove the search function (I already know how) and move the log-in and registration 'area' (which I don't).

Now would I just move the code related to the log-in/registration into the top wrap section?

Any help is appreciated,
~ Jay.
i am taking a guess that the search would be in the header template whereas the login part should go in the welcomeblock guest template only...... a link to your forum would be appreciated
Admin CP -> Templates & Style -> Templates -> *Theme* -> Header Templates -> header
Could you post the contents of that template please.
(2013-02-16, 12:50 PM)mmadhankumar Wrote: [ -> ]i am taking a guess that the search would be in the header template whereas the login part should go in the welcomeblock guest template only...... a link to your forum would be appreciated
Website link: http://stickyservers.net/

(2013-02-16, 01:04 PM)JordanMussi Wrote: [ -> ]Admin CP -> Templates & Style -> Templates -> *Theme* -> Header Templates -> header
Could you post the contents of that template please.

Below is the header template code:
<div class="topwrap">
<div class="wrap">
<span class="go"><a href="http://" target="_blank" title="Client Control Panel"></a></span>
<span class="tw"><a href="http://twitter.com/" target="_blank" title="Follow us on Twitter"></a></span>
<span class="fb"><a href="http://www.facebook.com/pages" target="_blank" title="Like us on Facebook"></a></span>

<span class="yo"><a href="http://www.youtube.com/user/" target="_blank" title="Subscribe to our Youtube Channel"></a></span>
<div id="search_box">
<div id="search">
<div class="icon">
<img alt="" src="images/noise/search.png">
</div>
<form style="" action="search.php" method="post">
<input type="hidden" value="do_search" name="action">
<input type="hidden" value="" name="tid">
<input type="text" class="textbox" onblur="if(this.value=='') { this.value='Search...'; }" onfocus="if(this.value == 'Search...') { this.value = ''; }" value="Search..." name="keywords">
<input type="submit" value="Search" name="search" class="srbut">
<span id="advsearch"><a href="search.php"><img alt="" src="images/noise/adv.png" title="Advanced Search"></a></span>
</div>
</form>
</div>
</div>
</div>
<div id="headerwrap">
<div class="header">
			<span id="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></span>
<span class="welcome">{$welcomeblock}</span>		
			</div></div>
<div class="wrap">
<div id="menu"><ul>
		<li><a href="{$mybb->settings['bburl']}">Home</a></li>
                <li><a href="{$mybb->settings['bburl']}/index.php">Forums</a></li>
                <li><a href="http://StickyServers.net">Vote</a></li>
                <li><a href="http://StickyServers.net">Donate</a></li>
                <li><a href="http://StickyServers.net">Tutorials</a></li>
                <li><a href="">More Links <img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/down.png" style="vertical-align: middle;"></a>
                           <ul>   
	        <li><a href="{$mybb->settings['bburl']}/memberlist.php">Member List</a></li> 
                <li><a href="{$mybb->settings['bburl']}/misc.php?action=help">Help</a></li>                      
                <li><a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a></li>
                <li><a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a></li></ul></li>

 <span style="float: right;" class="tbut">
<a style="cursor: hand;" class="expand" href="#"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/expand.png" title="Click to Expand"></a>
<a style="display: none;" class="collapse" href="#"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/collapse.png" title="Click to Shrink"></a></span> 
	</ul></div></div>
<div id="colleft" style="width: 0px; display: block;"><div id="panell" style="margin-left: -175px;">
<div id="collefttext"><img src="images/noise/styler.png" title="Forum Styler"></div>
   <a href="javascript:NoiseStyle('none')"><img src="images/noise/style/thess.png" title="Noise"></a>
   <a href="javascript:NoiseStyle('green')"><img src="images/noise/style/thegs.png" title="Noise-Green"></a><br />
    <a href="javascript:NoiseStyle('blue')"><img src="images/noise/style/thebs.png" title="Noise-Blue"></a>
<a href="javascript:NoiseStyle('orange')"><img src="images/noise/style/theos.png" title="Noise-Orange"></a><br />
<a href="javascript:NoiseStyle('purple')"><img src="images/noise/style/thevs.png" title="Noise-Purple"></a>
<a href="javascript:NoiseStyle('yellow')"><img src="images/noise/style/theys.png" title="Noise-Yellow"></a><br />
<a href="javascript:NoiseStyle('gray')"><img src="images/noise/style/thegrs.png" title="Noise-Gray"></a>
<a href="javascript:NoiseStyle('navy')"><img src="images/noise/style/thens.png" title="Noise-Navy"></a><br />
<a href="javascript:NoiseStyle('pink')"><img src="images/noise/style/theps.png" title="Noise-Pink"></a>
<a href="javascript:NoiseStyle('dark')"><img src="images/noise/style/theds.png" title="Noise-Dark"></a><br /><br />
<div id="hidePanel" style="cursor: pointer;"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/hide.png" title="Click to close"></a></div>
</div>
</div>
<div id="showPanel" style="display: block; width: 28px; "><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/palete.png" style="margin-top: 3px;margin-left: -3px;" title="Choose Your Style"></div>
<div id="container">        
		<div id="content">
			{$pm_notice}
			{$bannedwarning}
			{$bbclosedwarning}
			{$unreadreports}
			{$pending_joinrequests}
                        <div class="row"><navigation></div>
                       <div class="contain">			
			<br />
Replace all with this:
<div class="topwrap">
<div class="wrap">
<span class="go"><a href="http://" target="_blank" title="Client Control Panel"></a></span>
<span class="tw"><a href="http://twitter.com/" target="_blank" title="Follow us on Twitter"></a></span>
<span class="fb"><a href="http://www.facebook.com/pages" target="_blank" title="Like us on Facebook"></a></span>

<span class="yo"><a href="http://www.youtube.com/user/" target="_blank" title="Subscribe to our Youtube Channel"></a></span>
<div id="search_box">
<div id="search">
<div class="icon">
<img alt="" src="images/noise/search.png">
</div>
<span class="welcome">{$welcomeblock}</span>
</div>
</div>
</div>
<div id="headerwrap">
<div class="header">
			<span id="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></span>
<form style="" action="search.php" method="post">
<input type="hidden" value="do_search" name="action">
<input type="hidden" value="" name="tid">
<input type="text" class="textbox" onblur="if(this.value=='') { this.value='Search...'; }" onfocus="if(this.value == 'Search...') { this.value = ''; }" value="Search..." name="keywords">
<input type="submit" value="Search" name="search" class="srbut">
<span id="advsearch"><a href="search.php"><img alt="" src="images/noise/adv.png" title="Advanced Search"></a></span>
</div>
</form>		
			</div></div>
<div class="wrap">
<div id="menu"><ul>
		<li><a href="{$mybb->settings['bburl']}">Home</a></li>
                <li><a href="{$mybb->settings['bburl']}/index.php">Forums</a></li>
                <li><a href="http://StickyServers.net">Vote</a></li>
                <li><a href="http://StickyServers.net">Donate</a></li>
                <li><a href="http://StickyServers.net">Tutorials</a></li>
                <li><a href="">More Links <img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/down.png" style="vertical-align: middle;"></a>
                           <ul>   
	        <li><a href="{$mybb->settings['bburl']}/memberlist.php">Member List</a></li> 
                <li><a href="{$mybb->settings['bburl']}/misc.php?action=help">Help</a></li>                      
                <li><a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a></li>
                <li><a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a></li></ul></li>

 <span style="float: right;" class="tbut">
<a style="cursor: hand;" class="expand" href="#"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/expand.png" title="Click to Expand"></a>
<a style="display: none;" class="collapse" href="#"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/collapse.png" title="Click to Shrink"></a></span> 
	</ul></div></div>
<div id="colleft" style="width: 0px; display: block;"><div id="panell" style="margin-left: -175px;">
<div id="collefttext"><img src="images/noise/styler.png" title="Forum Styler"></div>
   <a href="javascript:NoiseStyle('none')"><img src="images/noise/style/thess.png" title="Noise"></a>
   <a href="javascript:NoiseStyle('green')"><img src="images/noise/style/thegs.png" title="Noise-Green"></a><br />
    <a href="javascript:NoiseStyle('blue')"><img src="images/noise/style/thebs.png" title="Noise-Blue"></a>
<a href="javascript:NoiseStyle('orange')"><img src="images/noise/style/theos.png" title="Noise-Orange"></a><br />
<a href="javascript:NoiseStyle('purple')"><img src="images/noise/style/thevs.png" title="Noise-Purple"></a>
<a href="javascript:NoiseStyle('yellow')"><img src="images/noise/style/theys.png" title="Noise-Yellow"></a><br />
<a href="javascript:NoiseStyle('gray')"><img src="images/noise/style/thegrs.png" title="Noise-Gray"></a>
<a href="javascript:NoiseStyle('navy')"><img src="images/noise/style/thens.png" title="Noise-Navy"></a><br />
<a href="javascript:NoiseStyle('pink')"><img src="images/noise/style/theps.png" title="Noise-Pink"></a>
<a href="javascript:NoiseStyle('dark')"><img src="images/noise/style/theds.png" title="Noise-Dark"></a><br /><br />
<div id="hidePanel" style="cursor: pointer;"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/hide.png" title="Click to close"></a></div>
</div>
</div>
<div id="showPanel" style="display: block; width: 28px; "><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/palete.png" style="margin-top: 3px;margin-left: -3px;" title="Choose Your Style"></div>
<div id="container">        
		<div id="content">
			{$pm_notice}
			{$bannedwarning}
			{$bbclosedwarning}
			{$unreadreports}
			{$pending_joinrequests}
                        <div class="row"><navigation></div>
                       <div class="contain">			
			<br />
That will swap the search box and the welcome block over.

Admin CP -> Templates & Style -> Themes -> *Theme* -> global.css
Find:
.welcome {
       background: none;
       width: 600px;
       height: 70px;
       padding: 10px;
       float: right;
       text-align: right;
       margin: auto auto;
       margin-top: 10px;
}
Replace with:
.welcome {
       background: none;
       width: 600px;
       height: 70px;
       float: right;
       text-align: right;
       margin: auto auto;
}
(2013-02-16, 05:53 PM)JordanMussi Wrote: [ -> ]- snip snip -

What that did was move the menu (navigation) bar to the 'search' location.

From there I removed the search box and replaced it with just this
<span class="welcome">{$welcomeblock}</span>	
and that seemed to work almost perfect, except that it is just below it.
Would that have something to do with the height and margins?

Thank you for your help

EDIT:
I used this bit of code in the global.css
.welcome {
       background: none;
       width: 600px;
       height: 50px;
       float: right;
       text-align: right;
       margin: auto auto;
}
Is editing the height also changing the image size?

I think I've got it now. Thank you for getting me started on this. Smile
You're welcome. Glad it worked for you.