jeradhill Posted November 24, 2008 Share Posted November 24, 2008 Hello to everybody!I am trying to make run a "on the fly" im my osc commerce, but its quite imposible for me right now, i try to install the "otf autothumb v2.4fix3" i replace the files, and upload de mysql file, but when i am trying to enter to the admin./.catalog in this file http://www.soloazar.com.ar/catalog/admin/categories.php?selected_box=catalog apears this error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/soloazar.com.ar/htdocs/catalog/admin/includes/functions/database.php on line 99 in the line 99 i have this function tep_db_fetch_array($db_query) { return mysql_fetch_array($db_query, MYSQL_ASSOC); } And im really confused, because i dont know how to solve it. The only contribution instaled in the osc, before thisone is the sts template system. Any Help will be eternaly regarded. I am getting the same error. Anyone know of a fix? Quote Link to comment Share on other sites More sharing options...
jeradhill Posted November 24, 2008 Share Posted November 24, 2008 I am getting the same error. Anyone know of a fix? I figured it out. I manually added the changes to admin/categories.php and the error went away. I believe that the file provided has some additional addon that was included in that file causing the error. Make the changes by comparing the files and only adding what you see inside the comments and you will get it to work. Quote Link to comment Share on other sites More sharing options...
RusNN Posted December 4, 2008 Share Posted December 4, 2008 I have a problem. All my thumbs directories with images are permission denided for me. So, I can't delete them or files in it via ftp. No changes for mkdir were in product_thumbs.php. Thumbs directories created should be 777, but they are 755. Does any body have this problem? (( Quote Link to comment Share on other sites More sharing options...
Groundation Posted December 23, 2008 Share Posted December 23, 2008 Another great contribution! Thanks :). Everything is working perfectly, allthough i would love to have one thing rescripted. At this point, when entering a new product or changing an existing products details, there are 2 fields for uploading pictures ( i dont really understand why there are 2?) I want to rescript the auto thumbnailing (which uses the same picture as in enlarge popup), and use the 2 fields in the new product details screen (admin) for: Field 1: To upload a picture that will be used in the enlargened popup. Field 2: To upload a picture that will be used in the thumbnail box. The reason i want to do this is to use watermarks in my enlargened pictures. I dont want these to show in the thumbnails. Does anyone know how i can fix this? Help would be more than appreciated Quote Link to comment Share on other sites More sharing options...
tea Posted January 15, 2009 Share Posted January 15, 2009 Thanks for a great contribution! We're trying to install it now and have a quick question about a potentially missing file: The readme file says, "Make a backup of the files that are going to be changed: <snip> * catalog/admin/includes/categories.php <snip>" But we do not have an admin/includes/categories.php file. Should we? We do have Categories in the store. We do have an admin/categories.php file. Quote Link to comment Share on other sites More sharing options...
dmitriy09 Posted January 29, 2009 Share Posted January 29, 2009 Hi, This is a wonderful contribution but after installing it I am having a tiny problem with our current design. For some reason, a small spacer image is not showing up after the installation. If you go to gsmfanatics.com, you will see it in the header, along the tabs, on each corner the spacer image is missing.. If someone could help me out I would sincerely appreciate that. Thank you!! Quote Link to comment Share on other sites More sharing options...
knifeman Posted February 6, 2009 Share Posted February 6, 2009 This mod is great except it uploads pictures with a permission of 777. Is there any way to make it upload them already at 644? Tim Quote Link to comment Share on other sites More sharing options...
Guest Posted February 13, 2009 Share Posted February 13, 2009 Sweet contrib! Basic install works like a charm. Way less image loading time! I'll definetly install the extras ;> :thumbsup: Quote Link to comment Share on other sites More sharing options...
suhy Posted February 20, 2009 Share Posted February 20, 2009 Hi All, Would like to know that, how do i prevent Auto Thumbnailer from resizing the spacer.gif at the size of 1px x 1px ... because it messy the theme design that used spacer image. i have tried following, // Don't calculate if the image is set to a "%" width if (strstr($width,'%') == false || strstr($height,'%') == false || strstr($width,'1') == false) { $dont_calculate = 0; } else { $dont_calculate = 1; } and even // Dont calculate if a pixel image is being passed (hope you dont have pixels for sale) if (!strstr($image, 'pixel') || (!strstr($image, 'spacer')) { $dont_calculate = 0; } else { $dont_calculate = 1; } Hi, anyone know how to solve this ? Thanks Hi, Anyone figured this out yet ? When I load the new html_outpout.php file my spacer.gif go 1px x 1px and also my backrgound gif is affected and my layout is completely messed .. Hope to solve this asap :) Thanks ! Quote Link to comment Share on other sites More sharing options...
suhy Posted February 20, 2009 Share Posted February 20, 2009 (edited) Is there a way to just turn off gif support maybe ? This would also solve problem probably ... Edited February 20, 2009 by suhy Quote Link to comment Share on other sites More sharing options...
suhy Posted February 20, 2009 Share Posted February 20, 2009 Hi All, Would like to know that, how do i prevent Auto Thumbnailer from resizing the spacer.gif at the size of 1px x 1px ... because it messy the theme design that used spacer image. i have tried following, // Don't calculate if the image is set to a "%" width if (strstr($width,'%') == false || strstr($height,'%') == false || strstr($width,'1') == false) { $dont_calculate = 0; } else { $dont_calculate = 1; } and even // Dont calculate if a pixel image is being passed (hope you dont have pixels for sale) if (!strstr($image, 'pixel') || (!strstr($image, 'spacer')) { $dont_calculate = 0; } else { $dont_calculate = 1; } Hi, Anyone figured this out yet ? When I load the new html_outpout.php file my spacer.gif go 1px x 1px and also my backrgound gif is affected and my layout is completely messed .. Hope to solve this asap :) Thanks ! Hi again :)) It seems I have found a solution to this ..... The following autothumbnailer doesnt have these issues with spacer.gif .... http://www.oscommerce.com/community/contributions,2872/ It works for me :)) Try it ! Quote Link to comment Share on other sites More sharing options...
loveleaf Posted March 11, 2009 Share Posted March 11, 2009 Hello Amigos, Everything with this contribution was working fine, but something must have changed.. When I click the image, nothing pops up. My server is not logging any errors. I've tried it on two computers so far. The site is http://www.rootworkherbs.com I'd really appreciate it if anyone could point me in the right direction to get this fixed. Thanks! Scott Quote Link to comment Share on other sites More sharing options...
Vano Posted April 20, 2009 Share Posted April 20, 2009 Hi. I got a problem with image resizing. Installation was without any problem. Contribution works fine. But when i upload an image with smaller size (than height and width in admin panel), i got original image with thick black borders. Hot to fix this? Maybe white borders? Is this bug of gd library? Quote Link to comment Share on other sites More sharing options...
Vano Posted April 20, 2009 Share Posted April 20, 2009 This problem with jpeg images. Quote Link to comment Share on other sites More sharing options...
tokyoracer Posted May 12, 2009 Share Posted May 12, 2009 Hi! Great contribution! :) I just installed it and it seems to be working very well. One problem: because I replaced the tep_image function, I lost some previous modifications I made in that function that allowed swf to be handled as an embedded image. Some of my products are small flash movies/games, and it was nice having them display on product info pages and in the specials, etc. (even though they were downsized in the stock OsCommerce method of "squish it down"). Is there a way to add back in some kind of code that says "if a file is swf, bypass thumbnail function and pass it through as an embed"? I really hope someone can help me with this. I've been fooling around with it, but each time I think i have it, I am rudely awakened! Thanks so much! Quote Link to comment Share on other sites More sharing options...
spooks Posted May 12, 2009 Share Posted May 12, 2009 what have u tried. I'd have thought a simple test such as if (strstr($src, '.swf')) return tep_image_original ($src, $alt, $width, $height, $params); would do. ;) Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
tokyoracer Posted May 13, 2009 Share Posted May 13, 2009 what have u tried. I'd have thought a simple test such as //// // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '', $swf = 'no') { if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { return false; } $extension = substr($src, -4); if ($extension == '.swf') $swf = 'yes'; // alt is added to the img tag even if it is null to prevent browsers from outputting // the image filename as default if ($swf == 'no') { $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"'; } else { $image = '<embed src="' . tep_output_string($src) . '"'; } if ((tep_not_null($alt)) && ($swf == 'no')) { $image .= ' title=" ' . tep_output_string($alt) . ' "'; } if (((CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height))) && ($swf=='no')) { 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)) && ($swf =='no')) $image .= ' ' . $parameters; $image .= '>'; return $image; } //// The OTF contribution replaced all that - and there is no reference at all to swf - although I thought I saw it mentioned in some of the earlier versions. Basically, I've been trying to integrate the bits of the old code that referenced swf into the new OTF code. I've also tried a few of the contributions that activate flash, but they are mainly for hard-coded embeds of swf on pages. They haven't had any effect on the product images. BTW, the flash files ARE being thumbed - i can see the "thumb" string in the URL - but they just aren't rendering - all I get is an empty box. :( Thanks for any ideas... Quote Link to comment Share on other sites More sharing options...
spooks Posted May 13, 2009 Share Posted May 13, 2009 sorry, I though u knew what u were doing!! put back your original function, renaming it to tep_image_original then put if (substr($src, -4) == '.swf') return tep_image_original ($src, $alt, $width, $height, $params); at the start of the new function Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
tokyoracer Posted May 13, 2009 Share Posted May 13, 2009 put back your original function, renaming it to tep_image_original then put if (substr($src, -4) == '.swf') return tep_image_original ($src, $alt, $width, $height, $params); at the start of the new function Oh got it!! That works a treat!! :) It never even occurred to me to use the whole original function in it's entirety. I had actually tried my hand at writing a new function tep_swf by stripping down the original function and escaping the new function - but I was really making a mess of it and more complicated than it needed to be. sorry, I though u knew what u were doing!! HA HA! There are those days when i think i do, but then there are days like today...... :blush: Hey spooks, thanks for taking the time to help me - I had already spent a day on this and was quite bleary-eyed, and if not for you I would be at it again today. My best to you - Quote Link to comment Share on other sites More sharing options...
tokyoracer Posted May 13, 2009 Share Posted May 13, 2009 sorry, I though u knew what u were doing!! put back your original function, renaming it to tep_image_original then put if (substr($src, -4) == '.swf') return tep_image_original ($src, $alt, $width, $height, $params); at the start of the new function Hmmmm, this is going to need a little tweak - The swf file "thumbs" are showing up just fine now, but on any pages that display them, i get a momentary flash of white and then the page loads. It seems as though ALL the images are getting parsed again. In Firefox, it only seems to occur on pages with swf - and in IE it happens on every page. So close and yet...yet.... Any thoughts? Thanks so much! Quote Link to comment Share on other sites More sharing options...
tokyoracer Posted May 13, 2009 Share Posted May 13, 2009 Hmmmm, this is going to need a little tweak - The swf file "thumbs" are showing up just fine now, but on any pages that display them, i get a momentary flash of white and then the page loads. It seems as though ALL the images are getting parsed again. In Firefox, it only seems to occur on pages with swf - and in IE it happens on every page. So close and yet...yet.... Any thoughts? Thanks so much! Methinks me has it! :lol: In the OTF tep_image function I removed the tidbit you originally suggested: if (substr($src, -4) == '.swf') return tep_image_original ($src, $alt, $width, $height, $params); moved it further down - to change this: // Scale the image if not the original size if ($image_size[0] != $width || $image_size[1] != $height) { $rx = $image_size[0] / $width; $ry = $image_size[1] / $height; if ($rx < $ry) { $width = intval($height / $ratio); } else { $height = intval($width * $ratio); } $image = '<img src="product_thumb.php?img=' . $src . '&w=' . tep_output_string($width) . '&h=' . tep_output_string($height) . '"'; } } elseif (IMAGE_REQUIRED == 'false') { return ''; } } to this: // Scale the image if not the original size if ($image_size[0] != $width || $image_size[1] != $height) { $rx = $image_size[0] / $width; $ry = $image_size[1] / $height; if ($rx < $ry) { $width = intval($height / $ratio); } else { $height = intval($width * $ratio); } if (substr($src, -4) == '.swf') $image = '<embed src="' . $src . '"'; } else { $image = '<img src="product_thumb.php?img=' . $src . '&w=' . tep_output_string($width) . '&h=' . tep_output_string($height) . '"'; } } elseif (IMAGE_REQUIRED == 'false') { return ''; } } Initial testing seems to show that it covers all the bases and I don't even need to use the tep_image_original! swf files seem to be resizing/displaying properly, regular images seem to be thumnailing properly, and there doesn't seem to be the white flash of blank page while the images reload. ~ Fingers crossed ~ Sam, I could have never done it without you giving me that snippet! Thanks a million! Now, I'm still having an issue with IE - it reloads the images on EVERY page and I don't think it has anything to do with the OTF Thumbnailer. I uploaded a stock html_output file and it behaves the same way. I guess that's for another thread. Thank you Sam again - I'll let you know if it blows up! Quote Link to comment Share on other sites More sharing options...
tokyoracer Posted May 13, 2009 Share Posted May 13, 2009 Methinks me has it! :lol: Aw, gee, I spoke too soon - once I cleared my cache the thumbnails ARE NOT displaying properly - ARGHHH!! I think I'm on the right track though - maybe switching the order.... Sam, your original idea worked just fine except for that "iimage reloading thing" OK, I'm gonna go drown my sorrows in a pint of ice cream and come back to this later..... As always, thanks for your time - Quote Link to comment Share on other sites More sharing options...
tokyoracer Posted May 13, 2009 Share Posted May 13, 2009 Aw, gee, I spoke too soon - once I cleared my cache the thumbnails ARE NOT displaying properly - ARGHHH!! I think I'm on the right track though - maybe switching the order.... Sam, your original idea worked just fine except for that "iimage reloading thing" OK, I'm gonna go drown my sorrows in a pint of ice cream and come back to this later..... As always, thanks for your time - Ok, I may be drunk with sugar but i think I may really have it this time - I ended up with this modification in the OTC tep_image function: // Scale the image if not the original size if ($image_size[0] != $width || $image_size[1] != $height) { $rx = $image_size[0] / $width; $ry = $image_size[1] / $height; if ($rx < $ry) { $width = intval($height / $ratio); } else { $height = intval($width * $ratio); } $image = '<img src="product_thumb.php?img=' . $src . '&w=' . tep_output_string($width) . '&h=' . tep_output_string($height) . '"'; if (substr($src, -4) == '.swf') $image = '<embed src="' . tep_output_string($src) . '"'; } } elseif (IMAGE_REQUIRED == 'false') { return ''; } } It seems to be working for now - I'll let ya know! :blink: Quote Link to comment Share on other sites More sharing options...
Guest Posted July 16, 2009 Share Posted July 16, 2009 Hi, all. I did an install of version 2.4 fix 4, and it works, but now when you click to enlarge the image you get the same image. I saw a post about this earlier, but no fix. Anyone know where the error is? Quote Link to comment Share on other sites More sharing options...
Guest Posted July 18, 2009 Share Posted July 18, 2009 Don't tell me this is a dead contribution? ANYONE? 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.