Kunena 6.0.8 Released (17 Jan 2023)

The Kunena team has announce the arrival of Kunena 6.0.8 [K 6.0.8] which is now available for download as a native Joomla extension for J! 4.2.x. This version addresses most of the issues that were discovered in K 6.0 and issues discovered during the development stages of K 6.0.

Solved How to disable the automatic avatars size change and link to the original file

More
7 years 7 months ago #1 by Armor
Hi ;) (sorry for my language)
I looked a little on forum but I have not found a solution.
I want to use animated gifs as avatars and I do not want to Kunena reworked it to me.
On my forum I use a gallery avatars, I would like to receive the address directly into the selected avatar and permanently disable the automatic avatars size change in avatars/resized (This creates unnecessary files).

I use J!3.4 & K4.0

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

More
7 years 7 months ago #2 by Armor
:( Can anyone help me ?
Can someone point me though precisely which functions are of this, and where find it ?
I do not want to "look in the dark" :laugh:
Author Kunena surely knows it ;)

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

More
7 years 7 months ago #3 by 810
you can use antimated gifs <90px.

"and I do not want to Kunena reworked it to me." ?

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

More
7 years 7 months ago - 7 years 7 months ago #4 by Armor
Hi :)
I do not want to be limited ;)
I have animated gifs smaller and larger, for example
/media/kunena/avatars/gallery/Uzytkownicy/caage1.gif
I know that the script creates
/media/kunena/avatars/resized/size200/gallery/Uzytkownicy/caage1.gif
but also
/media/kunena/avatars/resized/size36/gallery/Uzytkownicy/caage1.gif
Where is the function of copying and changing ?
If I do not get help I'll be looking for "/resized/" in PHP but I'd have to get all files on disk. I thought, here I get such information.

"and I do not want to Kunena reworked it to me." ? >>

I want to use CSS for resize images, not PHP code ;)
Attachments:
Last edit: 7 years 7 months ago by Armor.

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

More
7 years 7 months ago #5 by Armor
Okay, I worked it out myself :)

I found 2 files
administrator\components\com_kunena\install\plugins\plg_kunena_kunena\avatar.php
plugins\kunena\kunena\avatar.php

I changed
Code:
protected function _getURL($user, $sizex, $sizey) { $user = KunenaFactory::getUser($user); $avatar = $user->avatar; $config = KunenaFactory::getConfig(); $path = KPATH_MEDIA ."/avatars"; if ( !is_file("{$path}/{$avatar}")) { // If avatar does not exist use default image if ($sizex <= 90) $avatar = 's_nophoto.jpg'; else $avatar = 'nophoto.jpg'; } $dir = dirname($avatar); $file = basename($avatar); if ($sizex == $sizey) { $resized = "resized/size{$sizex}/{$dir}"; } else { $resized = "resized/size{$sizex}x{$sizey}/{$dir}"; } if ( !is_file( "{$path}/{$resized}/{$file}" ) ) { require_once(KPATH_SITE.'/lib/kunena.image.class.php'); CKunenaImageHelper::version("{$path}/{$avatar}", "{$path}/{$resized}", $file, $sizex, $sizey, intval($config->avatarquality)); } return KURL_MEDIA . "avatars/{$resized}/{$file}"; }

for this
Code:
protected function _getURL($user, $sizex, $sizey) { $user = KunenaFactory::getUser($user); $avatar = $user->avatar; $config = KunenaFactory::getConfig(); $path = KPATH_MEDIA ."/avatars"; if ( !is_file("{$path}/{$avatar}")) { $avatar = 'nophoto.jpg'; } $dir = dirname($avatar); $file = basename($avatar); if ( !is_file( "{$path}/{$dir}/{$file}" ) ) { $path = KPATH_MEDIA ."/avatars"; $file = 'nophoto.jpg'; return KURL_MEDIA . "{$path}/{$file}"; } return KURL_MEDIA . "avatars/{$dir}/{$file}"; }

I do not know if this is good, but it works.
I use only gallery ;)

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

Time to create page: 0.319 seconds