Sure! The Zenphoto Admin console gives the opportunity to add a title and description to any image. The description facilitates the use of links. So in my example in addition to some usual text describing the photo, I end it off with:
[code]
If you like this click here
[/code]
Remember the "Description" text is there when you view the large image, having clicked the thumbnail. And if you look closely in the url bar, there are several variable:vlaue pairs. I have noticed two variables,
[list]
[*]the name of the album
[*]the name of the image
[/list]
The above holds true if you're using the default theme by Joen Asmussen and Levi Buzolic. Whenever you click on a thumbnail the url in the address bar looks like this:
[code]
http://www.mysite.com/gallery/index.php?album=biking&image=DSC01920.JPG
[/code]
In some other galleries using a different theme it looks like this:
[code]
http://www.zenphoto.org/zenphoto/impressionists/Monet+-+Water+Lillies+-+les+nuages.jpg.php
[/code]
It really doesn't matter. What ever page your link is pointing to, once its using php you can have this on the page:
[code]
/*
This example works for this url:
http://www.mysite.com/gallery/index.php?album=biking&image=DSC01920.JPG
*/
$original_url = $_SERVER['HTTP_REFERER'];
$picture = explode('=', $original_url);
echo $picture[2];
[/code]
Use another "explode" to separate the '.jpg' from the name of the image. In your own example, you will need to go through your array indexes ($picture[0],$picture[1]..etc) to see which one gives your image name. From there you can then assign that value to one of your form values:
[code]
<input type="text" name="picture_chosen" value="<?php $$picture[2];?>" />
[/code]
Thus when submitting the form the name of the picture is submitted. The icing on the cake, what I forgot to mention at the beginning is that the Admin console also gives you the opportunity to 'Name' your image. So now when you do this, not some obscure name like "dscn0082" (the .jpg can be cut off again using explode)is submitted by your form but rather "bigredbike". And that's it. All possible because the name of the image is in the url, so it can be retrieved using:
[code]
$_SERVER['HTTP_REFERER']
[/code]
In addition the description option in ZenPhoto allows you to put links in your content. Php does the rest.