Member
Member
LQS   2009-08-03, 11:17
#1
Hi,
I use ZP as plug-in to display images on my own site (http://www.zenphoto.org/2008/01/hacks/#zenphoto-as-plugin).

I need to display all items (albums even imgs) from one specific "ALBUM". I used function zp_load_album to access this "ALBUM".
Script displays images only if "ALBUM" has NOT subalbums. If it has, albums are displayed but images NOT. Could u help me please ?

Thx ...

Code:
`
<?php

define('ZENFOLDER', 'zp-core');
define('WEBPATH', 'zenphoto');
require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php");
$firstPageImages = normalizeColumns('2', '6');

zp_load_album('gallery/Greece');

?>
`
.... my page ....

`
<!-- ALBUMS -->
<?php while (next_album()): ?>

<?php printAlbumThumbImage(getAnnotatedAlbumTitle()); ?>


<?php printAlbumTitle(); ?>
<?php printAlbumDate(); ?>
<?php endwhile; ?>

...

<!-- IMAGES -->
<?php while (next_image(false, $firstPageImages)): ?>

<?php printImageThumb(getAnnotatedImageTitle()); ?>
<?php endwhile; ?>
`
Member
Member
sbillard   2009-08-03, 17:09
#2
Is all this code in the same script?

Are you getting CGI errors? If so what are they?
Member
Member
LQS   2009-08-03, 20:30
#3
- Yes
- No errors, just no images displayed (blank html code). If I delete subalbum, images are dispayed >> either albums or images ;-)
Member
Member
sbillard   2009-08-04, 00:47
#4
Just a guess, but maybe the subalbum loop is causing you to loose the context. Try adding an extra zp_load_album() before the image loop. Can't hurt.
Member
Member
LQS   2009-08-04, 14:12
#5
I have already tried it with no effect.

But I think I have solved just now, juhuu Smile
Line `zp_load_album('gallery/Greece');` must be BEFORE `$firstPageImages = normalizeColumns('2', '6');` and it seems to be working right.

In any case thx a lot for advices and ideas.
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.