By Mist on Saturday, 01 February 2014
Posted in General Issues
Replies 3
Likes 0
Views 696
Votes 0
I am struggling to construct the statement that will output the user avatar in "large square size"

I followed the documentation and so far i constructed the statement this way

 <?php
require_once( JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php' );
$my = Foundry::user();
?>


and then outputed the image src like this

<img src="<?php echo $my->getAvatar();?>"  alt="" data-src="<?php echo $my->getAvatar();?>" data-src-retina="<?php echo $my->getAvatar();?>" width="90" height="90" />


In documentation is mentioned that there is some $avatarSize arguments available, like: SOCIAL_AVATAR_SMALL, SOCIAL_AVATAR_MEDIUM, SOCIAL_AVATAR_SQUARE, SOCIAL_AVATAR_LARGE

Can you pls help on how to apply this argument ? I would like to apply the "SOCIAL_AVATAR_SQUARE" argument to the above code.

Thanks SO MUCH !
Hello,

You should pass the SOCIAL_AVATAR_SQUARE constant to the getAvatar method like this,


echo $my->getAvatar( SOCIAL_AVATAR_SQUARE );
·
Saturday, 01 February 2014 00:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Perfect, it's working fine. Thanks !
·
Saturday, 01 February 2014 01:18
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome
·
Saturday, 01 February 2014 02:23
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post