By Alex on Monday, 24 March 2014
Posted in Technical Issues
Likes 0
Views 2.9K
Votes 0
Hi,

I am trying to edit the CSS for the width and height of the avatar in Kunena posts.

It seems to be using JS to resize to 32x32px, can this be edited, this happening when i have the ES plugin installed.

You will see the link i have provided i have added some custom CSS

#Kunena span.kavatar img {
width: 50%;
}


It gets overridden with some inline width and height.,

Regards
Hello Alex,

If you actually downloaded my file earlier and replaced the file on the site, it should use a larger version instead of 32x32 I have replaced the avatar.php file with the file I attached previously and it works fine now
·
Tuesday, 25 March 2014 18:12
·
0 Likes
·
0 Votes
·
0 Comments
·
This has nothing to do with Easysocial, the avatar size is controlled by CSS in Kunena
·
Monday, 24 March 2014 06:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi

If you take a look at your own CSS you will notice that the default Kunena width and height CSS is being overridden by the ES plugin and pulled in dynamically, so it is to do with Easy Social using JS from the plugin to pull the width and height from the avatar.

No matter what size adjustments you make to the CSS in Kunena the plugin is adding the image at 32x32 and that will cause the image to stretch if edited via CSS.

So again please take the time to explore your own CSS before posting unhelpful replies.

Regards
·
Monday, 24 March 2014 07:03
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alex,

Hm, this is odd because in the Kunena EasySocial plugin, we didn't set any "width" or "height". This is how the code looks like exactly,


if( $sizex <= 90 ) $avatar = $user->getAvatar( SOCIAL_AVATAR_SMALL );
else $avatar = $user->getAvatar( SOCIAL_AVATAR_LARGE );

return $avatar;


Perhaps Kunena is setting those image attributes?
·
Monday, 24 March 2014 10:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

If you take a look at my attached it is fetching the image at 32x32 from Easy Social so it does not matter what CSS i use if the thumb is at a set size, i dont see how Kunena can resize a image that is from Easy Social.

Regards
·
Monday, 24 March 2014 16:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alex,

Hm, this is strange because whatever we generate from Kunena is actually based on the size that Kunena passed in.
·
Monday, 24 March 2014 17:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

This is getting very strange, Kunena does not even use a size of 32x32 lowest is 36x36

There are no settings to edit the avatar in Kunena.

Regards
Alex
·
Monday, 24 March 2014 18:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi

Ok it seems my template is editing that darn width, why do theme providers mess with these settings.

Silly.
·
Monday, 24 March 2014 18:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Ah, thanks for updating Alex Maybe you want to share more about this so others could benefit out of this? I myself am pretty curious about this too.
·
Tuesday, 25 March 2014 03:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

I am looking into it myself, i will not be defaulted by the code HAHA

I will update once i defeat it

Regards
Alex
·
Tuesday, 25 March 2014 06:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

There is something very strange going on here.

When i disable the ES plugin there avatar displays at 90x90 which is default.

I then enable the ES plugin and the avatar image then is 32x32

Regards
·
Tuesday, 25 March 2014 07:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Alex,

Em regarding your issue, can you pass me your ftp account so that we can investigate this issue further?
Please advise.
Sam
·
Tuesday, 25 March 2014 14:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

I have updated the details.

The dir is /easy-social

Regards
·
Tuesday, 25 March 2014 17:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

I am so sorry i thought you were showing me an example of your code, there was no indication from you to upload the file. My bad

Thank you Mark.

Alex
·
Tuesday, 25 March 2014 18:52
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome Alex Glad that your issues are resolved now
·
Tuesday, 25 March 2014 23:41
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post