By James on Thursday, 16 February 2017
Posted in Technical Issues
Replies 15
Likes 0
Views 366
Votes 0
Please provide updated instructions to change the avatar size being used for the EasySocial Users Module.

The current icon is coded to be 40x40 and I need them to be atleast 100x100.

Is it possible in an upcoming update to add a setting to the modules to allow us the ability to choose the avatar size? It kind of makes sense.

James
Also, the popbox for this module doesn't seem to be working.

James
·
Thursday, 16 February 2017 00:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

It seems that i cant access your backend as i hit this "You are a spammer, hacker or an otherwise bad person.". Please advice.
·
Thursday, 16 February 2017 14:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Can you provide me with your IP Address so I can whitelist you?

It would only do that if you tried logging in with the incorrect information too many times.

Thanks,
James
·
Thursday, 16 February 2017 21:39
·
0 Likes
·
0 Votes
·
0 Comments
·
Also, the popbox for this module doesn't seem to be working.

James

Can you please elaborate more on how to reproduce this?
Or did you mean dropdown modules? If yes, there are too narrow to fit the dropdown modules into the top bar, you will need to modify the template to give some spaces.
Before: http://take.ms/bbxI7
After: http://take.ms/qzZYu
·
Friday, 17 February 2017 10:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Please provide updated instructions to change the avatar size being used for the EasySocial Users Module.

The current icon is coded to be 40x40 and I need them to be atleast 100x100.

Is it possible in an upcoming update to add a setting to the modules to allow us the ability to choose the avatar size? It kind of makes sense.

James


Those avatar is part of ES design we need to standardize to make it looks consistent. You can modify by override with CSS but we will not responsible on any design issues.
[gist type="php"]
/* Override ES users modules avatar size. */
#es.mod-es-users .o-avatar {
width: 100px;
height: 100px;
}
[/gist]
·
Friday, 17 February 2017 10:35
·
0 Likes
·
0 Votes
·
0 Comments
·

Those avatar is part of ES design we need to standardize to make it looks consistent. You can modify by override with CSS but we will not responsible on any design issues.
[gist type="php"]
/* Override ES users modules avatar size. */
#es.mod-es-users .o-avatar {
width: 100px;
height: 100px;
}
[/gist]


Chang, the problem with this is that when you resize the avatar it is doing so based on an image that is by default 48px x 48px maybe? So, when scaling up it is distorted and looks like garbage. Hence the reason I asked if the code of the modules could be changed to give the admin the ability to select which size avatar we want to use.

It used to be possible to do this: https://stackideas.com/forums/avatar-image-size

Why is it not possible now?

James
·
Thursday, 23 February 2017 11:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi James,

My colleague have check for the avatar resize method on https://stackideas.com/forums/avatar-image-size, it still works but it only for new upload.
·
Thursday, 23 February 2017 15:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi James,

My colleague have check for the avatar resize method on https://stackideas.com/forums/avatar-image-size, it still works but it only for new upload.


Ok, well if it still works their file version and mine are completely different. Here is the default.php file from the path provided in the other post: /modules/mod_easysocial_users/tmpl/default.php Do have a look and let me know where your colleagues can see a match because I don't.


<?php
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2016 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
?>
<div id="es" class="mod-es mod-es-users <?php echo $lib->getSuffix();?>">
<?php if ($users) { ?>
<ul class="g-list-inline">
<?php foreach ($users as $user) { ?>
<li class="t-lg-mr--md t-lg-mb--md">
<?php echo $lib->html('avatar.user', $user, 'default', $params->get('popover', true), $params->get('online_state', true), $params->get('popover_position', 'top-left')); ?>
</li>
<?php } ?>
</ul>
<?php } ?>

<?php if ($params->get('showall_link', true)) { ?>
<div>
<a href="<?php echo ESR::users();?>" class="t-lg-mt--xl btn btn-es-default-o btn-block btn-sm"><?php echo JText::_('MOD_EASYSOCIAL_USERS_VIEW_ALL_USERS'); ?></a>
</div>
<?php } ?>
</div>

·
Thursday, 23 February 2017 21:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey James,

Try this following code and see how it goes?

[gist type="php"]
<?php echo $lib->html('avatar.user', $user, 'default', $params->get('popover', true), $params->get('online_state', true), $params->get('popover_position', 'top-left')); ?>

// replace with

<?php echo $lib->html('avatar.user', $user, 'xl', $params->get('popover', true), $params->get('online_state', true), $params->get('popover_position', 'top-left')); ?>

[/gist]

[gist type="php"]
// by the way, this is the class for the avatar size
$this->sizes = array('xs' => 16, 'sm' => 24, 'md' => 32, 'lg' => 64, 'xl' => 120, 'default' => 40);
[/gist]
·
Friday, 24 February 2017 11:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Arlex.

The code definitely changed the size of the Avatar in the module to a much more usable size but it is still extremely distorted. Basically as if I had taken a 48px x 48px size and up-scaled it using CSS to 150px x 150px. Is it possible to fix this or use something else that will use a better copy of the image?
·
Friday, 24 February 2017 21:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Sorry for the delay in my response James, been extremely occupied with EasyBlog and EasySocial. I believe this could be a bug (in a way) because if you try to use sizes like "xl", the theme file isn't pulling a larger image to cover the canvas therefore it seems like it is up-scaling.

Here's what you can try temporarily, edit the file /components/com_easysocial/themes/wireframe/helpers/avatar/user.php and locate the codes below:


<img src="<?php echo $user->getAvatar();?>" alt="<?php echo $this->html('string.escape', $user->getName());?>" width="<?php echo $width;?>" height="<?php echo $height;?>" />


Replace it with,


<img src="<?php echo $user->getAvatar($size == 'lg' || $size == 'xl' ? SOCIAL_AVATAR_LARGE : SOCIAL_AVATAR_MEDIUM);?>" alt="<?php echo $this->html('string.escape', $user->getName());?>" width="<?php echo $width;?>" height="<?php echo $height;?>" />
·
Saturday, 25 February 2017 00:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Sorry for the delay in my response James, been extremely occupied with EasyBlog and EasySocial. I believe this could be a bug (in a way) because if you try to use sizes like "xl", the theme file isn't pulling a larger image to cover the canvas therefore it seems like it is up-scaling.

Here's what you can try temporarily, edit the file /components/com_easysocial/themes/wireframe/helpers/avatar/user.php and locate the codes below:


<img src="<?php echo $user->getAvatar();?>" alt="<?php echo $this->html('string.escape', $user->getName());?>" width="<?php echo $width;?>" height="<?php echo $height;?>" />


Replace it with,


<img src="<?php echo $user->getAvatar($size == 'lg' || $size == 'xl' ? SOCIAL_AVATAR_LARGE : SOCIAL_AVATAR_MEDIUM);?>" alt="<?php echo $this->html('string.escape', $user->getName());?>" width="<?php echo $width;?>" height="<?php echo $height;?>" />


Thanks Mark.

I tried this (sorry for the delayed response) but now instead of displaying the Avatar it just shows the username. I have verified that the users do in fact have avatars.

James
·
Monday, 27 February 2017 22:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello James,

It looks like our Joomla site is adding a / after the src=" . You do not need to add that /
·
Tuesday, 28 February 2017 01:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Mark.

Removing the / resolved the missing avatar.
However, now the popbox isn't working. Oddly, when the code was broke it worked fine. Can you see any reason why?

Thanks,
James
·
Tuesday, 28 February 2017 02:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Hm, that was strange, it seems work fine for me regarding that avatar pop-box, you can check my attached screenshot below.

Perhaps you can share us some screenshot or provide us with your Joomla backend and FTP access so I can better have a look?
·
Tuesday, 28 February 2017 11:26
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post