Avatar boyutu sorunu(ez portal da)

Yeni başlayanlar, nasıl ve ne yapacağını bilmeyenler buraya yazabilir.

Avatar boyutu sorunu(ez portal da)

İleti Misafir 26.01.2007, 02:13

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
Misafir
 

Cvp: Avatar boyutu sorunu(ez portal da)

İleti Misafir 26.01.2007, 23:00

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
Misafir
 

İleti exUBert 27.01.2007, 01:26

veritabanında sorgulaman gerek sql sorgusu o
exUBert
Üye
Üye
 
İleti: 171
Kayıt: 24.07.2006, 15:57

İleti CeRBeR 27.01.2007, 15:16

imzamda ki konuları iyicene bi incele
Kullanıcı avatarı
CeRBeR
Üye
Üye
 
İleti: 232
Kayıt: 05.10.2005, 20:37

Cvp: Avatar boyutu sorunu(ez portal da)

İleti Misafir 27.01.2007, 23:06

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 ]------------------------------------------
#
Misafir
 

Cvp: Avatar boyutu sorunu(ez portal da)

İleti Misafir 28.01.2007, 20:02

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?????????
En son Misafir tarafından, 28.01.2007, 23:12 tarihinde değiştirildi, toplamda 1 değişiklik yapıldı.
Misafir
 

İleti CeRBeR 28.01.2007, 20:55

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
Kullanıcı avatarı
CeRBeR
Üye
Üye
 
İleti: 232
Kayıt: 05.10.2005, 20:37

Cvp: Avatar boyutu sorunu(ez portal da)

İleti Misafir 28.01.2007, 23:16

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


Yeni Başlayanlar



Kimler çevrimiçi

Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir