
ia-ta ceva ciudat!

c'yaImaginile asociater trebuie să fie de tipul: .jpg, .gif sau .png

P.S. Este acelasi avatar care l-am folosit la mai mult de 5 forumuri si nu am avut niciodata probleme!
c'yaImaginile asociater trebuie să fie de tipul: .jpg, .gif sau .png
Cod: Selectaţi tot
switch( $type )
{
case 'jpeg':
case 'pjpeg':
case 'jpg':
return '.jpg';
break;
case 'gif':
return '.gif';
break;
case 'png':
return '.png';
break;
default:
$error = true;
$error_msg = (!empty($error_msg)) ? $error_msg . '<br />' . $lang['Avatar_filetype'] : $lang['Avatar_filetype'];
break;
}
Cod: Selectaţi tot
switch( $type )
{
case 'jpeg':
case 'pjpeg':
case 'image/pjpeg':
case 'jpg':
return '.jpg';
break;
case 'image/gif':
case 'gif':
return '.gif';
break;
case 'image/x-png':
case 'png':
return '.png';
break;
default:
$error = true;
$error_msg = (!empty($error_msg)) ? $error_msg . '<br />' . $lang['Avatar_filetype'] : $lang['Avatar_filetype'];
break;
}
Cod: Selectaţi tot
#################################
#####File to EDIT: .../includes/usercp_avatar.php
#################################
#
#----[OPEN]---------------------------------
usercp_avatar.php
#
#----[Find]---------------------------------
#
if ( !($imgtype = check_image_type($user_avatar_filetype, $error, $error_msg)) )
{
return;
}
#
#----[Replace with]-------------------------
#
if ( !preg_match('(gif|jpg|jpeg|png)', $avatar_filetype, end(split("\.",$avatar_filename))) )
{
$error = true;
$error_msg = (!empty($error_msg)) ? $error_msg . '<br />' . $lang['Avatar_filetype'] : $lang['Avatar_filetype'];
return;
}
#
#----[FIND]---------------------------------
#
$tmp_path = ( !@$ini_val('safe_mode') ) ? '/tmp' : './' . $board_config['avatar_path'] . '/tmp';
#
#----[IN LINE FIND]-------------------------
#
$tmp_path = ( !@$ini_val('safe_mode') )
#
#----[REPLACE WITH]-------------------------
#
$tmp_path = ( $ini_val('safe_mode') )
#
#----[IN LINE FIND]-------------------------
#
? '/tmp' : './' . $board_config['avatar_path'] . '/tmp';
#
#----[SET FULL PATH TO YOUR "/tmp" DIRECTORY *(For example at me it is /usr/home/kuku/www/tmp )]
#
? '/usr/home/kuku/www/tmp' : './' . $board_config['avatar_path'] . '/usr/home/kuku/www/tmp';
#
#CALL FTP MANAGER TO YOUR SITE AND CREATE DIRECTORY RADICALY "/tmp" AND SET CHMOD THIS 777]
#
#----[END]
#SAVE ALL
##################################
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 2 vizitatori