I deleted the original mod of member.php and used this code instead://--------------------------------------------
//--------- Auto Image Resizing --------------
//--------------------------------------------
if ($config['auto_image'] && !$uploaderror) {
$src_copy = MEDIA_PATH."/".$cat_id."/big";
if ($direct_upload) {
$src = MEDIA_PATH."/".$cat_id."/".$new_name;
$src_copy = MEDIA_PATH."/".$cat_id."/big";
}
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');
}
$convert_options = init_convert_options();
if (!$convert_options['convert_error']) {
if ($image_info[0] > $config['max_image_width'] || $image_info[1] > $config['max_image_height']) {
$result = true;
if (!@is_dir($src_copy)) {
$oldumask = umask(0);
$result = mkdir($src_copy);
umask($oldumask);
if (!@is_dir($src_copy) || !$result) {
$result = mkdir($src_copy, 0755);
}
}
if ($result == true){
copy($src, $src_copy."/".$new_name);
}
$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)) {
$msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['file_upload_error'].": ".$new_name;
$uploaderror = 1;
}
}
}else{
$do_resize = 0;
}
}
}
}
//-------------------------------------------
Now, the only errors are:
gwenstefani.jpg: Image width invalid
gwenstefani.jpg: Image heigth invalid
The upload code is:
$this->max_width['thumb'] = $config['max_thumb_width'];
$this->max_width['media'] = $config['max_image_width'];
$this->max_height['thumb'] = $config['max_thumb_height'];
$this->max_height['media'] = $config['max_image_height'];
$this->auto_image['media'] = $config['auto_image']; <------
function check_image_size() {
$this->image_size = @getimagesize($this->upload_file);
if ($this->auto_image[$this->image_type] == 1) {
return 1;
}
$ok = 1;
function check_max_filesize() {
if ($this->auto_image[$this->image_type] == 1) {
return true;
}
if ($this->HTTP_POST_FILES[$this->field_name]['size'] > $this->max_size[$this->image_type]) {
return false;
}
else {
return true;
}
}
I've run the install_autoimage.php and lang mod which are ok.
I've set the Image max. width and height to 600px and 1000k for size.
What am I doing wrong here? Does this mod also auto resize the larger image sizes, not just thumbnails?
Also, in admin settings I noticed that both Auto-Image-Resizer and Auto-Thumbnailer, when clicked on, say the message: "Select module to create thumbnail. Check module settings." What does that mean?
Thanks again!