Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

'On The Fly' Auto Thumbnailer using GD Library 2.1


mloeffen

Recommended Posts

  • Replies 556
  • Created
  • Last Reply

Top Posters In This Topic

Rich,

 

Thank you, and I got your pm.

I got 1 quick question about this step?

Step #8 - Admin image size settings

Note: Before you change the settings, write down the current values so you can restore them in case of an error!

 

Go to the admin section of your store (Configuration -> My Store -> Images) and set:

 

all image width and height values to a value greater than zero

calculate image sizes to true.

 

What do you set them too?

Try setting the image values to something higher than they are, set Allow Larger to true and switch Show Original off. This will up-sample your images. They will look terrible but at least we'll find out if it's working properly.

Link to comment
Share on other sites

I'm lost as well. I've went back over the readme.html file several times with no luck.

Can you please be a little bit more specific?

Link to comment
Share on other sites

Hello Rich,

 

 

Just wanted to update you. I tried everything you ask, with the same result...RED X's (even did another clean install). I did a little research, and installed version 1.5. The install went well with no problems. It is up and running, I even added some multiplyers to up the second image. Went well. I'm just going to run this version (1.5). If anyone figures out 2.2, BE SURE TO POST IT HERE.

 

 

Rich (MY HERO), Once again THANK YOU, for all your help. :rolleyes:

 

 

Kevin B)

Link to comment
Share on other sites

Hello Rich,

Just wanted to update you. I tried everything you ask, with the same result...RED X's (even did another clean install). I did a little research, and installed version 1.5. The install went well with no problems. It is up and running, I even added some multiplyers to up the second image. Went well. I'm just going to run this version (1.5). If anyone figures out 2.2, BE SURE TO POST IT HERE.

Rich (MY HERO), Once again THANK YOU, for all your help. :rolleyes:

Kevin B)

Did my last suggestion make the default images larger? Did they appear properly?

 

I'm sorry you didn't manage to get version 2.2 working.

Link to comment
Share on other sites

No, I't didn't make any changes at all.

That indicates that something was wrong with your setup.

 

I advise you to use a local development server for building and testing your osCommerce. I use xampp which I highly recommend for a simple setup.

 

Also, to take the pain out of troubleshooting, testing and building I advise you to make regular backups so you can get quickly back to a specific point in the past.

Link to comment
Share on other sites

Just keep on trying different things. This is all one can do unless you already know what the problem is. Try to be methodical; work through the problem logically. It's usually something very simple and often quite silly!

 

The weird thing is that it actually works for the default images.

Edited by psynaptic
Link to comment
Share on other sites

Hi,

 

I went through some of the thread but couldn't find a solution.

 

I installed the contribution, but after that it won't show any thumbnails, I can only see the real images if I click on the broken image. It does generate the thumbnails in the images catalog though.

 

This is what the source shows:

<img src="product_thumb.php?img=images/MYimage.jpg&w=100&h=75" width="100" height="75" hspace="5" vspace="5" border="0"....

And the thumbnail in the images catalog is MYimage.jpg.thumb_100x75.jpg

 

I have register globals contribution installed.

 

Any suggestions?

Link to comment
Share on other sites

I installed this contributions v2.2 yesterday and had the problem where it wasn't creating the thumbnails in my store. It was creating them in the admin section but not in the store. I tried all the suggestions and nothing worked. oscommerce is installed in the root folder.

 

Well I finally got everything working great today and here's what I did:

 

There are two versions of the Product_Thum.php file, one for the admin and one for the catalog.

 

What I did is install the one for the admin section to both the admin and catalog and that's it!

 

I've checked it on several different computers, all work great. The thumbnails are being created in the thumbnails/ directory.

 

My only question is, do I have to manually empty that thumbnails/ folder periodically or will it be done automatically? I don't want to keep inflating the size of my server.

 

I really hope this helps.

 

Viz

Link to comment
Share on other sites

I installed this contributions v2.2 yesterday and had the problem where it wasn't creating the thumbnails in my store. It was creating them in the admin section but not in the store. I tried all the suggestions and nothing worked. oscommerce is installed in the root folder.

 

Well I finally got everything working great today and here's what I did:

 

There are two versions of the Product_Thum.php file, one for the admin and one for the catalog.

 

What I did is install the one for the admin section to both the admin and catalog and that's it!

 

I've checked it on several different computers, all work great. The thumbnails are being created in the thumbnails/ directory.

 

My only question is, do I have to manually empty that thumbnails/ folder periodically or will it be done automatically? I don't want to keep inflating the size of my server.

 

I really hope this helps.

 

Viz

I'm glad to hear someone actually managed to get it working. I was beginning to worry unnecessarily.

 

Once a thumbnail is created it will not make another unless you change the size of your images or the images themselves. I wouldn't worry about the size issue as the thumbnails are compressed, smaller versions of your main images and won't make a significant difference. If you do want to keep an eye on things and be able to flush the thumbnails easily I would suggest adding a path value to the admin ('thumbnails/' without quotes is recommended). Remember that if you have your images in sub-directories within images/ you will need to mirror the structure in thumbnails/.

 

Thanks for letting me know you got it working.

 

Aside: I think those SQL errors are caused by not encapsulating the table names in quotes such as INSERT INTO 'configuration' WHERE… rather than INSERT INTO configuration WHERE…. If anyone knows please chime in.

Link to comment
Share on other sites

Hi,

 

I went through some of the thread but couldn't find a solution.

 

I installed the contribution, but after that it won't show any thumbnails, I can only see the real images if I click on the broken image. It does generate the thumbnails in the images catalog though.

 

This is what the source shows:

<img src="product_thumb.php?img=images/MYimage.jpg&w=100&h=75" width="100" height="75" hspace="5" vspace="5" border="0"....

And the thumbnail in the images catalog is MYimage.jpg.thumb_100x75.jpg

 

I have register globals contribution installed.

 

Any suggestions?

I have not installed register globals contribution yet and I'm not sure if this would cause your symptoms.

 

Try setting your filenames to lowercase. I don't know if it will make a difference but it's worth a shot.

Link to comment
Share on other sites

I have not installed register globals contribution yet and I'm not sure if this would cause your symptoms.

 

Try setting your filenames to lowercase. I don't know if it will make a difference but it's worth a shot.

I changed the filename only to contain letters and numbers - it didn't help. I even tried setting $tn_server_cache = false; , but that didn't help also...

Link to comment
Share on other sites

I even tried setting $tn_server_cache = false; , but that didn't help also...

Set server and browser cache to false. This will help while you troubleshoot the problem; for every page refresh it will generate new images.

Link to comment
Share on other sites

I installed this contributions v2.2 yesterday and had the problem where it wasn't creating the thumbnails in my store. It was creating them in the admin section but not in the store. I tried all the suggestions and nothing worked. oscommerce is installed in the root folder.

 

Well I finally got everything working great today and here's what I did:

 

There are two versions of the Product_Thum.php file, one for the admin and one for the catalog.

 

What I did is install the one for the admin section to both the admin and catalog and that's it!

 

NICE!! That fixed mine as well. That's AWESOME!!

Link to comment
Share on other sites

Set server and browser cache to false. This will help while you troubleshoot the problem; for every page refresh it will generate new images.

I tried some, but ran out of ideas...

If anyone has found a fix for a similar problem, that generated thumbnails aren't shown, please let me know :)

Link to comment
Share on other sites

I tried some, but ran out of ideas...

If anyone has found a fix for a similar problem, that generated thumbnails aren't shown, please let me know :)

Did you set images/ and all sub-dirs to chmod 777?

Did you make sure you used the correct product_thumbs.php?

Did you run the .sql on your database?

Did you check your catalog/includes/configure.php file has the correct settings?

Link to comment
Share on other sites

I installed this contributions v2.2 yesterday and had the problem where it wasn't creating the thumbnails in my store. It was creating them in the admin section but not in the store. I tried all the suggestions and nothing worked. oscommerce is installed in the root folder.

 

Well I finally got everything working great today and here's what I did:

 

There are two versions of the Product_Thum.php file, one for the admin and one for the catalog.

 

What I did is install the one for the admin section to both the admin and catalog and that's it!

 

I've checked it on several different computers, all work great. The thumbnails are being created in the thumbnails/ directory.

 

My only question is, do I have to manually empty that thumbnails/ folder periodically or will it be done automatically? I don't want to keep inflating the size of my server.

 

I really hope this helps.

 

Glad to see its working! lol, I think I tried every thing under the sun, But that! It pays to think out side the box. Good Job.

Link to comment
Share on other sites

Hi All,

 

I have tried installing this contribution, 3 times.

 

Each time, everything seems to work smoothly, however, I cannot see the thumbnail images at all.

There is just a dead image where the thumbnail should be.

I have gone over everything many times, double checked.

 

Reading over a little of the forum, I beleive I'm not the only one with this sort of problem.

 

Has anyone found a soultion yet?

 

Any help would be much appreciated.

 

Thanks,

 

Matt

Link to comment
Share on other sites

Hi All,

 

I have tried installing this contribution, 3 times.

 

Each time, everything seems to work smoothly, however, I cannot see the thumbnail images at all.

There is just a dead image where the thumbnail should be.

I have gone over everything many times, double checked.

 

Reading over a little of the forum, I beleive I'm not the only one with this sort of problem.

 

Has anyone found a soultion yet?

 

Any help would be much appreciated.

 

Thanks,

 

Matt

 

Read the post abouve yours. That has been the only fix post.

Link to comment
Share on other sites

Hi All,

 

I have tried installing this contribution, 3 times.

 

Each time, everything seems to work smoothly, however, I cannot see the thumbnail images at all.

There is just a dead image where the thumbnail should be.

I have gone over everything many times, double checked.

 

Reading over a little of the forum, I beleive I'm not the only one with this sort of problem.

 

Has anyone found a soultion yet?

 

Any help would be much appreciated.

 

Thanks,

 

Matt

I have gone over the install a number of times and it works perfectly every time.

 

Common stumbling blocks are mentioned above. There may be more that I've missed so please forgive me if there are.

Link to comment
Share on other sites

Did you set images/ and all sub-dirs to chmod 777?

Did you make sure you used the correct product_thumbs.php?

Did you run the .sql on your database?

Did you check your catalog/includes/configure.php file has the correct settings?

I am quite sure I did all that right, I'll check it all later again.

 

Has anyone ever run this contribution with the Register globals contribution?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...