default photo as avatar

hi guys,


any tips on how i can make the default photo album sort of the avatar photo ? So when i upload a photo to the default album it also becomes my avatar ? I know u can set a photo as your avatar so i think it could be possible.

Quote · 6 Mar 2010

well i managed to do a bit of testing and narrowed it down a bit.....

in BxPhotosUploader.php just under:

if ($bAutoAssign2Profile && $iLastID > 0) {
$this->setPrimarySharedPhoto($iLastID, $iAuthorId);
createUserDataFile($iAuthorId);
}


I added:

//Adds this as the avatar
$ava_module = BxDolService::call ('avatar', 'make_avatar_from_shared_photo_auto', array ($iLastID));
$ava_module->serviceMakeAvatarFromSharedPhotoAuto($iLastID);

Which added the photo i was uploading as the new avatar. However this only works with the Regular / Simple uploader but actually hangs after upload is complete. Also it does not work with the flash uploader at all, just returns a error 500.

Quote · 6 Mar 2010

anybody ? would appreciate any help on this 1 :)

Quote · 7 Mar 2010

I like to have this option too as some of my members just can't figure out to click on Add Avatar to display the avatar but unfortunately I don't know anything to help with the code. Hope fully someone can help.

Quote · 10 Mar 2010

 

well i managed to do a bit of testing and narrowed it down a bit.....

in BxPhotosUploader.php just under:

if ($bAutoAssign2Profile && $iLastID > 0) {
$this->setPrimarySharedPhoto($iLastID, $iAuthorId);
createUserDataFile($iAuthorId);
}


I added:

//Adds this as the avatar
$ava_module = BxDolService::call ('avatar', 'make_avatar_from_shared_photo_auto', array ($iLastID));
$ava_module->serviceMakeAvatarFromSharedPhotoAuto($iLastID);

 

Which added the photo i was uploading as the new avatar. However this only works with the Regular / Simple uploader but actually hangs after upload is complete. Also it does not work with the flash uploader at all, just returns a error 500.

 

 

This maybe can help solve your problem regarding "Simple uploader but actually hangs after upload is complete"

  $aOwnerInfo = getProfileInfo($iAuthorId);
                $bAutoAssign2Profile = ($aOwnerInfo['Avatar']==0) ? true : $bAutoAssign2Profile;
                $ava_module = BxDolService::call ('avatar', 'make_avatar_from_shared_photo_auto', array ($iLastID));
                if ($bAutoAssign2Profile && $iLastID > 0) {
                    $this->setPrimarySharedPhoto($iLastID, $iAuthorId);
                    serviceMakeAvatarFromSharedPhotoAuto($iLastID);
                    createUserDataFile($iAuthorId);
                }
Quote · 23 Oct 2017

Current Dolphin allows using profile photo as the avatar, no changes in code needed.  Just go to admin and choose which you want.

Geeks, making the world a better place
Quote · 23 Oct 2017
 
 
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.