Web Hosting Forums

Results 1 to 9 of 9

This is a discussion on Looking to show thumbnails in the Hosting Talk & Chit-chat forum
I thought I saw on this forum, along time ago, someone wanting to display thumbnails of all images in a given directory. I also vaguely ...

  1. #1
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,503

    Looking to show thumbnails

    I thought I saw on this forum, along time ago, someone wanting to display thumbnails of all images in a given directory.

    I also vaguely recall someone supplying a solution.

    I am aware there are fancy image galleries and Coppermine, but tight now I just want someone to be able to point their browser to an image directory, and see thumbnails.

    Anybody know how to do this?

    Thanks!
    -Ron.

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    5,884
    Ron,

    Are you looking for an automated solution where the thumbnails are generated on the fly each time a page is loaded, or would you prefer to premake the images and display them on a static page? If the latter, I use a program called Easy Thumbnails to do something similar. It is a freeware Windows program that can create thumbnails of all of the images in a folder automatically. You can get it at http://www.fookes.com/ezthumbs/index.php.

    You can then put together a page with all of the images on it, or if you want, I'll give you my basic gallery script that will build the page for you automatically.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  3. #3
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,503
    Thanks Jason,
    I wound up writing one that generates the images on the fly... it's probably brutal on the webserver for a few moments, but what the heck.

    The code that generates the thumbs I finally found here: http://www.websitedatabases.com/php-...scripts/thumb/

    Then I coded a page that wlaks my image directories and puts out the thumbs, labelled and linked to the originals. Not the worlds tightest code, but I built it quick-and-dirty for a single use operation. Maybe someday I'll reqork it into another coppermine.

    Thanks for the offer! If ya wanna see what I wrote for S&Gs let me know.

  4. #4
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    5,884
    I started writing the same kind of thing right before I had to leave for class tonight. I just asbout had it working, but I was getting an endless loop somewhere that I didn't have time to investigate. I'd actually be curious to see yours to see how it compares to mine.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  5. #5
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,661
    LoL!! Why don't you just use Coppermine or Menalto?
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL 2010

  6. #6
    Loyal Client
    Join Date
    Sep 2002
    Posts
    640
    Quote Originally Posted by Ron
    Thanks Jason,
    I wound up writing one that generates the images on the fly... it's probably brutal on the webserver for a few moments, but what the heck.
    Here is a quick fix:
    1. use mod_rewrite to access the images with something like: tn-IMAGE.jpg and rewtite it to call the script only if such file doesn't exist.
    2. Add the following line just after imageJPEG($sm_image); :
    Code:
    imageJPEG($sm_image,'tn-' . $im);
    This assumes, of course, that image parameter doesn't contain path.

  7. #7
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,503
    What problem are you trying to solve with the use of mod-rewrite and such?

    I need to create a webpage displaying thumbnails of all the images in the directory. There are currently almost no thumbnails in the directory now. If there were lots of thumbnails stored there, I would just write a quick program to display them.

    How does your suggestion help this? I'm all ears/eyes!

  8. #8
    Loyal Client
    Join Date
    Sep 2002
    Posts
    640
    I was addressing "it's probably brutal on the webserver" part.
    If image is created only once and the following requests just use already existing image, that's not so brutal on the webserver

  9. #9
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,503
    Ah! That's true... thanks.

    I was just needing to show someone a list of pics available... I really didn't wanna store multiple megabytes (really!) of thumbnails, and didn't want to install megabytes worth of a bloated image manager and create a database and all that, either.

    I had just recalled that someone had posted a script to do exactly what I wanted, but I couldn't find it... so I wrote it, "borrowing" the guts (the thumbnail generation routine) from the web.

    Thanks again!

Bookmarks

Posting Permissions

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