Avatar in profile - Avatar block?

Digging through the forums, I've noticed that there is a lot of posts about confusion with the Avatar.  So, is there anyway to create a custom PHP block or HTML block that displays the avatar on the profile page?  I've seen it done on other Dolphin sites, but I haven't had any luck with the code.  Any ideas?

Quote · 1 Sep 2010

I'm trying to find out the same thing, have you had any luck yet?

Quote · 13 Sep 2010

Unfortunately, nothing yet.

Quote · 13 Sep 2010

Can be done in a php block but not a html block.

In a php block on the profile page insert this code.

$aProfileInfo = getProfileInfo($this -> oProfileGen -> _iProfileID);
$sIcon = get_member_thumbnail($aProfileInfo['ID']);
$sNick = $aProfileInfo['NickName'] . "'s current avatar";
$sCode = '
<div style="text-align: center; padding-bottom: 10px; padding-top: 7px; text-transform: capitalize;">' . $sNick . '</div>
<div align="center" style="padding-bottom:7px;">' . $sIcon . '</div>
';
echo $sCode;


https://www.deanbassett.com
Quote · 13 Sep 2010

Thanks Deano!  You're the man.  After adding the PHP block, I'm getting the following error when viewing the block on the profile page:

Warning: Missing argument 2 for get_member_thumbnail(), called in /home/public_html/inc/classes/BxDolPageView.php(572) : eval()'d code on line 2 and defined in /home/public_html/inc/design.inc.php on line 204

==============

Underneath that, it shows:

Admin's current avatar and then the avatar image.  So, it looks like it is working, but there's just the error.  Any ideas?

Quote · 13 Sep 2010

It's suppose to have a default. Perhaps a different version of dolphin then mine. Try changing this line.

$sIcon = get_member_thumbnail($aProfileInfo['ID']);

To this.

$sIcon = get_member_thumbnail($aProfileInfo['ID'], 'none');

https://www.deanbassett.com
Quote · 13 Sep 2010

Thanks Deano!  This makes my site a lot less confusing.  Thanks again!

Quote · 13 Sep 2010

Hi, I have installed dolphin 7.03 and I have the same problem

for dolphin version of this code work?

Quote · 12 Oct 2010

 

Hi, I have installed dolphin 7.03 and I have the same problem

for dolphin version of this code work?

Have you tried the code yet?  Did you receive an error message?

Quote · 12 Oct 2010

Can you resize the thumbnail to make it seem as big as a profile pic?

Quote · 18 Nov 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.