Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Template Shares (http://www.bvlist.com/forumdisplay.php?f=26)
-   -   Change avatar size in TSUE 2.2 (http://www.bvlist.com/showthread.php?t=11723)

slycrespo2 16th August 2018 16:45

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!

http://shrani.si/f/2K/Q2/37x8NvpO/avatar001.jpg

Botanicar 17th August 2018 00:12

Quote:

Originally Posted by slycrespo2 (Post 52403)
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!

http://shrani.si/f/2K/Q2/37x8NvpO/avatar001.jpg




You themes --> CSS find avatar and change size of that

MasterMan 17th August 2018 04:02

how about to make it round from default square shape??

slycrespo2 17th August 2018 09:39

Can you be more specific...

Botanicar 17th August 2018 11:46

Quote:

Originally Posted by slycrespo2 (Post 52406)
Can you be more specific...




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

Search for a avatar style and change preference

https://s20.postimg.cc/dixjvrssd/Screenshot_3.jpg

slycrespo2 17th August 2018 15:29

Yes, I did that, but image quality is not good. Its stil like the old size just zoomed in..

MasterMan 17th August 2018 16:37

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

slycrespo2 18th August 2018 10:59

I don't want radius, I just want bigger avatar picture (without quality loss)...

Bump: Please help somebody...

outtyrox 22nd August 2018 07:27

Quote:

Originally Posted by slycrespo2 (Post 52411)
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/");
    }

}


slycrespo2 22nd August 2018 19:02

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:

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..

http://shrani.si/f/K/10q/389HKZlC/problem1.jpg


All times are GMT +2. The time now is 02:07.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.