Ok, I don;t have a life I know but the solution to this problem I do have...
The upload.php file needs a little change to get this working.
The following two parts need to be corrected (this is CPG1.3)
} elseif (max($imginfo[0], $imginfo[1]) > $CONFIG['max_upl_width_height']) {
@unlink($path_to_image);
// The file upload has failed -- the image dimensions exceed the allowed amount.
$file_failure_array[] = array( 'failure_ordinal'=>$failure_ordinal, 'file_name'=> $file_name, 'error_code'
=>$lang_upload_php['pixel_allowance']);
// There is no need for further tests or action, so skip the remainder of the iteration.
continue;
}
with} elseif (max($imginfo[0], $imginfo[1]) > $CONFIG['max_upl_width_height']) {
// RatKing's hack to resize images that are 'to big' according to the admin
// Determain which is the tallest width or height.
if ( $imginfo[0] > $imginfo[1] ) { $tall = 'wd'; } else { $tall = 'ht'; }
// Simply resize the image to the biggest file size that is allowed.
resize_image($path_to_image, $path_to_image, $CONFIG['max_upl_width_height'], $CONFIG['thumb_method'], $tall);
// Should be all there is to it Now when I upload a very big file it will be squashed
// nothing more to do we can just escape this if loop and process the image
continue;
}
and
} elseif (max($imginfo[0], $imginfo[1]) > $CONFIG['max_upl_width_height']) {
@unlink($path_to_image);
// The file upload has failed -- the image dimensions exceed the allowed amount.
$URI_failure_array[] = array( 'failure_ordinal'=>$failure_ordinal, 'URI_name'=> $_POST['URI_array'][$count
er], 'error_code'=>$lang_upload_php['pixel_allowance']);
// There is no need for further tests or action, so skip the remainder of the iteration.
continue;
}
with} elseif (max($imginfo[0], $imginfo[1]) > $CONFIG['max_upl_width_height']) {
// RatKing's hack to resize images that are 'to big' according to the admin
// Determain which is the tallest width or height.
if ( $imginfo[0] > $imginfo[1] ) { $tall = 'wd'; } else { $tall = 'ht'; }
// Simply resize the image to the biggest file size that is allowed.
resize_image($path_to_image, $path_to_image, $CONFIG['max_upl_width_height'], $CONFIG['thumb_method'], $tall);
// Should be all there is to it Now when I upload a very big file it will be squashed
// nothing more to do we can just escape this if loop and process the image
continue;
}
}
In my "development/mess about" version of CPG1.3 I have also made a change to the config page and the english language file so I can enable and disable this function on the config page.
I have not posted that code here but if you want I could send the modified files to you. np...
I am not sure if this will work in CPG1.2 I think it will but I have not tested this yet (to little time to test that for now)