MyBB Community Forums

Full Version: Avatar Function?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Where is the function that checks for the users avatar and displays it ?

What file is it in ?
The variable itself is part of the MyBB class;
$mybb->user['avatar']
(2010-08-25, 02:02 PM)Polarbear541 Wrote: [ -> ]The variable itself is part of the MyBB class;
$mybb->user['avatar']

yea , but is there a function somewhere ?

Something like this:

function getAvatar($image) {
return $image;
}

Because i want to add a default image like this:

function getAvatar($image) {
if ($image != '')
{ 
return $image;
}
else
{
return ("./images/avatars/image.png");
} 
}

I know there's a default avatar plugin but it conflicts with something else that i have installed , so im trying to find the function to add it manually.

I think it just queries the database when you run that variable. You could use the Default Profile plugin by DennisTT...?