How can I get JomSocial profile pictures to display on the site?
I am using component "JComments 3.0.7" and plugin "JComments - Avatar 4.1.8" on the site.
Unfortunately, plugin JComments - Avatar does not currently display avatars from the JomSocial component.
Please tell me which line I need to change so that this component can display avatars from JomSocial.
Code:
case 'jomsocial':
if (count($users)) {
$db->setQuery('SELECT userid, thumb as avatar FROM #__community_users WHERE userid in (' . implode(',', $users) . ')');
$avatars = $db->loadObjectList('userid');
}
$avatarA = JPATH_SITE . DS;
$avatarL = JURI::base() . '/';
foreach ($comments as &$comment) {
$uid = (int)$comment->userid;
$comment->profileLink = $uid ? JRoute::_('index.php?option=com_community&view=profile&userid=' . $uid) : '';
if (isset($avatars[$uid]) && $avatars[$uid]->avatar != '' && $avatars[$uid]->avatar != 'components/com_community/assets/default_thumb.jpg') {
if (file_exists($avatarA . $avatars[$uid]->avatar)) {
$comment->avatar = $avatarL . $avatars[$uid]->avatar;
}
}
}
break;