- Kod: Tümünü seç
#
#-----[ UPLOAD ]------------------------------------------
#
includes/dv_functions_image.php to includes/
#
#-----[ SQL ]---------------------------------------------
#
INSERT INTO `phpbb_config`(`config_name`, `config_value`, `is_dynamic`) VALUES ('avatar_auto_resize', 0, 1);
#
#-----[ AÇ ]------------------------------------------
#
includes/functions_upload.php
#
#-----[ BUL ]------------------------------------------
#
if (!defined('IN_PHPBB'))
{
exit;
}
#
#-----[ SONUNA ]------------------------------------------
#
require($phpbb_root_path . 'includes/dv_functions_image.' . $phpEx);
#
#-----[ BUL ]------------------------------------------
#
function move_file($destination, $overwrite = false, $skip_image_check = false, $chmod = 0666)
{
global $user, $phpbb_root_path;
#
#-----[ BUL INLINE ]------------------------------------------
#
global $user, $phpbb_root_path
#
#-----[ SONUNA ]------------------------------------------
#
, $config
#
#-----[ BUL ]------------------------------------------
#
// Make sure the dimensions match a valid image
if (empty($this->width) || empty($this->height))
{
$this->error[] = $user->lang['ATTACHED_IMAGE_NOT_IMAGE'];
}
#
#-----[ SONUNA ]------------------------------------------
#
else if($config['avatar_auto_resize']
&& (request_var('mode', '')=='avatar'
|| (request_var('i', '')=='groups' && request_var('mode', '')=='manage')
|| request_var('i', '')=='users'))
{
$img = new Image($this->destination_file);
$img->set_max_width($config['avatar_max_width']);
$img->set_max_height($config['avatar_max_height']);
$img->set_max_filesize($config['avatar_filesize']);
if($img->resize())
{
$img_infos = getimagesize($this->destination_file);
$this->width = $img_infos[0];
$this->height = $img_infos[1];
}
}
#
#-----[ BUL ]------------------------------------------
#
$this->additional_checks();
#
#-----[ ÖNÜNE ]------------------------------------------
#
if(!$config['avatar_auto_resize']
|| request_var('mode', '')!='avatar'
|| (request_var('i', '')!='groups' && request_var('mode', '')=='manage')
|| request_var('i', '')!='users')
#
#-----[ BUL ]------------------------------------------
#
function fileupload($error_prefix = '', $allowed_extensions = false, $max_filesize = false, $min_width = false, $min_height = false, $max_width = false, $max_height = false)
{
#
#-----[ SONUNA ]------------------------------------------
#
global $config;
if($config['avatar_auto_resize']
&& (request_var('mode', '')=='avatar'
|| (request_var('mode', '')=='manage' && request_var('i', '')=='groups')
|| request_var('i', '')=='users'))
$max_filesize = 1048576;
#
#-----[ AÇ ]------------------------------------------
#
includes/acp/acp_board.php
#
#-----[ BUL ]------------------------------------------
#
'avatar_max' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
#
#-----[ SONUNA ]------------------------------------------
#
'avatar_auto_resize' => array('lang' => 'AVATAR_AUTO_RESIZE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
#
#-----[ AÇ ]------------------------------------------
#
includes/acp/acp_groups.php
#
#-----[ BUL ]------------------------------------------
#
'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'],
#
#-----[ DEĞİŞTİR ]------------------------------------------
#
'AVATAR_MAX_FILESIZE' => ($config['avatar_auto_resize'] && request_var('mode', '')=='avatar') ? '' : $config['avatar_filesize'],
#
#-----[ AÇ ]------------------------------------------
#
includes/acp/acp_users.php
#
#-----[ BUL ]------------------------------------------
#
'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'],
#
#-----[ DEĞİŞTİR ]------------------------------------------
#
'AVATAR_MAX_FILESIZE' => ($config['avatar_auto_resize'] && request_var('mode', '')=='avatar') ? '' : $config['avatar_filesize'],
#
#-----[ AÇ ]------------------------------------------
#
includes/ucp/ucp_groups.php
#
#-----[ BUL ]------------------------------------------
#
'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'],
#
#-----[ DEĞİŞTİR ]------------------------------------------
#
'AVATAR_MAX_FILESIZE' => ($config['avatar_auto_resize'] && request_var('mode', '')=='avatar') ? '' : $config['avatar_filesize'],
#
#-----[ AÇ ]------------------------------------------
#
includes/ucp/ucp_profile.php
#
#-----[ BUL ]------------------------------------------
#
'AVATAR_SIZE' => $config['avatar_filesize'],
#
#-----[ DEĞİŞTİR ]------------------------------------------
#
'AVATAR_SIZE' => ($config['avatar_auto_resize'] && request_var('mode', '')=='avatar') ? '' : $config['avatar_filesize'],
#
#-----[ BUL ]------------------------------------------
#
'S_FORM_ENCTYPE' => ($can_upload) ? ' enctype="multipart/form-data"' : '',
#
#-----[ SONUNA ]------------------------------------------
#
'S_AVATAR_AUTO_RESIZE' => $config['avatar_auto_resize'] ? true : false,
#
#-----[ AÇ ]------------------------------------------
#
language/en/acp/board.php
#
#-----[ BUL ]------------------------------------------
#
'MIN_AVATAR_SIZE' => 'Minimum avatar dimensions',
'MIN_AVATAR_SIZE_EXPLAIN' => 'Width x Height in pixels.',
#
#-----[ SONUNA ]------------------------------------------
#
'AVATAR_AUTO_RESIZE' => 'Avatar auto resize',
'AVATAR_AUTO_RESIZE_EXPLAIN' => 'Resize automatically user\'s avatar when it reaches the limit of max width, max height and max filesize.',
#
#-----[ AÇ ]------------------------------------------
#
language/vi/acp/board.php [for vietnamese users only]
#
#-----[ BUL ]------------------------------------------
#
'MIN_AVATAR_SIZE' => 'Kích thước hình đại diện tối thiểu cho phép',
'MIN_AVATAR_SIZE_EXPLAIN' => 'Chiều rộng x chiều cao với đơn vị tính Pixel.',
#
#-----[ SONUNA ]------------------------------------------
#
'AVATAR_AUTO_RESIZE' => 'Tự động điều chỉnh kích thước ảnh đại diện',
'AVATAR_AUTO_RESIZE_EXPLAIN' => 'Điều chỉnh lại ảnh đại diện theo giới hạn tối đa về kích thước và dung lượng cho phép.',
#
#-----[ AÇ ]------------------------------------------
#
language/fr/acp/board.php [for french users only]
#
#-----[ BUL ]------------------------------------------
#
'MIN_AVATAR_SIZE' => 'Dimensions minimales des avatars',
'MIN_AVATAR_SIZE_EXPLAIN' => 'Largeur x hauteur en pixels.',
#
#-----[ SONUNA ]------------------------------------------
#
'AVATAR_AUTO_RESIZE' => 'Redimensionnement automatique de l\'avatar automatiquement',
'AVATAR_AUTO_RESIZE_EXPLAIN' => 'Redimensionner automatiquement l\'avatar de l\'utilisateur quand sa taille ou son poids dépassent la limite.',
#
#-----[ AÇ ]------------------------------------------
#
styles/prosilver/template/ucp_avatar_options.html
#
#-----[ BUL ]------------------------------------------
#
<dt><label>{L_CURRENT_IMAGE}:</label><br /><span>{L_AVATAR_EXPLAIN}</span></dt>
#
#-----[ DEĞİŞTİR ]------------------------------------------
#
<dt>
<label>{L_CURRENT_IMAGE}:</label>
<!-- IF not S_AVATAR_AUTO_RESIZE -->
<br />
<span>{L_AVATAR_EXPLAIN}</span>
<!-- ENDIF -->
</dt>
#
#-----[ AÇ ]------------------------------------------
#
styles/subsilver2/template/ucp_profile_avatar.html
#
#-----[ BUL ]------------------------------------------
#
<td class="row1" width="35%"><b class="genmed">{L_CURRENT_IMAGE}: </b><br /><span class="gensmall">{L_AVATAR_EXPLAIN}</span></td>
#
#-----[ DEĞİŞTİR ]------------------------------------------
#
<td class="row1" width="35%"><b class="genmed">{L_CURRENT_IMAGE}: </b>
<!-- IF not S_AVATAR_AUTO_RESIZE -->
<br /><span class="gensmall">{L_AVATAR_EXPLAIN}</span>
<!-- ENDIF --></td>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Bu şekilde tüm adımları yerine getirdim.
C:\Program Files\EasyPHP 3.0\www\phpBB3\includes\functions_upload.php on line 273
avatar yüklemeye çalıştığımda bu şekilde bir uyarı çıkıyor, 'functions_upload' içine bir daha baktım adımlar doğru gibi...
- Kod: Tümünü seç
#
#-----[ SQL ]---------------------------------------------
#
INSERT INTO `phpbb_config`(`config_name`, `config_value`, `is_dynamic`) VALUES ('avatar_auto_resize', 0, 1);
#
bi bunu yapamadım bu nasıl oluyor.? sorun bundan kaynaklanıyor olabilirmi.?