I had a problem with this plugin (cb-profile-visitors-1_2) from Blisspark where it would only show an uploaded avatar and not a user selected gallery avatar.
This is how I fixed it, not the most elegant solution but it works! Hope it helps someone else.
In profile.visitors.php around line 83, find this code:
if($visitor['avatar'] && strlen($visitor['avatar']) > 0) {
if($ueConfig['avatarUploadApproval'] && !$visitor['avatarapproved']) {
$avatar_url = JURI::base() . 'components/com_comprofiler/images/english/tnpendphoto.jpg';
} else {
$avatar_url = JURI::base() . 'images/comprofiler/tn' . $visitor['avatar'];
}
} else {
$avatar_url = JURI::base() . 'components/com_comprofiler/images/english/tnnophoto.jpg';
}
...and replace it with this:
if($visitor['avatar'] && strlen($visitor['avatar']) > 0) {
if($ueConfig['avatarUploadApproval'] && !$visitor['avatarapproved']) {
$avatar_url = JURI::base() . 'components/com_comprofiler/images/english/tnpendphoto.jpg';
} elseif ( (strncasecmp($visitor['avatar'], 'gallery', 7)) ==0) {
$avatar_url = JURI::base() . 'images/comprofiler/' . $visitor['avatar'];
}
else {
$avatar_url = JURI::base() . 'images/comprofiler/tn' . $visitor['avatar'];
}
} else {
$avatar_url = JURI::base() . 'components/com_comprofiler/images/english/tnnophoto.jpg';
}
You need to be using the default gallery directory for it to function, otherwise change the path strings appropriately.