Sprobuj tego:
Cytuj:
File: /includes/usercp_avatar.php
1) FIND AND DELETE (OR REMARK):
if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' )
{
if ( file_exists('./' . $board_config['avatar_path'] . '/' . $current_avatar) )
{
@unlink('./' . $board_config['avatar_path'] . '/' . $current_avatar);
}
}
2) FIND:
$avatar_sql = ( $mode == 'editprofile' ) ? ", user_avatar = '$new_filename', user_avatar_type = " . USER_AVATAR_UPLOAD : "'$new_filename', " . USER_AVATAR_UPLOAD;
3) REPLACE 2) WITH:
$complete_new_name = './'.$board_config['avatar_path']."/$new_filename";
list($width, $height) = @getimagesize($complete_new_name);
if ( $width > $board_config['avatar_max_width'] || $height > $board_config['avatar_max_height'] ) {
@unlink($complete_new_name);
$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;
}
else {
if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' )
{
if ( file_exists('./' . $board_config['avatar_path'] . '/' . $current_avatar) )
{
@unlink('./' . $board_config['avatar_path'] . '/' . $current_avatar);
}
}
$avatar_sql = ( $mode == 'editprofile' ) ? ", user_avatar = '$new_filename', user_avatar_type = " . USER_AVATAR_UPLOAD : "'$new_filename', " . USER_AVATAR_UPLOAD;
}
"The Madness is out there!"