Thread: EZ thumbnails

Page 1 of 5 123 ... LastLast
Results 1 to 10 of 48
  1. #1
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default EZ thumbnails

    Since the Image Handler does *a lot* more than I need, I am writing a simple script that automaticly creates thumbnail images. Since I have some working sample code it's probably easy to do, but I was wondering if it hasn't been done before?

    I did a quick search, but did not find any other automatic thumbnail creation module (only IH2). Am I overlooking something maybe?

  2. #2
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default Re: EZ thumbnails

    Hi paulm,
    Nice news! I am also writing a simple image-thumbnail script based on Thumbnail class from teckis.
    But I have not enough time to issue it as the module.

  3. #3
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: EZ thumbnails

    Hi Andrew,

    nice to hear you had a similar idea.

    No problem that you do not have time, because I think I can finish (and release?) my first version today (could even do it now), as it already works.

    I am still working on it though to:

    1) test
    2) clean up code move settings to config files (maybe to database later)
    3) see if I can/should add any basic features
    4) add error handling
    5) decide where to store the thumbnails

    If to be released it also it would need some documentation (but on that part time is the issue for me too, writing docs in English ....)

    No core code changes will be needed for installation! (thanks to the hook the devs added to the 1.3.5 html_ouput file for image handlers :-) ).

    Currently my main concern is where to store the thumbnails, but on the other hand that is easy to change at any stage so maybe I should just pick a dir and see how it goes.

  4. #4
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default Re: EZ thumbnails

    I statically generate small and medium images in admin. And nothing changes in catalog scripts.

  5. #5
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: EZ thumbnails

    Ah, staticly, that is a totally different approach than my script.

    Mine works dynamicly. It even creates subdirectories in the images folder automaticly if needed (for images that reside in subdirectories of the images folder). Not 100% sure if this part works on all servers though, only tested it on my own server until now.

    If you, or anyone else, would like to test it I can e-mail my current version.

  6. #6
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: EZ thumbnails

    On request I attached the script to this post. Please keep in mind that this is an "alfa/WIP" release! No doc is included, try on a testshop first, review the code and use and own risk!

    Just copy the contents to your catalog dir, if needed chmod the thumnails/ dir so it's writable for the script, and see if it works. No code changes required for installation.

    To check if it really works browse your shop and right click on thumnails to view the properties and/or check if the thumbnails/ dir is being filled with thumbnails.
    Last edited by paulm; 8 Nov 2006 at 03:18 PM.

  7. #7
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: EZ thumbnails

    Oops, I added the required thumbnails/ dir just before I uploaded the script. Of course to the wrong location....

    I added includes/images/thumbnails/ while it should have been images/thumbnails/ (so it's just a subdir of the existing images dir).

    The zip below should have the folder at the right location....
    Last edited by paulm; 8 Nov 2006 at 03:18 PM.

  8. #8
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: EZ thumbnails

    Another oops. The package somehow contained an older version ....

    Note that if you have IH (Image Handler 2) installed it needs to be uninstalled first! I will add an if function exists probably, but until then having both install will result in an error.

    Corrected verion attached again.
    Last edited by paulm; 8 Nov 2006 at 03:19 PM.

  9. #9
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: EZ thumbnails

    I had an old IH version installed myself, and please be sure to remove all (catalog) IH files, and replace by the original Zen Cart files, since a lot of files are overwritten by the old IH version (no idea about the newer IH2).

  10. #10
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: EZ thumbnails

    New version. Probably/hopefully it's final (ftb, except for bug fixes) since it does everything I need myself for now

    1. Removed some debugging lines which I forgot to remove the previous version (some unused POST en SESSION vars).

    2. Added "Safe Mode" usage option, which is true by default. In "Safe Mode" subdirectories (like images/dvd/ for an image like images/dvd/a_bugs_life.gif) are not created automaticly, you need to create those yourself. Not really EZ... I know (the option to do this automaticly is still available though). If you never put your images in subdirs of the images/ dir, or after the subdirs are created, it will make no difference.

    3. Added a small readme.txt file which hopefully explains how it works.

    4. Modified the code so that no error message will show if subdirectories do not exist and can not be created. That way you can chmod the thumbnails dir at any time to make it unwritable, without the risk of error messages to be shown.

    5. Upgraded version number to 1.0
    Last edited by paulm; 27 Mar 2007 at 10:53 PM.

 

 
Page 1 of 5 123 ... LastLast

Similar Threads

  1. thumbnails issue..
    By deboud in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 28 Feb 2010, 12:41 PM
  2. Thumbnails
    By karazy in forum General Questions
    Replies: 5
    Last Post: 8 Jan 2010, 10:42 PM
  3. Thumbnails
    By UPromo in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 24 Oct 2007, 09:41 PM
  4. thumbnails
    By mipavluk in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 5 Aug 2007, 07:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg