step 1 ----- add code in member.php
find if (!$uploaderror) {
above insert//--------------------------------------------
//---------Start Code Auto Image Resizing --------------
//--------------------------------------------
if ($config['auto_image'] && !$uploaderror) {
if ($direct_upload) {
$src = MEDIA_PATH."/".$cat_id."/".$new_name;
}
else {
$src = MEDIA_TEMP_PATH."/".$new_name;
}
$do_resize = 0;
if ($image_info = @getimagesize($src)) {
if ($image_info[2] == 1 || $image_info[2] == 2 || $image_info[2] == 3) {
$do_resize = 1;
}
}
if ($do_resize) {
if (!function_exists(init_convert_options)) {
require(ROOT_PATH.'includes/image_utils.php');
}
if ($image_info[0] > $config['max_image_width'] || $image_info[1] > $config['max_image_height']) {
$convert_options = init_convert_options();
if (!$convert_options['convert_error']) {
$quality = (intval($config['auto_image_quality']) && intval($config['auto_image_quality']) <= 100) ? intval($config['auto_image_quality']) : 100;
if (!resize_image($src, $quality, $config['max_image_width'], 1, $config['max_image_height'])) {
$msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['file_upload_error'].": ".$new_name;
$uploaderror = 1;
}
}
}
}
}
//---------------End Code auto Image Resizing----------------------------
step 2 ----- add code in /includes/upload.php
find
$this->max_height['media'] = $config['max_image_height'];
below insert
//---------Start Code Auto Image Resizing (part 1)----
$this->auto_image['media'] = $config['auto_image'];
//---------End Code Auto Image Resizing (part 1)----
step 2.2 ----- add code in /includes/upload.php
find if ($this->image_size[1] > $this->max_height[$this->image_type]) {
$ok = 0;
$this->set_error($this->lang['invalid_image_height']);
}
below insert //---------Start Code Auto Image Resizing (part 2)----
if ($this->auto_image[$this->image_type]) {
$ok = 1;
}
//---------End Code Auto Image Resizing (part 2)----
step 3 ----- add code in /admin/settings.php findshow_setting_row("upload_emails");
below insert //---------Start Code Auto Image Resizing ----
show_setting_row("auto_image", "radio");
show_setting_row("auto_image_quality");
//---------Start Code Auto Image Resizing ----
step 4 ----- add code in /lang/italian/admin.phpfind$setting['auto_thumbnail_quality'] = "Thumbnail quality<br /><span class=\"smalltext\">0 to 100</span>";
below insert/*-- START CODE AUTO RESIZE IMAGE --*/
$setting['auto_image'] = "Auto-resize image";
$setting['auto_image_quality'] = "Auto-resize image quality";
/*-- END CODE AUTO RESIZE IMAGE --*/
this is all my step.
i dont have install another mod.
Version 4images 1.7.4
PHP Version 5.2.0i wait your help guys.
if all it works I buy 2 license for my sites, but if dont work i cannot use it