|
#1
|
||||
|
||||
Change avatar size in TSUE 2.2
|
#2
|
||||
|
||||
Quote:
You themes --> CSS find avatar and change size of that |
#3
|
|||
|
|||
how about to make it round from default square shape??
|
#4
|
||||
|
||||
Can you be more specific...
|
#5
|
||||
|
||||
|
#6
|
||||
|
||||
Yes, I did that, but image quality is not good. Its stil like the old size just zoomed in..
|
#7
|
|||
|
|||
FYI, to make it round, just add:
-webkit-border-radius: 100px; -moz-border-radius: 100px; border-radius: 100px; into your avatar style in style.css and it becomes round or circle shape @slycrespo2; try the above code and change the 100px into 200px in border radius, like this; border-radius: 200px; PS. this is my avatar section as follows: Quote:
good luck m8 Last edited by MasterMan; 17th August 2018 at 16:40. Reason: code added |
#8
|
||||
|
||||
I don't want radius, I just want bigger avatar picture (without quality loss)...
Bump: Please help somebody... |
#9
|
|||
|
|||
Quote:
In Cpanel go to your /library/functions/functions_memberAvatar.php NOTE: FIRST MAKE A BACKUP OF THE FILE FIRST!!! YOU'VE BEEN WARNED! Change the size restriction here. This should be what you want to edit. (Note: You might have to edit the template styles.css and other .css in the template once you change the default sizes of the avatar. Recommend clone the template first. Then edit the clone.) Code:
require_once(REALPATH . "/library/classes/class_upload.php"); $Small = new Upload($NewAvatar); if( $Small->uploaded ) { $Small->image_resize = true; $Small->image_x = 48; $Small->image_y = 48; $Small->file_new_name_body = $memberid; $Small->Process($AvatarPath . "s/"); } $Medium = new Upload($NewAvatar); if( $Medium->uploaded ) { $Medium->image_resize = true; $Medium->image_x = 96; $Medium->image_y = 96; $Medium->file_new_name_body = $memberid; $Medium->Process($AvatarPath . "m/"); } $Large = new Upload($NewAvatar); if( $Large->uploaded ) { if( $width != 192 ) { $Large->image_x = 192; $Large->image_ratio_y = true; $Large->image_resize = true; } $Large->file_new_name_body = $memberid; $Large->Process($AvatarPath . "l/"); } } |
#10
|
||||
|
||||
Hello! thank you for your answer. I have changed the vaules in file functions_memberAvatar.php. Here is the code from how it looks now:
Code:
<?php if( !defined("IN_INDEX") && !defined("IS_AJAX") ) { exit(); } function prepareAvatar($NewAvatar, $AvatarPath, $memberid, $width, $height) { $SizeArray = array( "s/", "m/", "l/" ); $ExtArray = array( ".jpg", ".jpeg", ".gif", ".png" ); foreach( $SizeArray as $Size ) { foreach( $ExtArray as $Ext ) { if( file_exists($AvatarPath . $Size . $memberid . $Ext) ) { @unlink($AvatarPath . $Size . $memberid . $Ext); } } } require_once(REALPATH . "/library/classes/class_upload.php"); $Small = new Upload($NewAvatar); if( $Small->uploaded ) { $Small->image_resize = true; $Small->image_x = 48; $Small->image_y = 48; $Small->file_new_name_body = $memberid; $Small->Process($AvatarPath . "s/"); } $Medium = new Upload($NewAvatar); if( $Medium->uploaded ) { $Medium->image_resize = true; $Medium->image_x = 200; $Medium->image_y = 200; $Medium->file_new_name_body = $memberid; $Medium->Process($AvatarPath . "m/"); } $Large = new Upload($NewAvatar); if( $Large->uploaded ) { if( $width != 192 ) { $Large->image_x = 192; $Large->image_ratio_y = true; $Large->image_resize = true; } $Large->file_new_name_body = $memberid; $Large->Process($AvatarPath . "l/"); } } |
Tags |
22 , avatar , change , size , tsue |
Thread Tools | |
|
|