Jump to content

How to show larger EasySocial avatar in listings?


Ant

Recommended Posts

Just wondering, is there a setting in JReviews or EasySocial that would let me use a larger image for the EasySocial Avatar in JReviews listings?

I know that there are several sizes that can be used, but I've been testing with a normal JReviews listing that has an image allocated as the EasySocial Profile Picture (avatar) and the smaller image size is allocated for the avatar profile pic. I thought there might be a setting somewhere that would allow the larger image, but can't seem to find one.

 

In my travels, I found the following file and code

html/components/com_jreviews/jreviews/views/helpers/community.php

public function avatar($entry, $options = []) { $defaults = [ 'return_url' => false, 'class' => '', 'text_avatar' => true, 'profile_link' => true, ]; $options = array_replace_recursive($defaults, $options); $options['class'] = 'jrAvatar '.$options['class']; $avatarKey = Sanitize::getBool($options, 'large') ? 'avatar_lg_path' : 'avatar_path'; $avatarPath = null; if ( isset($entry['Community']) && !empty($entry['Community']['avatar_path']) ) { if ( Sanitize::getBool($options, 'large') && Sanitize::getString($entry['Community'], 'avatar_lg_path') != '' ) { $avatarPath = $entry['Community']['avatar_lg_path']; } elseif ( Sanitize::getString($entry['Community'], 'avatar_path') != '' ) { $avatarPath = $entry['Community']['avatar_path']; } }

I've used xdebug to step through it and it seems to set the larger image with

$avatarPath = $entry['Community']['avatar_lg_path'];

but then community.php gets triggerered a second time and sets the smaller image

$avatarPath = $entry['Community']['avatar_path'];

 

The first time was triggered from html/components/com_jreviews/jreviews/views/themes/default/listings/detail_header.thtml with the following code

if ( !isset($avatarImg) ) { $avatarImg = $showAuthor ? $Community->avatarLarge($listing, ['class' => '', 'text_avatar' => false]) : false; }

The 2nd time, the below code from  html/components/com_jreviews/jreviews/views/themes/default/listings/detail_header.thtml seems to be the trigger

<span class="jrListingAuthor"><?php echo $Community->avatar($listing) . $Community->screenName($listing,true,true);?></span>

At least, that is what seems to be going on. Anyway regardless, I can't seem to work out where it is getting the options from to decide which sized image to use as the avatar.

Any help would be much appreciated ?

 

 

 

 

Link to post
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Please refer to our Privacy Policy.