nate_02631 Posted October 3, 2004 Share Posted October 3, 2004 Refer to above troubleshooting tips... If the contrib is being called, the images will resize... Quote ** Please do not PM with personal support requests (even if offering "payment"). Thank you. Link to comment Share on other sites More sharing options...
Dennisra Posted October 5, 2004 Share Posted October 5, 2004 I just noticed my server error log is loaded with tens of thousands of this or similiar error messages. I am using GD Version bundled (2.0.17 compatible) with resampling, true color and jpg all congigured as true. Â [Tue Oct 5 10:23:45 2004] [error] PHP Notice: Use of undefined constant imagecopyresampled - assumed 'imagecopyresampled' in /usr/home/user/public_html/catalog/product_thumb.php on line 68 Â Anyone have an idea as to what I have done wrong?? Quote Link to comment Share on other sites More sharing options...
Dennisra Posted October 5, 2004 Share Posted October 5, 2004 I reduced my error level to zero "0", nill. Thus no more errors reported. Doesn't solve the problem however. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 10, 2004 Share Posted October 10, 2004 It would be helpful to see a link and an example... The most likely cause is that you are trying to thumbnail an unsupported file format (only PNG, GIF, and JPG are supported) or that your catalog config, with respect to the image directory is not set correctly. It may also be you have your PHP's errors message turned all the way up on your machine, which is causing the problem... For each call to the thumbnailer, it is trying to output an "undefined variable" message before it makes the thumbnail which may be causing the images not to show up. (If you call the product_thumb.php by itself, naturally you will get some errors as it is expecting info to be passed along to it)  You could try adjusting your PHP's error message settings so they only output *fatal* error warning messages or alter the script to implicity define every variable at the beginning (I know a better, if somewhat outdated PHP coding practice). <{POST_SNAPBACK}>   Nate,  sorry for the delay in replying, been busy with work.  I went and uploaded this to my website for testing, and I get the same thing. Just boxes with little red x's. I have tried all the combos for turning on and off the options in config, etc...  I "believe" my directory is correct. my pictures are located in catalog/images/ (the default location on oscommerce install).  The pictures are in .jpg format so shouldn't be an issue.  I did a call to the php file to see if there were any errors and this is what I got.  Warning: imagecreatetruecolor(): Invalid image dimensions in /home/mutzig2/public_html/catalog/product_thumb.php on line 73  Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /home/mutzig2/public_html/catalog/product_thumb.php on line 77  Warning: imagefill(): supplied argument is not a valid Image resource in /home/mutzig2/public_html/catalog/product_thumb.php on line 79  Warning: imagecolortransparent(): supplied argument is not a valid Image resource in /home/mutzig2/public_html/catalog/product_thumb.php on line 80  Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/mutzig2/public_html/catalog/product_thumb.php on line 93  Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/mutzig2/public_html/catalog/product_thumb.php on line 111  Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/mutzig2/public_html/catalog/product_thumb.php on line 112  The web host I am using has this version of gd installed:  gd GD Support enabled GD Version bundled (2.0.23 compatible) FreeType Support enabled FreeType Linkage with freetype GIF Read Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enabled   I just don't see what the problem could be? any ideas?  The website is located here www.mutzigcreations.com (just adding to it, and getting ready to open it.)  I don't know if this would affect it or not, but I do have the UltraPics contribution installed.  Hope this helps, and thank you for your hard work, and time.  Doug Quote Link to comment Share on other sites More sharing options...
chuck252 Posted October 26, 2004 Share Posted October 26, 2004 Hi Nate. Â I am a big fan of your contribution. I really like the fact that it resizes the images on the fly. Â I too would like to see this contribution work with the UltraPics contribution. Â In that vein I get broken images when I install the UltraPics contrib, and then yours. I get these kinds of image tags on new items. :blink: <img src="product_thumb.php?img=images/homeworld2/boxcover-sm.jpg&w=75&h=100" width="75" height="100" border="0" alt=" Homeworld 2 " title=" Homeworld 2 "> Â I haven't been able to figure out why the product_thumb.php didn't get executed. It looks to me like everything is set, and the file just doesn't get called. Can you give me any clues to fix this? Â Maybe we could incorporate all of the code in product_thumb.php into the tep_image function? :-" Â Thanks for any help. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 26, 2004 Share Posted October 26, 2004 Found that ' bug again- I'll leave it so you can get a look before I change it but here is the category: http://oddsandinsonline.com/catalog/index.php?cPath=20 and here is the product page: http://oddsandinsonline.com/catalog/produc...products_id=741 Quote Link to comment Share on other sites More sharing options...
lsd_se Posted October 27, 2004 Share Posted October 27, 2004 hi  I'm a n00b trying to install this mod. I have a very silly question to ask that will make you slap your forehead repeatedly.  in the readme.txt file it says to replace the nep_image function with the provided code.  my question is: what is the tep_image function? From where to where to I replace code?  do I replace this with the provided code?  ////// The HTML form submit button wrapper function // Outputs a button in the selected language  function tep_image_submit($image, $alt = '', $parameters = '') {   global $language;    $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' .  tep_output_string($alt) . '"';    if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';    if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;    $image_submit .= '>';    return $image_submit;  }  Sorry for the silly question.  Thanks for any info :blush: Quote Link to comment Share on other sites More sharing options...
nate_02631 Posted October 27, 2004 Share Posted October 27, 2004 Hi, look after the word function for the function name, which is followed by stuff in parenthesis. The one you have listed below is "tep_image_submit", you want the one in html_output.php (the same file, I think) called tep_image which does the formatting/output of images on the site. Â You then replace the whole function, much as you have below, beginning with function... and ending with return... } Â Also, check your store config to make sure the path to your images is correctly specified... Quote ** Please do not PM with personal support requests (even if offering "payment"). Thank you. Link to comment Share on other sites More sharing options...
lsd_se Posted October 27, 2004 Share Posted October 27, 2004 Hi, look after the word function for the function name, which is followed by stuff in parenthesis. The one you have listed below is "tep_image_submit", you want the one in html_output.php (the same file, I think) called tep_image which does the formatting/output of images on the site. You then replace the whole function, much as you have below, beginning with function... and ending with return... }  Also, check your store config to make sure the path to your images is correctly specified... <{POST_SNAPBACK}>  thanks for the reply I understand what you mean about the tep_image function now but do i replace this?: ////// The HTML image wrapper function  function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {   if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {    return false;   }  // alt is added to the img tag even if it is null to prevent browsers from outputting // the image filename as default   $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';    if (tep_not_null($alt)) {    $image .= ' title=" ' . tep_output_string($alt) . ' "';   }    if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {    if ($image_size = @getimagesize($src)) {     if (empty($width) && tep_not_null($height)) {      $ratio = $height / $image_size[1];      $width = $image_size[0] * $ratio;     } elseif (tep_not_null($width) && empty($height)) {      $ratio = $width / $image_size[0];      $height = $image_size[1] * $ratio;     } elseif (empty($width) && empty($height)) {      $width = $image_size[0];      $height = $image_size[1];     }    } elseif (IMAGE_REQUIRED == 'false') {     return false;    }   }    if (tep_not_null($width) && tep_not_null($height)) {    $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';   }    if (tep_not_null($parameters)) $image .= ' ' . $parameters;    $image .= '>';    return $image;  }  //// // The HTML form submit button wrapper function // Outputs a button in the selected language  function tep_image_submit($image, $alt = '', $parameters = '') {   global $language;    $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';    if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';    if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;    $image_submit .= '>';    return $image_submit;  } until return $image; or return $image_submit;  thanks! Quote Link to comment Share on other sites More sharing options...
nate_02631 Posted October 27, 2004 Share Posted October 27, 2004 You see this? //// // The HTML form submit button wrapper function // Outputs a button in the selected language  function tep_image_submit($image, $alt = '', $parameters = '') { ... that's the start of a new function... Quote ** Please do not PM with personal support requests (even if offering "payment"). Thank you. Link to comment Share on other sites More sharing options...
lsd_se Posted October 28, 2004 Share Posted October 28, 2004 (edited) thank you nate, I understand completely. Thanks for answering my question! Edited October 28, 2004 by lsd_se Quote Link to comment Share on other sites More sharing options...
dimports Posted October 28, 2004 Share Posted October 28, 2004 I have many stores that pull the pics out of one images folder, like a consolidated images folder. It seems this contribution only works if the images folder is the subfolder of the catalogue (../catalog/images). Can this be modified so that images are create on the fly no matter where the images folder is located? Quote Link to comment Share on other sites More sharing options...
lsd_se Posted October 28, 2004 Share Posted October 28, 2004 this might be the wrong asnwer, but if the configuration file lists the /images/yourpicturedirectory it should work, no? Quote Link to comment Share on other sites More sharing options...
dimports Posted October 28, 2004 Share Posted October 28, 2004 i wish it were that easy. for some reason it insists on only creating thumbnails only if the folder is a subfolder. its a weird thing, but if anyone has any idea, please let me know. Quote Link to comment Share on other sites More sharing options...
lsd_se Posted October 29, 2004 Share Posted October 29, 2004 (edited) Howdy all, I just installed this contribution, but I seem to be getting several errors.  when I go to the site all I get are little red x's, if I do the click to enlarge then I can see my pictures.  i have the same problem RavenWulf, dod you get it fixed on your site yet? It worked for the first page I looked at, and then after I just got red X's. strange. Thanks Edited October 29, 2004 by lsd_se Quote Link to comment Share on other sites More sharing options...
lsd_se Posted October 29, 2004 Share Posted October 29, 2004 also, could I ask if this is right in the file renaming? in the same driectory I have the thumbnails generated as:  original: book-bleachers.jpg thumb: book-bleachers.jpg.thumb.jpg  i have red x;'s all over the place, and I double checked my config settings which are correct. /catalog/, images/ etc. Quote Link to comment Share on other sites More sharing options...
lsd_se Posted October 29, 2004 Share Posted October 29, 2004 (edited) OK, i figured out the problem, but I don't know how to fix it. The problem is my cache, it is generating the thumbs, but can't access them after. I have cache set to false in my product_thumbs.php config now and it works fine. Â How should I proceed in fixing this? Edited October 29, 2004 by lsd_se Quote Link to comment Share on other sites More sharing options...
lsd_se Posted November 3, 2004 Share Posted November 3, 2004 any ideas? Thanks! Quote Link to comment Share on other sites More sharing options...
nate_02631 Posted November 4, 2004 Share Posted November 4, 2004 I'm not sure what cache setting your are referring to - perhaps it is the hacked version of this contrib that saves the thumbnails as files? Quote ** Please do not PM with personal support requests (even if offering "payment"). Thank you. Link to comment Share on other sites More sharing options...
lsd_se Posted November 4, 2004 Share Posted November 4, 2004 yes, thumbnails have been generated like this in the same directory as the original image:  original: book-bleachers.jpg thumb: book-bleachers.jpg.thumb.jpg  the settings in product_thumbs.php include a cache setting.  why do you say it's a hacked version? is it not a contribution from this site? Quote Link to comment Share on other sites More sharing options...
mark27uk3 Posted November 8, 2004 Share Posted November 8, 2004 Hi Guys,  I have a slight problem that I hope you can help me with.  So far the my thumbnails are looking great all thanks to this contribution, however I am also using the define main page contrib as well and I am trying to add this code to the main page.  <?php  echo '<a href="' . tep_href_link('product_info.php?products_id=664') . '">' . tep_image(DIR_WS_IMAGES . 'HKP-500a.gif', SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';  The problem is, is that this pic is not picked up and converted to a thumbnail!  Can anyone tell me how to fix this because I dont really want to use the full size image!  Thanks  Mark :-" :'( Quote Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
dimports Posted November 10, 2004 Share Posted November 10, 2004 this doesn't work when images are in subfolders. It only works when images are just in the images folder. Anybody see why this would be happening? Quote Link to comment Share on other sites More sharing options...
nate_02631 Posted November 10, 2004 Share Posted November 10, 2004 I think because the tep_image function uses whatever you have defined as your image path to look for the image... Quote ** Please do not PM with personal support requests (even if offering "payment"). Thank you. Link to comment Share on other sites More sharing options...
dimports Posted November 10, 2004 Share Posted November 10, 2004 thanks for the reply. but more specifically, the problem is that the contribution will not generate a thumbnail on the fly if the image resides in a subfolder. It just ignores it. Quote Link to comment Share on other sites More sharing options...
Guest Posted November 11, 2004 Share Posted November 11, 2004 Hi I noticed a problem with this contribution. If a product image filename has a '&' in it, the thumbnail created will be blank. Maybe there's a quick fix for this problem? Â It doesn't bother me much, but for my clients, they will probably continue to upload images with ampersands in the filenames and complain when the image created is blank. Â Thanks folks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.