Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

Question display-size of avatars

  • webrus
  • webrus's Avatar Topic Author
  • New Member
  • New Member
More
17 years 2 months ago #4733 by webrus
display-size of avatars was created by webrus
I uploaded a bunch of images to the gallery directory via FTP. Users are not allowed to upload themselves.

Everything's running fine. But I would like to downsize the display of the avatars.
Is there any way to do this or do I have to resize the original files?

I found that the settings for small, medium and large avatars in the kunena-administration have no effect in the direction I aim.

Please Log in or Create an account to join the conversation.

More
17 years 2 months ago #4746 by Matias
Replied by Matias on topic Re:display-size of avatars
I believe that this feature (small, medium, large) has never been implemented. I'll add it to our todo list.

You can set max-width and max-height in css. You can use FireBug to hunt down where to add that.

Could you share your findings? :)

Please Log in or Create an account to join the conversation.

More
17 years 1 month ago - 17 years 1 week ago #9921 by sudobashnet
Was working with a similar problem and thought I would share for anyone else googling avatar sizes on kunena.

Scenario:
Users can upload their own pics or they can choose from a gallery. When a user uploaded a picture it was getting automatically sized (not sure if this is based off the controls in the forum configuration or not - one would assume its at least possible if not likely). The pictures were automatically getting created in 3 different sizes and being named based of the users ID number.

For instance:
Small - s_37.jpg
Medium - 37.jpg
Large - l_37.jpg

At the top of the forum (Welcome, User) the small picture is being used. On board messages the medium pic is automatically used and on the users profile the large is actually used.) The following is my temporary fix so that the large pic will be also used for the board messages (otherwise it uses the medium one which almost always meant it came out distorted and "squished").

In /components/com_kunena/template/<your template>/view.php

On line 637 (1.0.8)
On line 607 (1.0.9):
I changed the following from:
Code:
$avatar = $userinfo->avatar; if ($avatar != '') { $msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '" alt="" /></span>'; } else {$msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/s_nophoto.jpg" alt="" /></span>'; } } }

to:
Code:
$avatar = $userinfo->avatar; if ($avatar != ''){ $msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . 'l_' . $avatar . '" alt="" /></span>'; } if (eregi("gallery/", $avatar) == true){ $msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '" alt="" /></span>'; } if ($avatar == '') {$msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/s_nophoto.jpg" alt="" /></span>'; } } }

Careful to remove the word wrap that the forum placed on my code.

Using this your users with an uploaded avatar will have the correct dimensions and anyone with a gallery avatar will still show up.
Last edit: 17 years 1 week ago by sudobashnet.

Please Log in or Create an account to join the conversation.

Time to create page: 0.245 seconds