scriptygoddess

04 Feb, 2003

Entry popups with thumbnails using PHP

Posted by: amy In: Scripts

Ages and ages ago, I used Lynda's code as a springboard to create a little PHP popup script. It had one limitation: you couldn't use it with photo thumbnails, because of how I'd coded it.

Many months ago, someone asked for a version of the code that would base the popup link around a thumbnail. I wrote it up, stashed it on my hard drive, and totally forgot about it.

The short version is that it's called like this:

<? thumbnail_popup('/misc/big_photo.jpg', 'Silly, silly felines', '/misc/big_photo_thumb.jpg', 240, 350); ?>

where …

'/misc/big_photo.jpg' is the web path to the larger image,
'Silly, silly felines' is the alt tag and title of the popup window,
'/misc/big_photo_thumb.jpg' is the web path to the thumbnail image,
240 is the width of the larger image (optional), and
350 is the height of the larger image (also optional).

I'm vacationing with my spouse on the East Coast at the moment, so I don't have access to all my usual stuff. I posted a bit more in-depth directions on my site. (You can also just download the code – there's a readme file enclosed with it.) I figured it'd be better to share the code, even in this abbreviated form, rather than forget about it for another six months.

No Responses to "Entry popups with thumbnails using PHP"

Comments are closed.

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements