Script: modified popup script using thumbnail images
All right. At long last, here's a modification of Ye Olde Popup Script as promised. I've had this lying around for months (ok, nearly a year) and just kept forgetting to post it. Hope it helps you.
What does this script do? It's a simple little PHP function. Include() or require() this function in the HTML for your site, and it will allow you to automatically create popups with thumbnail images as the link. (The other version of this script creates text links.) It pops up a clean little window that closes onBlur (meaning, when the user switches focus back to the main window).
Specifically, you feed it three (though, preferably, five) pieces of information:
- web path to larger image
- title for image window
- web path to thumbnail image
- width of larger image (optional but suggested)
- height of larger image (optional but suggested)
in a format like this:
<? thumbnail_popup('/misc/big_photo.jpg', 'Silly, silly felines', '/misc/big_photo_thumb.jpg', 240, 350); ?>
Why just the web path and not the full URL? Since PHP allows you to get the server name using $_SERVER['SERVER_NAME'], it seems a little silly to force people to type (and possibly screw up) something that PHP can always get right FOR them.
As always, the web paths and title should be encased in single or double quote marks.
The zip file with all the necessary code can be found here: popup_thumbnail.zip (2k .zip file)
My scripts are what I affectionately term bribeware. If you're looking for changes or mods, a token amount of bribery does wonders for my availability and interest, especially if you don't know me.

- reply
- reply
- reply
- reply
- reply
- reply


