UPDATES EasyBlog 6.0.11 Released! Update to the latest version now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is offline
Our team is away during the weekend. Some answers may already be available on our documentation

Rest assured that we will get back to your posts as soon as the week starts!
  Support is offline
For all of you that are using EasySocial together with EasyBlog and you may want to load the EasySocial profile object instead of EasyBlog's profile object, in order to get bigger author avatar picture in blog posts. This is how you can do it.

First of all, it's obvious, that you will create a template override for blog.avatar.php file in your joomla template's overrides folder, the right path is shown below
/templates/your_template/html/com_easyblog/blog.avatar.php

So just copy the original blog.avatar.php into this location.

Now, inside blog.avatar.php find the following

<?php echo $row->blogger->getAvatar(); ?>


and replace it with

<?php echo Foundry::user($row->blogger->id)->getAvatar(SOCIAL_AVATAR_LARGE);?>


You will have to replace this twice, in 2 separate places, at line 22 & 26

Now, you can use the various avatar sizes inside your code as specified in EasySocial documentation.
Just replace "SOCIAL_AVATAR_LARGE" from within the above code with your desired option from below examples.

SOCIAL_AVATAR_SMALL - Smallest version of avatar. Dimensions: 32 x 32
SOCIAL_AVATAR_MEDIUM - Medium version of avatar. Dimensions: 64 x 64
SOCIAL_AVATAR_SQUARE - Large square version of avatar. Dimensions: 180 x 180
SOCIAL_AVATAR_LARGE - Large version of avatar. Dimensions: 180x (y) (This is a proportionate size)

Depending on your scenario, you may want to aditional control the output of the image by adding height and width sizes to the image code.

In my case i needed an image of 120x120, so i used "SOCIAL_AVATAR_SQUARE" option to pull an image with 180x180 size from EasySocial and then scale it down to 120x120 by adding custom width and height to img tag.

Enjoy !
0 Replies
The replies under this section are restricted to logged in users or users with an active subscription with us