I'm afraid this might be one of those dreaded "stupid questions", but here it goes.
I searched the forum and the guides for something that might clue me in on what the problem might be, but no such luck.
The thing is, Zenphoto is, as far as I can tell, working fine. However, I don't know why
Thickbox doesn't work on image.php as it should (looking at the source, it doesn't seem to be adding
class="thickbox" to the image).
The test site can be found
here. It's using the zenphoto-2009-11-21-trunk.zip nightly build, and the theme is based on the "Default" one. Using the Default theme got the same results. I also tested in my local server both the official download and the latest nightly, zenphoto-2009-11-23-trunk.zip, and the results were the same.
Any help would be appreciated. I'll keep studying image.php to see if there's something I've overlooked. Thanks.
Regards,
Ed
Comments
See the image.php of the zenpage-default theme for an example (there is some more stuff as it can be disabled optionally) and the thickbox site itself for info about that.
I'll try to take some time tonight to give an even closer look at image.php to see what I can find. Since I can't find anyone complaining about this in the forum, I guess it's either something rare, or something that everyone is figuring out on their own (except dumb ol' me .
Thanks for the reply.
Ed
I think I found the place where I must insert it. (NOTE: the forum kept deleting parts of the code, so I susbstituted < > with [ ]... sorry if that makes it harder to read):
`
[?php
$fullimage = getFullImageURL();
if (!empty($fullimage)) {
?]
[a href="[?php echo htmlspecialchars($fullimage);?]" title="[?php echo getBareImageTitle();?]"]
`
I placed class="thickbox" here:
`
[a href="[?php echo htmlspecialchars($fullimage);?]" title="[?php echo getBareImageTitle();?]" class="thickbox"]
`
And sure enough, thickbox is called, the overlay appears and something appears, only it's not the image. Thickbox apparently doesn't like the link that's being passed to it (for instance, /cboy/zenphoto/zp-core/full-image.php?a=laborers&i=78630169.jpg&q=75, instead of the actual URL to the image), and all I get is a long string of gobbledygook.
I managed to get this far, but I'll probably need help with the rest since I'm not exactly a PHP guru. How can I get Zenphoto to echo the actual url of the full-sized image so that TB can display it?
Regards,
Ed
The zenpage default theme has an option to show the full image with the thickbox. Just follow the instructions on the thickbox site.
Regarding code on the forum you have to use "backticks" to get it shown correctly (the key left to backspace + SHIFT).
Still, thanks digitalsafaris for kindly pointing out the final solution to me.
My original problem wasn't really related to Thickbox (which I've used before), but with where to insert the call on image.php. I'm still all thumbs when it comes to PHP and couldn't "see" where the image tag was. I also got confused because there IS a call to TB on image.php... and only after using Firebug to check the page (and remembering what the "Image Info" link did), I realized the call to TB was only used to present the metadata of the pic. Yeah, it was a "duh" moment. It was then that I could see where the class="thickbox" attribute needed to be inserted.
Anyway, it was fun, and I learned something. Thanks to all of you who posted here.
Ed.
P.S. Would it be possible to add digitalsafaris' solution to the Troubleshooting Zenphoto FAQ (that ZP's image protection blocks the "box" scripts)?
Regarding backticks, the space after typing the first backtick is the important thing to do, otherwise you "delete" it and the code gets mixed up. A little tricky but once you got it..;-)
Thanks for the backticks tip.
Ed