Problem getting thickbox to work with zenphoto

Hello Everybody,

I was wondering if any of you could figure this out.

I am using thickbox, to get a pop up window (similar to lightbox), for a zenphoto gallery I've set up.

However, after I put in the code I thought was right, and click on the thumbnail, instead of the full image popping up, a window pops up containing gibberish characters.

It seems that when the link is clicked, the browser treats the image as though it were a page, and renders it thusly.

Here is the code I used in album.php:

<a class="thickbox"
href="<?=getFullImageURL();?>"
rel="[<?=getAlbumTitle();?>]" title="<?=getImageTitle();?>"><?php printImageThumb(getImageTitle()); ?>

Is the code wrong, and if so, what code should I use instead?

Thanks in advance for any help!

-Jahan

Comments

  • I thought I'd mention that I already tried using this:

    <a
    href="<?php echo htmlspecialchars(getFullImageURL());?>

    That made a window into a page containing the image, instead of just the image itself.

    I want the image only, within the thickbox window.

    Thanks,

    -Jahan
  • I thought I'd mention that I tested this by taking out the php, and putting a url to an existing image.

    This worked - an image was displayed correctly in the thickbox window.

    But this was just to test it.

    It can't be a solution, since the same large image will be shown, regardless of which thumbnail I click on.

    ...the whole point of having a zenphoto gallery, is for it to be dynamic.
  • acrylian Administrator, Developer
    You need to either disable the full image protection or use the getUnprotectedFullimageURL() function (please see the functions guide for the correct spelling). The thickbox needs direct access to the full image.
  • Thanks alot, that worked!!

    One minor problem: I noticed that in firefox, when the thickbox window is activated by clicking on the thumbnail, the background doesn't darken the way it is supposed to - but the thing works normally in Safari.

    Any idea why?

    -Jahan
  • acrylian Administrator, Developer
    Don't know either there is something missing or it's a firefox thing.
  • Oh, forgot to mention that I'm on a Mac - the problem doesn't appear on a PC, when using Firefox, only when using Firefox on a Mac.
  • acrylian Administrator, Developer
    Yeah, I am on Mac, too and noticed that. No idea though.
  • Ah, I found it.

    There's a file apparently missing from the Thickbox files.

    It's macFFBgHack.png - I googled it, and downloaded it, and now it works.

    The code for it was already there, for the hack, but this file was missing.
Sign In or Register to comment.