Lightbox

I wondered if anyone could give me a hand setting up my thumbnails to change from redirecting to the image.php page to just appear in a jquery lightbox?

I have all the <script> parts setup etc but I'm unsure where to add in the callout functions (class="lightbox") for example to make images (when clicked) appear in a lightbox rather than redirect to the images individual page.

Here is my album.php page, hopefully someone can tell me where to put the additional code needed to make this work. I'm using the PrettyPhoto Lightbox plugin btw:

My site - http://www.solentnightout.com

My album.php - http://pastebin.com/czKxPxZi

(PrettyPhoto jQuery Plugin) - http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/#!prettyPhoto

Comments

  • acrylian Administrator, Developer
    Change your theme to use full image links instead of image page links within the next_image loop. Please see the theming tutorial about how Zenphoto themes work generally.

    Btw, Zenphoto comes already with a lightbox plugin called Colorbox.
  • that would be at line 75 of your provided "paste":

    `<?php echo getImageLinkURL();?>`

    add the class or rel to initiate the lightbox, and change the href function to point to an image (sized, full, custom crop, etc: see function guide).

    Note: I do not see a prettyphoto initialization in your header. I also use prettyphoto on an upcoming theme, see the page source here to see this initialization:
    http://gjr-web.com/demo/zpskel/Nature Scenes/

    Also, looks like you would be calling jquery twice. You have it in your header along with `
    <?php zp_apply_filter('theme_head'); ?>
    `
    which is the hook to include necessary plugin files as well as jquery (look at your generated source).
Sign In or Register to comment.