View Single Post
  #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