Jump to content
mloeffen

'On The Fly' Auto Thumbnailer using GD Library 2.1

Recommended Posts

nagging issue on the admin side of this contrib:

 

frontend is working great, but only the thumbs are working in the backend? i broke all my other image links (oscommerce logo, top nav images, etc).

 

here's the 404s i'm getting:

 

http://www.daplummah.com/catalog/admin/DIR...Soscommerce.gif

http://daplummah.com/catalog/admin/DIR_WS_...nfiguration.gif

http://www.daplummah.com/catalog/admin/DIR...der_support.gif

 

etc.

 

catalog/admin/includes/configure.php (23-25):

  define('DIR_WS_CATALOG_IMAGES', '../images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

 

thanks for looking.

Share this post


Link to post
Share on other sites
nagging issue on the admin side of this contrib:

 

frontend is working great, but only the thumbs are working in the backend? i broke all my other image links (oscommerce logo, top nav images, etc).

 

here's the 404s i'm getting:

 

http://www.daplummah.com/catalog/admin/DIR...Soscommerce.gif

http://daplummah.com/catalog/admin/DIR_WS_...nfiguration.gif

http://www.daplummah.com/catalog/admin/DIR...der_support.gif

 

etc.

 

catalog/admin/includes/configure.php (23-25):

  define('DIR_WS_CATALOG_IMAGES', '../images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

 

thanks for looking.

 

Are you defining:

  
 define('DIR_WS_IMAGES', 'images/'); 

?

Share this post


Link to post
Share on other sites
Are you defining:

  
 define('DIR_WS_IMAGES', 'images/'); 

?

i certainly was not, that's got it, thanks much.

Share this post


Link to post
Share on other sites
i certainly was not, that's got it, thanks much.

 

Anytime... glad it worked..

Now if someone would help me out with my question a few posts above, that would be fantastic :)

Share this post


Link to post
Share on other sites
I searched the thread but couldn't unearth how to do what I need. Unless I'm overlooking some setting or post somewhere.

My problem is this:

My site has HUGE images that I'm scaling down with this contribution.

And the contribution works great, it creates the thumbnail that people can click to make larger.

The problem stems when they make it larger.

The large images are 1700 x 1280 and are still a bit big at that size for the "Click to enlarge" version.

I need an intermediate size that would show up when clicked to be enlarged, that can still be clicked one step further to become the massive size if one wishes to see the detail that much more.

Then clicked again to become intermediate, clicked again to become massive, so on and so forth, or x'd to close the popup.

 

Would someone be kind enough to help me out or point me in the right direction?

Thanks in advance.

What you describe is not possible with the contrib in it's current state. You would need to add the functionality yourself or bribe/convince someone else to do it for you.

 

You could use a batch image tool to resize the images to your intermediate size and then provide a link to the full sized image in the description.

Share this post


Link to post
Share on other sites
What you describe is not possible with the contrib in it's current state. You would need to add the functionality yourself or bribe/convince someone else to do it for you.

 

You could use a batch image tool to resize the images to your intermediate size and then provide a link to the full sized image in the description.

 

Thanks for that psynaptic.

Yes, I realize that it's not a current functionality.

I remember seeing something about multipliers as one of the bonus features in the readme, but that has nothing to to with what I need from what I remember.

Maybe someone will take my idea or if they have the same problem they will code it in for a future release.

I think I'll just batch resize the images and overwrite my existing huge ones with them. Either that or rename the scaled down ones, update my db with the new locations, then link to the old huge ones from the description like you suggest.

Share this post


Link to post
Share on other sites
Anytime... glad it worked..

Now if someone would help me out with my question a few posts above, that would be fantastic :)

 

That could fantastic for me too with this 304 error... :rolleyes:

Share this post


Link to post
Share on other sites
That could fantastic for me too with this 304 error... :rolleyes:

Hang in there... maybe someone who knows the problem will help you.

Share this post


Link to post
Share on other sites

New version posted. A small adjustment to one file to address a security and server resource concern.

Edited by homewetbar

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites

Sorry... to clarify on my panicy post earlier. I have switched back to the standard thumbnails while I try and sort this out. Everything about the On The Fly seemed to work. Except the fact that the generated images were pixelated beyond recognition. When I checked the size of the thumbnails they were the required size, just mega pixalated. This is an awsome feature, and one that I realy want to use. So any help would be realy apreciated.

 

Cheers

 

Brian

Share this post


Link to post
Share on other sites

hello,

 

I am really about to start pulling my hair out. I have been working on this contribution for days. At first I got it to work on my localserver on my computer. Then when I uploaded it to the my webhost I started getting problems. I am getting problems in two different scenerios.

 

First on my host I cant get the Thumbnails to display. I think I installed everything correctly. Im sure I did. But like many other people on here the thumbnails are all broken. When I click on the images and get to the popup the image displays correctly. I look into the folders and do not see any images though. I have made all the following folders just incase they will display in one of them.

 

I made thumbnails/images & images/thumbnails. Both of which I have read that on the forms you should have. Unfortunately none of the thumbnails are in the files.

 

 

I read also on this Post (i think this one) that if you take the admin/includes/functions/html_output.php and copy it to includes/functions/ that that will solve the problem. Ironically it solved the problem when i was having difficulty installing on my localserver but it causes an error on my webhost. I get this error:

 

Fatal error: Call to undefined function tep_hide_session_id() in Path/etc/boxes/search.php on line 35

 

The search box is the first box I have on the left column.

 

Please if you could help me out I would really appreciate it. This is one of the final step I have in getting this site done.

Share this post


Link to post
Share on other sites

Hello,

 

I installed your contribution.

 

It work great for the catalog but in the admin scetion it always give me the no_image.jpg

 

And also, in the catalog the thumbnails are not uploaded in the thumbnails directory they are uploaded in the image directory.

 

Can you help me please?

 

Thanks!

Share this post


Link to post
Share on other sites

Hello everyone,

 

I have installed More Pics 6 and tried to install the Auto thumbnailer but without success.

I think it has something to do with the mo pics contribution because the whole website gets thorn apart.

 

All pictures show as 'no image' and if i click on them they pop up the right image.

 

Please help.

 

Regards,

 

Desiree

Share this post


Link to post
Share on other sites

Thanks a lot for this contribution. It works for me, however I do have a couple of questions:

 

1. Each image resizes with a significant delay. Is there a way to speed this up?

2. I'm using a separate folder for thumbs. Can they be put there with their original name, i.e. "name.jpg" rather than "name.jpg.thumb_sizexsize.jpg"?

Share this post


Link to post
Share on other sites

Hi

 

I have the contribution working producing the thumbnails as required

 

However a couple of buttons are not appearing and the following appear

 

Fatal error: Call to undefined function tep_image_submit() in C:\Server\htdocs\catalog\contact_us.php on line 154

 

and

 

Fatal error: Call to undefined function tep_image_submit() in C:\Server\htdocs\catalog\login.php on line 213

 

There is an update dated the 8th September, but there does not appear to be anything attached (or am I wrong)

 

Would like to fix these problems so I can get online

 

Regards

Ray

Share this post


Link to post
Share on other sites

Hello,

 

I've installed this contribution, it's great, works perfectly...

But I have one small problem...

In picture box, next to the picture is blank spase that colors black... I want it to colors white... I allready tryed settings (255,255,255) in the administrator but it dosen't change anything...

Take a look here http://www.novodom.si/index.php

 

I hope someone will have a solution for my problem..

 

Best regards,

David

Share this post


Link to post
Share on other sites

Hi,

I've installed and tested OTF Thumbnails 2.3a on my local servers with no issues. It's a great contribution!

When I moved my site to my production server (off-site) all the product_thumb.php displayed images broke.

Everything else works fine on the site with one exception. The Admin side works fine.

Reading this thread I see it's a recurring issue but I can find no definitive solutions or even identification of the root problem. (If I've missed it please direct me :blush: )

I have checked the obvious:

  • the gd lib is installed and tested with gdtest.php
  • Files and directories are migrated using scp -r ; copied to application root with cp -r
  • I've verified includes/configure.php per instructions:
    • define('DIR_WS_HTTP_CATALOG', '/');
    • define('DIR_WS_HTTP_CATALOG', '/');
    • define('DIR_WS_IMAGES', 'images/');

  • I assume all the edits, copies, and DB changes are correct because it works in two environments.
  • I do an export and import of the entire DB to migrate.
  • Image file and directory permissions are set to rwxr--r-- and rwxrwxrwx respectively; all *.php files are rwx.r--r--.
  • product_thumb.php is in application root (catalog/ on default installs)
  • .htaccess has a "RewriteBase /" - All my other URL work and if I change it everything else breaks.
  • (I've also said all the magic words and incantations that I know)

When I bring up the migrated site (yulemshop.com) all images that are product_thumb.php calls are broken. Those calls look like this:

CODEhttp://yulemshop.com/product_thumb.php?img=images/Lighter%20Knot-2.jpg&w=125&h=93

 

I have verified the following:

  • the call fails with filenames containing the %20 (space) and without the space
  • the image file exists and is readable in the location indicated by the call
  • if I paste the above string into a browser the string is displayed, not the image
  • it fails in Firefox and IE; in Lynx it looks fine because it doesn't display images
  • Below are some differences between my Dev and Prod PHP environments. Not being a PHP dev they mean little to me but maybe they will be a clue to others more knowledgeable:

Setting---------------------Dev-------Prod

PHP Version--------------------5.1.6------5.2.1

Zend Engine--------------------v2.1.0----v2.2.0

Registered PHP Streams----compress.bzip2--(no bzip2)

allow_call_time_pass_reference--Off--------on

allow_url_include----------------(none)----Off

extension_dir------------------(both different)

include_path-------------------(both different)

magic_quotes_gpc--------------off--------on

register_argc_argv--------------off--------on

Things I can't verify or change are:

  • File and directory ownership-all files and directories are owned by my user, not "apache"; same is true for group. I'm working with my hosting service to test this.
  • Is the version of gd critical?

I've run out of places to look and I need your help, please.

Maybe we can make this the definitve post for solving broken image issues!

Thanks,

Ralph

PS-I first posted this a level up, sorry!

Share this post


Link to post
Share on other sites

This is an update to my previous post:

The images are being displayed now. Yeah! What I did only makes half sense.

  • First I copied all the thumbnails in ./images/thumbnails into ./images.
    • This solved nothing.

    [*]Next I changes permisions on all image files to 777

    • With that change some of my images returned.

    [*]Next I removed the thumbnails files in ./images

    • Nothing changed

    [*]Next I reset the permisions for the thumbnails in ./images/thumbnails to 744

    • Nothing changed, I could still see the images.

It seems that simply "touching" these files did something (but I had "touched" them before with no effect??)

 

I did discover that the files with a space in their name continued to fail. I changed the name and uploaded the same file with a new name. They then worked. A few interesting things about these thumbnails

  • "apache" owns these thumbnails.
  • apache also owns the previous thumbnails created from the filenames with spaces; both exist but one displays. That would make me think it's not an issue with OTF.

It's hard to know if something is working when say I change the permissions since there are several caches at work and I can only flush one of them. Caching was turned off in OSC and I did flush my browser cache.

 

There does seem to be an issue with image filenames that contain space. I thought this was addressed in 2.3a but maybe not.

Ralph

Share this post


Link to post
Share on other sites
Thanks for that psynaptic.

Yes, I realize that it's not a current functionality.

I remember seeing something about multipliers as one of the bonus features in the readme, but that has nothing to to with what I need from what I remember.

Maybe someone will take my idea or if they have the same problem they will code it in for a future release.

I think I'll just batch resize the images and overwrite my existing huge ones with them. Either that or rename the scaled down ones, update my db with the new locations, then link to the old huge ones from the description like you suggest.

 

I just echo'd this line in my enlarged_view.php file:

tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name'], 450)

 

The "450" is the image width. Let me know if you need more instruction.

Share this post


Link to post
Share on other sites

Hi there,

 

I checked today this Contrib and it's great!! First I tested Ultra Pics, but the pictures were horrible! Ok I figured out that you can use both OTF-AutoThumb and Ultra Pics together. Than you have the ability to have seperate the pictures for the Popup-Window, Product-Page and Product-Listing. Also you can use additional Pictures AND you have the high quallity Thumbnail abillity from OTF-A.T.

 

But that's not my question. I just search a way to make OTF-A.T. multilanguage able. At the moment you install the descriptions and titles (for exampe for Picture Width) via SQL. But is there also a way to do it the right way? To install via SQL placeholders and to define them in the language files (for example english.php, german.php and so on)?

 

Thanks

Share this post


Link to post
Share on other sites
I just echo'd this line in my enlarged_view.php file:

tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name'], 450)

 

The "450" is the image width. Let me know if you need more instruction.

 

Brilliant!

It's in popup_image.php in my installation.

It's a brilliant solution, but it distorts many of the pictures as the scale is thrown off.

My site(s) use various sizes of images for the products, its too varied to be able to say that 450 will work for all of them.

Especially since the height and width are not kept with constrained proportions by doing this.

Edited by MediaHound

Share this post


Link to post
Share on other sites

Hi,

 

I installed OTF 2.3a on a heavily modded shop version 2.2 RC1 (STS, HTC, EZ, Ultrapics, purchase without account, and some other contribs). I installed the mod "remove default images" which worked fine on a clean shop, but now I have a red cross on those transparent images. I have tried to set "allow larger" to true, "show original" to true and in the images section the "image required" to false. Nothing works. Plus combinations of all 3. Additionally I have also deleted the images I don't want to see. When I do the last action, I get a "no image" button. What is the solution to this problem?

 

TIA

Gina

Edited by chemjul2005

Share this post


Link to post
Share on other sites
Hi,

 

I installed OTF 2.3a on a heavily modded shop version 2.2 RC1 (STS, HTC, EZ, Ultrapics, purchase without account, and some other contribs). I installed the mod "remove default images" which worked fine on a clean shop, but now I have a red cross on those transparent images. I have tried to set "allow larger" to true, "show original" to true and in the images section the "image required" to false. Nothing works. Plus combinations of all 3. Additionally I have also deleted the images I don't want to see. When I do the last action, I get a "no image" button. What is the solution to this problem?

 

TIA

Gina

 

 

Same problem. I also installed the "remove default images" add on. Probably going to have to completely remove the images manually to fix it.

Also, I change the images from transparent to non-transparent and I still get broken images. I don't think anyone can help me though :)

Edited by Kuujiryo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×