MyBB Community Forums

Full Version: welcome block frame
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Not sure why this is doing this, but it seems the frame or padding I use for user avatars is appearing next to the login of my forums and I would very much like to hide this if possible when a user is logged out.

I've provided an example below:
http://i.imgur.com/KhLvk.jpg

The image on the left is what it looks like when you log in. The image on the right is when you've logged out and there's the left over padding.

Thanks!

Website Link
It really depends on what element you've set the margin/padding and border. You need to put the code to style the avatar into 'header_welcomeblock_member' but not in 'header_welcomeblock_guest'.

Give your URL + test account if you can't figure it out.
I'm specifying all this in the actual "header" template and nowhere else.

Here is my header template code:
<div id="container">
<head>
	<link rel="stylesheet" href="/menu/menu_style.css" type="text/css" />
</head>

<ul id="menu">
   <li><a href="http://www.xomby.org/" target="_self">Home</a></li>
   <li><a href="http://www.xomby.org/memberlist.php" target="_self">Members</a></li>
   <li><a href="http://www.xomby.org/search.php" target="_self">Search</a></li>
   <li><a href="http://www.xomby.org/misc.php?page=irc" target="_self">IRC Chat</a></li>
   <li><a href="http://steamcommunity.com/groups/xomby" target="_self">Steam Group</a></li>

</ul></div>
<div id="container">
        <a name="top" id="top"></a>
        <div id="header">
<div style="margin-top: 10px; margin-left: 8px; margin-bottom: -30px; text-align: left;"><a href="{$mybb->settings['bburl']}/index.php"><img src="images/logo.png" /></a></div>   

            <br /><div id="userbox_panel" style="margin-right: 175px">{$welcomeblock}</div>
            <div id="userbox"><a href="{$mybb->settings['bburl']}/usercp.php"><img src="{$mybb->user['avatar']}" alt="" style="height: 100px; border: 3px solid #7B8258; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px;" /></a></div>
            <hr class="hidden" />
<br />
</div>
        <hr class="hidden" />
        <br class="clear" />
        <div id="content">
            {$pm_notice}{$teradonate_notice}{$teradonate_bar}
            {$bannedwarning}
            {$bbclosedwarning}
            {$unreadreports}{$aacount}
{$headerannounce}
            {$pending_joinrequests}
            <navigation>
            <br />
You need to rearrange your templates a bit.

1) Replace this:
<div id="userbox_panel" style="margin-right: 175px">{$welcomeblock}</div>
            <div id="userbox"><a href="{$mybb->settings['bburl']}/usercp.php"><img src="{$mybb->user['avatar']}" alt="" style="height: 100px; border: 3px solid #7B8258; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px;" /></a></div>
with
{$welcomeblock}

2) Now open 'header_welcomeblock_member' and wrap all of it's content with:
<div id="userbox_panel" style="margin-right: 175px">
and
</div>

3) Now add this to the end of the template:
<div id="userbox"><a href="{$mybb->settings['bburl']}/usercp.php"><img src="{$mybb->user['avatar']}" alt="" style="height: 100px; border: 3px solid #7B8258; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px;" /></a></div>

You might need to do step 2 also for the 'header_welcomeblock_guests' template depending on how it looks.
Wow thanks! that seems to have did the trick Big Grin I've got some playing around left to do since some things I've changed seems to have muddied it up a bit but that blasted placeholder isn't there anymore which is what I wanted!