Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Thumbnails + Subfolders


voided

Recommended Posts

Hey guys, i have to move servers soon and i noticed that not all servers (shared hosting) have the option to have more then 2000 files in one directory so my first task is to have image sub folders which i have done thanks to this contrib : http://addons.oscommerce.com/info/3873 .

 

the problem is... and correct me if i'm wrong, that none of the thumbnails contrib actually work with these sub folders? I'm still trying out a few today to see if one of them will work (maybe i missed something)

 

so what i'm trying to have is :

 

1)more pics with sub folders

2)auto thumbnailer & caching system

3)watermarks (if possible or else i'll do it manually)

 

any tips are welcomed, thanks :)

Designrfix.com | Graphic Design Inspiration & Web Design Resources - @designrfix
Link to comment
Share on other sites

I have been using Image Subdirectories 2.0 for some time now. But I create my own thumbnails since most auto thumbnailer contributions only resize the viewed image width and height, not the actual file size. I like being able to have quick loading thumbnails and actually, two different product images - (example, then click on a product). I realize it's extra work, but to me it's kind of fun anyway.

 

I used and altered this contribution for the big images - Big Images Modification v1.25.

 

It might not be "exactly" what you're looking for, but it's worth checking out. ;)

 

Good luck!

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

...the problem is...

as far as i can see, the problem is, instead, how many site owners would fancy upadting the image path for each product when they have thousands of products already entered in the db? so, i would imagine the subfolder approach is not the way to go for many existing websites. the way i do it is:

 

1. create all the subfolders and then upload/FTP the images to the different subfolders (the remove/delete them under images/);

 

2. modify the image function to tell it where or which subfolder to find the image. no manual updating the image path in the db is needed for old/existing products or new products;

 

3. since new product images would still be uploaded to the images/ folder (no change to the categories.php), you may want to write a script to periodically to clean up the images folder and remove new product images to their appropriate subfolder.

 

No change to the thumbnail cache function is needed.

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

ken, nah it works perfectly, i updated thousands of products with 1 sql line:

 

update products set `products_image` = CONCAT('mybrand/', `products_image`) where manufacturers_id = x;

 

i got everything to work with the sub folder mod and an older version of 'On the Fly' Auto Thumbnailer using GD Library - (2.1.0 new feature: optional sub-directory for cached thumbnails)

 

my last problem is caching... i need to update the caching system for the thumbailer. i guess i'm almost there... if all else fails i'll need to find a host that has no file restriction per dir.

 

(anyone know if hostgator or yahoo biz. has these?) :)

Designrfix.com | Graphic Design Inspiration & Web Design Resources - @designrfix
Link to comment
Share on other sites

ken, nah it works perfectly, i updated thousands of products with 1 sql line...

 

well, i guess you are the owner of the site so you know perfectly well whats what and where, ie, after updating the db, eg, you know which image should go where. ortherwise updating the db is a risky business whne it somes to 10s of thousands products, and I would not take such a risk.

 

imo, there is no problem with the imagecache folder however many images there are. The 2000 file limit is the limit to SEE/LIST under one folder, NOT the limit to have the number of files under it, ie, you can have 10 thousands files under the images folder but you can only see 2000 of them including subfolders and the chances are you can not see the subfolders which is annoying.

 

There is at least one host i know of that does not have this 2000 limit problem, they run servers in both the states and the UK but i dont think i can post the name/link here.

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...