Still fine-tuning ZP integration into site. Anyone know if there is a way to modify the code in album.php so that it only addresses a single album, instead of running through the whole list of albums? Here's the code in question. It just runs through the entire list of existing albums and constructs the thumbs and descriptions. I want to have it do that for just a single album that I designate. The the whole block of album.php code could be copied into an existing html page to output a single album's thumbs and links.
<div id="albums">
<?php while (next_album()): ?> /*here's where it runs through the album list */
<div class="album">
<div class="thumb">
" title="View album: <?php echo getAlbumTitle();?>"><?php printAlbumThumbImage(getAlbumTitle()); ?> </div>
etc etc etc
Comments
But if you want only on album thumb and its album description, the easiest would be to have top level albums with one subalbum each. If you then link directly into that top level album, only one album would appear.
I can figure out how to put on an html page the regular album link with the one representative thumbnail, which, when you click on it, leads to the display of all of a single album's thumbnails/links.
I want to skip that step, and just have the album's whole group of thumbnails/links to full images, appear on an html page.
I want to have one album and its thumbnails appear on one of my html pages. I tried the technique below I found in a thread here, and it works fine - but it shows the thumbs from ALL albums on the page. I want to limit the display to just ONE album's thumbnails. Please excuse my lack of PHP experience.
<?php while (next_album()): ?>
<?php printAlbumTitle();?><br>
<?php $album = query_single_row("SELECT folder from". prefix('albums')." WHERE id = ".getAlbumID());
$images = $_zp_current_album->getImages();
foreach($images as $image) {
echo "";
echo "<img src='".WEBPATH."/".ZENFOLDER."/i.php?a=".$album['folder']."&i=".$image."&h=50&w=50&t' />";echo ""; }?>
Is there a way to choose a SINGLE album or to restrict the number of albums/thumbnails that is displayed?
One issue: alongside my album thumbs is the PHP error message:
Fatal error: Call to a member function getSubalbums() on a non-object in /home/yoursite/www/www/yourgallery/zenphoto/zp-core/template-functions.php on line 307
I tried to purge the cache and to refresh the db, but the error still persists. I think it is related to the fact that I had a subalbum and then deleted it.