Album thumbs and single images on same page?

Is it possible to have, on the album page with the thumbnails, the full size image represented by a thumbnail? That is, there would be no separate image.php page, as its functions would be incorporated into the album.php page. This would mean no navigation to an image page, as the user would just click on a thumbnail and see the full size image in an adjacent area of the same page.

Comments

  • os07 Member
    Would the album.php page not require all of the ZP code from the image.php page, though?
  • acrylian Administrator, Developer
    I thought you wanted to link directly to the fullsize image in a kind of lightbox or so.

    So let us first define the terms. The image on image.php is not the full size image, this is the sized image.
    If you want thumbnails together with this sized image the easier way would be to incorporate the thumbs in image.php. In that case please see here: http://www.zenphoto.org/support/topic.php?id=3156&replies=27#post-19082
  • os07 Member
    I want to link to the image that's sized on image.php. I read the other thread, specifically:

    >I'm looking to combine the functionalities of Album.php and Image.php

    >List all the images in an album (as album.php) and display the first image of the >album in a scaled view next to the list then when someone clicks another thumbnail, I >want the page to reload and the scaled image to changed to the selected photo.

    >Just copy the next_image() loop from your album.php page to image.php to achieve this.

    Did you mean the while (next_album()) loop?

    This far I have attempted both an iframe method (loads other test files, but apparently will not load the image.php file, even with the proper path indicated) and the method of copying the next_album loop into the image.php page.

    What am I missing?
  • acrylian Administrator, Developer
    Besides the fact that iFrames are considered outdated and bad web style using this does not work with php files. If you call image.php within a iFrame it looses it's image context, it simply does not know what to do.

    Did you mean the while (next_album()) loop?
    No, that is for printing the list of the albums, not for the thumbnails of images in the album. If you copy the next_image() loop from album.php to image.php you get the thumbs of the images and the sized image on one page. There are detailed explanations on the thread I linked to above and linked within the thread.

    To get a little more familiar with zenphoto themes please also take a look at our theming tutorial: http://www.zenphoto.org/2008/05/theming-tutorial/
  • I've also been toying around with this layout (with no luck) in attempt to get a Smugmug-style album. I'd be curious if anyone has accomplished this...
  • acrylian Administrator, Developer
    So again, just move the `next_image()` loop from album.php to image.php and you get the thumbnails of the album with the currently selected sized image. Actually you find a lot info in the thread and the within linked other threads.

    What is Smugmug??
  • Smugmug is a for-pay photo hosting site. http://www.smugmug.com
  • acrylian Administrator, Developer
    I see no reason to do such a layout with zp. But of course you have some work to do especially with the apparently paginated thumbs. Take a look at the effervescence_plus theme that is included with the zp package or the galleria theme http://www.zenphoto.org/support/topic.php?id=2571&replies=59
  • Just getting back to this. Works brilliantly. Stupid question: In a site integrating this ZP image.php file into the structure, what is the way to directly address the image.php page in a given album?

    For instance, to go directly to the index.php page, all I need do is to specify:

    www.somewebsite.com/zenphoto/albumname

    What would the URL to the image.php file be?

    TIA!
  • The for of URIs for zenphoto (assuming mod_rewrite) is <url base>/<album>/<image name><mod_rewrite suffix>
  • j916 Member
    <----------------------------------
    I've also been toying around with this layout (with no luck) in attempt to get a Smugmug-style album. I'd be curious if anyone has accomplished this...
    -------------------------------------->

    Old post, but I've been playing around with this. Here's what I have so far:

    http://www.moto-treks.com/PhotoGallery/china/gsi_china_tour-1.jpg.php
  • Hey j916 - I have successfully managed to do this as well EXCEPT for linking from gallery.php to the first image.php page. It looks as though you have managed to figure that part out - if so, could you offer some guidance to those of us that are more "challenged"? :)

    Thanks!
  • j916 Member
    Sure, I hope this helps. In the gallery.php there should be a loop for all the albums. Within this loop the album thumb is displayed as well as the link. For the link I use the code.

    `

    if (GetNumSubalbums() > 0 ) {

    echo htmlspecialchars(getAlbumLinkURL());?>" title="<?php echo $annotate;<br />
    } else {

    if(GetNumImages() > 0)

    echo htmlspecialchars(getFirstImageURL()); ?>" title="<?php echo $annotate;<br />
    }

    ...

    `

    What this does is link to the album page if there are subalbums or the image page (bypassing the album.php) if there are only images.
Sign In or Register to comment.