ZP as plug-in on own page - diplay problem

LQS Member
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 ....

`

<?php while (next_album()): ?>
" title="">
<?php printAlbumThumbImage(getAnnotatedAlbumTitle()); ?>

" title="">
<?php printAlbumTitle(); ?>

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

...


<?php while (next_image(false, $firstPageImages)): ?>
" title="">
<?php printImageThumb(getAnnotatedImageTitle()); ?>

<?php endwhile; ?>
`

Comments

  • Is all this code in the same script?

    Are you getting CGI errors? If so what are they?
  • LQS Member
    - Yes
    - No errors, just no images displayed (blank html code). If I delete subalbum, images are dispayed >> either albums or images ;-)
  • 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.
  • LQS Member
    I have already tried it with no effect.

    But I think I have solved just now, juhuu :)
    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.
Sign In or Register to comment.