httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Meadors <clubn...@hereintown.net>
Subject [users@httpd] Handler for images in a directory.
Date Tue, 04 Mar 2003 00:04:41 GMT
I was helping a guy with a site who has about 400 images in one 
directory.  He already has links that tigger a pop-up window that 
displays each of the images from various locations on his site.  The 
Javascrip pop-up hides the menu bar, tool buttons, and address bar.  But 
he was worried that people could still easily see the location in the 
title bar of the window, and they could right click the image to save 
it.  (I know these are all just little things, and if an image is 
servered it can be saved, but he would make him happy to stop the right 
clicks.)

So I added a handler that calls a CGI script to wrap the image in HTML 
with a simple title and some more Java script to disable to right clicks.

The program is, this wrapper has still has to load the image.  Sure I 
can get the REQUEST_URL, but if I just set that as the img src, it'll 
just trigger the handler again.

So I whipped up a second CGI scipt that can be passed a URI and will 
fetch the file off the drive directly, and basicly cat it with the right 
Content-type header.

This was just a 5 minute thought that I threw together.  I was wondering 
if anyone has any pointers to other ways this has been done?

Thanks.

-- 
Chris


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message