1 sayfadan 1. sayfa

Avatar boyutu sorunu(ez portal da)

İletiTarih: 26.01.2007, 02:13
Misafir
Ez portalla bırlıkte kullanıyorum forumu.

forum ıcerısınde avatar boyutlarında sorun yokken ana sayfada (ez portal) da avatar boyutu buyuk cıkıyo http:// ' den yuklenenlerde, eger boyut buyukse.

avatar reseize kurdum ama hala aynı baska bır yol varmı.

tesekkurler

Cvp: Avatar boyutu sorunu(ez portal da)

İletiTarih: 26.01.2007, 23:00
Misafir
Remote Avatar Size Control

bu mod ıcınde

#
#-----[ ADD SQL ]------------------------------------------
#

ALTER TABLE phpbb_users ADD user_avatar_width SMALLINT;
ALTER TABLE phpbb_users ADD user_avatar_height SMALLINT;


bu kısımda ne demek ıstıyo lutfen yardım edebılırmısınız

İletiTarih: 27.01.2007, 01:26
exUBert
veritabanında sorgulaman gerek sql sorgusu o

İletiTarih: 27.01.2007, 15:16
CeRBeR
imzamda ki konuları iyicene bi incele

Cvp: Avatar boyutu sorunu(ez portal da)

İletiTarih: 27.01.2007, 23:06
Misafir
tesekkurler sorguyu yaptım ama hata verdı.

dıger mod Real Avatar size ı yukledım calkısmıyo yanı avatar hala buyuk.

yaptıgım ıslemı de koyayımda hata varmı bakarmısınız


#
#-----[ OPEN ]------------------------------------------
###-- Aucun changement depuis la verson 1.1.0

includes/usercp_avatar.php
#
#-----[ FIND (line 245)]------------------------------------------
#

}
else
{
$l_avatar_size = sprintf($lang['Avatar_imagesize'], $board_config['avatar_max_width'], $board_config['avatar_max_height']);

$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $l_avatar_size : $l_avatar_size;
}


return $avatar_sql;
}
#
#-----[ REPLACE WITH ]------------------------------------------
#

}
else
{
$old_filename = uniqid(rand());
$new_filename = $old_filename.$imgtype;

if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' )
{
if ( file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $current_avatar)) )
{
@unlink('./' . $board_config['avatar_path'] . '/' . $current_avatar);
}
}

if ( @$ini_val('open_basedir') != '' )
{
if ( @phpversion() < '4.0.3' )
{
message_die(GENERAL_ERROR, 'open_basedir is set and your PHP version does not allow move_uploaded_file', '', __LINE__, __FILE__);
}

$move_file = 'move_uploaded_file';
}
else
{
$move_file = 'copy';
}

$move_file($avatar_filename, './' . $board_config['avatar_path'] . "/$new_filename");


@chmod('./' . $board_config['avatar_path'] . "/$new_filename", 0777);
redim('./' . $board_config['avatar_path'] . "/$new_filename",$board_config['avatar_max_width'],$board_config['avatar_max_height'],$imgtype);
$old_filename.="_mini.jpg";
unlink('./' . $board_config['avatar_path'] . "/$new_filename");
rename('./' . $board_config['avatar_path'] . "/$old_filename",'./' . $board_config['avatar_path'] . "/$new_filename");
$avatar_sql = ( $mode == 'editprofile' ) ? ", user_avatar = '$new_filename', user_avatar_type = " . USER_AVATAR_UPLOAD : "'$new_filename', " . USER_AVATAR_UPLOAD;
}



return $avatar_sql;
}

#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php

#
#-----[ FIND ]------------------------------------------
#
?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#

///////////////////////////////////
/// MOD Écrit par Dany Côté /
/// 23 mai 2005 à 02:51 AM /
/// http://www.infologique.net /
///////////////////////////////////

function redim($img,$tx,$ty,$imgtype) {

$image_dim = getimagesize($img);
$bits=getimagesize($img);
$type=$bits[2];

if($image_dim[0] > $image_dim[1]){ // x est plus grand que y
$new_x = $tx;
$new_y = $image_dim[1]/($image_dim[0]/$tx);
}else{
if($image_dim[0] < $image_dim[1]){ // y est plus grand que x
$new_y = $ty;
$new_x = $image_dim[0]/($image_dim[1]/$ty);
}else{ // x == y
$new_x = $tx;
$new_y = $tx;
}
}

$truecolor = false;

switch( $type ) {
case 1: # GIF
$src_image = imagecreatefromgif( $img );
break;
case 2: # JPG
$src_image = imagecreatefromjpeg( $img );
$truecolor = true;
break;
case 3: # PNG
$src_image = imagecreatefrompng( $img );
$truecolor = ( $bits['bits'] > 8 );
break;
case 15: # WBMP for WML
$src_image = imagecreatefromwbmp( $img );
break;
case 16: # XBM
$src_image = imagecreatefromxbm( $img );
break;
default:
return 'Image type not supported';
break;
}

if ( $truecolor ) {
$dst_image = imagecreatetruecolor( $new_x, $new_y );
} else {
$dst_image = imagecreate( $new_x, $new_y );
}

imagecopyresampled( $dst_image, $src_image, 0,0,0,0,$new_x,$new_y,$image_dim[0],$image_dim[1] );

$chaine = substr($img,0,-4);//enléve les 4 derniers caractères ( ".JPG" )
$chaine.="_mini.jpg";

switch( $type ) {
case 1: # GIF
case 3: # PNG
case 15: # WBMP
case 16: # XBM
imagepng( $dst_image, $chaine );
break;
case 2: # JPEG
imageinterlace( $dst_image );
imagejpeg( $dst_image, $chaine, 95 );
break;
default:
break;
}

imagedestroy( $dst_image );
imagedestroy( $src_image );
}
///////////////
//// EnD of MoD real_avatar_resize version 1.5.0
////////////////////////////

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#

Cvp: Avatar boyutu sorunu(ez portal da)

İletiTarih: 28.01.2007, 20:02
Misafir
ya yardım edecek kımse yokmu.

Ez portalda ana sayfada http den yuklenen avtar eger buyukse buyuk cıkıyor ne yapmam lazım.

Soruna bız cozum bulamadım..

Forumdakıler normal Ez portalı kurarkenmı hata var yoksa?????????

İletiTarih: 28.01.2007, 20:55
CeRBeR
daha aradan 24 saat bile geçmeden ayrıca kırmızı yazı fontuyla yazmak nie böyle olunca bizi soruna cevap verdirmekten soğutuyosun kilitlememem için bir neden söyleyebilirmisin :x

Cvp: Avatar boyutu sorunu(ez portal da)

İletiTarih: 28.01.2007, 23:16
Misafir
Tarih: 26.01.2007, 02:13

üstat 3 gun oldu konuyu acalı ama hala bı cozum bulamıyorum.. son mesaj ıcın soluyorsanız. tmm ama kırmızı yazmanın neden bır sorun teskıl ettıgını de anlayamadım.

site sızın kurallarda ole tabıkıde.

sorun olusturduysam ve konuda olusturduysa. tabıkıda buyrun.