Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares
Reply
  #1  
Old 16th August 2018, 16:45
slycrespo2's Avatar
slycrespo2 slycrespo2 is offline
Senior Member
 
Join Date: Nov 2009
Slovenia
Posts: 55
Default Change avatar size in TSUE 2.2
Hello!
I am using original TSUE 2.2 tracker script. I want to change the avatar size for example to 200 x 200 px. How can I do that without image quality loss ?
Please help!

Click the image to open in full size.
Reply With Quote
  #2  
Old 17th August 2018, 00:12
Botanicar's Avatar
Botanicar Botanicar is offline
Senior Member
 
Join Date: Jun 2013
Croatia
Posts: 127
Default
Quote:
Originally Posted by slycrespo2 View Post
Hello!
I am using original TSUE 2.2 tracker script. I want to change the avatar size for example to 200 x 200 px. How can I do that without image quality loss ?
Please help!

Click the image to open in full size.



You themes --> CSS find avatar and change size of that
Reply With Quote
  #3  
Old 17th August 2018, 04:02
MasterMan MasterMan is offline
Senior Member
 
Join Date: Jan 2012
P2P
Posts: 141
Default
how about to make it round from default square shape??
Reply With Quote
  #4  
Old 17th August 2018, 09:39
slycrespo2's Avatar
slycrespo2 slycrespo2 is offline
Senior Member
 
Join Date: Nov 2009
Slovenia
Posts: 55
Default
Can you be more specific...
Reply With Quote
  #5  
Old 17th August 2018, 11:46
Botanicar's Avatar
Botanicar Botanicar is offline
Senior Member
 
Join Date: Jun 2013
Croatia
Posts: 127
Default
Quote:
Originally Posted by slycrespo2 View Post
Can you be more specific...



Appearance --> Themes Manage Styles --> YOU THEME --> style.css

Search for a avatar style and change preference

Click the image to open in full size.
Reply With Quote
  #6  
Old 17th August 2018, 15:29
slycrespo2's Avatar
slycrespo2 slycrespo2 is offline
Senior Member
 
Join Date: Nov 2009
Slovenia
Posts: 55
Default
Yes, I did that, but image quality is not good. Its stil like the old size just zoomed in..
Reply With Quote
  #7  
Old 17th August 2018, 16:37
MasterMan MasterMan is offline
Senior Member
 
Join Date: Jan 2012
P2P
Posts: 141
Default
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:
/* AVATAR */
.avatar
{
background: #fff;
padding: 4px;
margin: 0 10px 0 0;
-webkit-border-radius: 100px;
-moz-border-radius: 100px;
border-radius: 100px;
border: 1px solid #E6E6E6;
}

good luck m8

Last edited by MasterMan; 17th August 2018 at 16:40. Reason: code added
Reply With Quote
  #8  
Old 18th August 2018, 10:59
slycrespo2's Avatar
slycrespo2 slycrespo2 is offline
Senior Member
 
Join Date: Nov 2009
Slovenia
Posts: 55
Default
I don't want radius, I just want bigger avatar picture (without quality loss)...

Bump: Please help somebody...
Reply With Quote
  #9  
Old 22nd August 2018, 07:27
outtyrox outtyrox is offline
Senior Member
 
Join Date: Apr 2015
Posts: 59
Default
Quote:
Originally Posted by slycrespo2 View Post
I don't want radius, I just want bigger avatar picture (without quality loss)...

Bump: Please help somebody...

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/");
    }

}
Reply With Quote
  #10  
Old 22nd August 2018, 19:02
slycrespo2's Avatar
slycrespo2 slycrespo2 is offline
Senior Member
 
Join Date: Nov 2009
Slovenia
Posts: 55
Default
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/");
    }

}
The main avatar picture (on right side) is now OK and its in "real" quality, but I don't know how to set other avatar pictures to different sizes. For example: in staff section (look at the picture below), in torrent comments, in forum,... They are all as big as the one that I wanted to change.. Please help me..

Click the image to open in full size.
Reply With Quote
Reply

Tags
22 , avatar , change , size , tsue

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 21:47. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.