Hi,
i want to change widht and height of avatars on creation page. I want avatars to be created from the original photo to have 600px*600px (big avatar).
How can i do?
Alex
HI, Alessandro.
Can you tell me a bit more?
Avatar is usually a small square... where you want to have 600x600 avatar?
Could you add a printscreen?
i want to have the big avatar in the profile page. if i modify css the image appears in low quality so i need to change the avatar creation so to have a good image.
alex
Hi, Alessandro.
Edit this file:
ROOT/components/com_community/defines.community.php in line 33
Change value here: define('COMMUNITY_SMALL_AVATAR_WIDTH', 64); from 64 to 600.
Hi Michal,
the image is still created in 64*64.
Alex
Hi, Alessandro.
Ok, you'll need to hack two core files to achieve what you want.
But first in the same file as before change values for:
define('COMMUNITY_STREAM_STYLE', '1');
define('COMMUNITY_AVATAR_MINIMUM_WIDTH', 128);
define('COMMUNITY_AVATAR_MINIMUM_HEIGHT', 128);
/* do square avatar for profile page */
define('COMMUNITY_AVATAR_PROFILE_WIDTH', 160);
define('COMMUNITY_AVATAR_PROFILE_HEIGHT', 160);
define('COMMUNITY_AVATAR_RESERVE_WIDTH', 200);
define('COMMUNITY_AVATAR_RESERVE_HEIGHT', 200);
Then edit this file:
ROOT/components/com_community/helpers/photos.php in lines 97 and 98.
Next change this file:
ROOT/components/com_community/libraries/photos.php in line 236.
(WARNING! Core file hack! Please, make safe copy of edited file. It means also that this file will be overwritten during upgrade, so please make a safe copy of customized file as well. Some core hacks could not working with future JomSocial releases and/or cause issues that will be not supported)
And finally you can do an override for this file:
ROOT/components/com_community/templates/default/profile.uploadavatar.php
copy it to:
ROOT/templates/your-template/html/com_community (if you don't have "html" or "com_community" folders, feel free to create them)
edit file and change values around line 91 to 101.
Solved,
thank you