Quote from: gregdev on March 09, 2008, 03:23:31 AM
QuoteI find that if you use full image URL, you cant use Auto-Create Thumbnail?
Correct - it does not work. I am working on it. It appears that it does everything right, then deletes the thumbnail image that was auto-created. So, it can't be that hard to fix - I just haven't found it yet. Will you enter this in the tracker?
Thanks,
Greg
I quote and made new topic, because this is new bug.
I use this to fix:
In imageTools.class.php
/* Command to move uploaded file into destination directory */
// Command to move uploaded file into destination directory
$d["image_commands"][]= array( 'command' => 'move_uploaded_file',
'param1' => $temp_file,
'param2' => $path.$to_file
);
$d["image_commands"][] = array( 'command' => 'unlink',
'param1' => $temp_file
);
/* Command to move uploaded file into destination directory */
// Command to move uploaded file into destination directory
if (substr( $temp_file, 0, 4) == "/tmp") {
$d["image_commands"][] = array( 'command' => 'move_uploaded_file',
'param1' => $temp_file,
'param2' => $path.$to_file
);
$d["image_commands"][] = array( 'command' => 'unlink',
'param1' => $temp_file
);
}
In imageTools.class.php :
$fileout = IMAGEPATH."/$table_name/resized/".$to_file_thumb."_".PSHOP_IMG_WIDTH."x".PSHOP_IMG_HEIGHT.$noimgif.$ext;
Should be no trailing slash , because IMAGEPATH have trailing slash end of it:
$table_name out from quotes:
$fileout = IMAGEPATH.$table_name.'/resized/'.$to_file_thumb.'_'.PSHOP_IMG_WIDTH.'x'.PSHOP_IMG_HEIGHT.$noimgif.$ext;
Iam not sure, but I think this is bug too.
In ps_product.php:
// if we have an uploaded image file, prepare this one for deleting.
if( $db->f("product_full_image") && substr( $db->f("product_thumb_image"), 0, 4) != "http") {
Should be:
// if we have an uploaded image file, prepare this one for deleting.
if( $db->f("product_full_image") && substr( $db->f("product_full_image"), 0, 4) != "http") {
wow, THANK YOU SO MUCH, it was exactly what I was looking for!!!
But I have another problem with full_image_url-pics. Now I can auto-resize them (Thank you so much) but I cannot delete them!! Everything works fine with uploaded images (from directory) but not with url-images.
Maybe someone has an idea??
Ok I just found out, that it works when you delete the link :) Perfect :)
The problem with this code 'if (substr( $temp_file, 0, 4) == "/tmp")' is regular upload of large images don't work.