MyBB Community Forums

Full Version: A long one for you pros!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Oh, I'm trying to get it closer to the avatar image like this:

[Image: 8VwuN.gif]
Just change 680px to some other value until it's where you want it:

<div id="panel" style="float: left; margin-top: -90px; margin-left: 680px">
OMG Thank You! That worked perfectly! Is there anyway to remove the avatar placeholder from guests? I noticed that when I'm logged out the placeholder is there with a image error.
Do you want to completely remove the avatar or use some kind of default avatar for guests?
In ./global.php file, add the following code Just Below the global_start hook.

if ($mybb->user['uid'])
{
   $avatar = $mybb->user['avatar'];
}
else
{
   $avatar = "";
}

Now Replace $mybb->user['avatar'] to $avatar in header template.
(2011-05-21, 03:12 PM)Yaldaram Wrote: [ -> ]In ./global.php file, add the following code Just Below the global_start hook.

if ($mybb->user['uid'])
{
   $avatar = $mybb->user['avatar'];
}
else
{
   $avatar = "";
}

Now Replace $mybb->user['avatar'] to $avatar in header template.

Just to make sure, I would change this:
// Run global_start plugin hook now that the basics are set up
$plugins->run_hooks("global_start");

if(function_exists('mb_internal_encoding') && !empty($lang->settings['charset']))
{
	@mb_internal_encoding($lang->settings['charset']);
}

To this?:
// Run global_start plugin hook now that the basics are set up
$plugins->run_hooks("global_start");

if(function_exists('mb_internal_encoding') && !empty($lang->settings['charset']))
{
	@mb_internal_encoding($lang->settings['charset']);
}
if ($mybb->user['uid'])
{
   $avatar = $mybb->user['avatar'];
}
else
{
   $avatar = "";
}
Yes, its fine.
Or more precisely, use this;
if (!empty($mybb->user['avatar']))
{
   $avatar = $mybb->user['avatar'];
}
else
{
   $avatar = "";
}
(2011-05-21, 03:18 PM)Yaldaram Wrote: [ -> ]Yes, its fine.
Or more precisely, use this;
if (!empty($mybb->user['avatar']))
{
   $avatar = $mybb->user['avatar'];
}
else
{
   $avatar = "";
}

Thanks Yaldaram, I updated it but there seems to be a white thing there in place of the avatar heh. Am I supposed to have:
<img src="$avatar" width="100px"
or do I need to remove the "<img src" stuff there?
Replace $avatar to {$avatar}
(2011-05-21, 03:27 PM)Yaldaram Wrote: [ -> ]Replace $avatar to {$avatar}

Done. I think the small white line thing is perhaps the avatar border? Here's what I see when I log out.

[Image: vj74Z.png]
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20