hello this is myfirst post. I started using zenphoto and i believe it is one of the best image galleries out there. I D like to perform a minor modification. In the index.php I want in each album to add all the images thumbnails instead of only one random. To do this I copied inside the next album loop the next image loop from the album.php. The problem is that I get the following error
Fatal error: Call to a member function isDynamic() on a non-object in C:\wamp\www\zenphoto\zp-core\template-functions.php on line 339
my code in index.php is
<?php if (!defined('WEBPATH')) die(); $themeResult = getTheme($zenCSS, $themeColor, 'light'); $firstPageImages = normalizeColumns('2', '6');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<?php zenJavascript(); ?>
<title><?php echo strip_tags(getGalleryTitle()); ?></title>
<link rel="stylesheet" href="<?php echo $zenCSS ?>" type="text/css" />
<?php printRSSHeaderLink('Gallery',gettext('Gallery RSS')); ?>
</head>
<body>
<div id="main">
<div id="gallerytitle">
<?php if (getOption('Allow_search')) { printSearchForm(''); } ?>
<h2><?php printHomeLink('', ' | '); echo getGalleryTitle(); ?></h2>
</div>
<div id="padbox">
<div id="albums">
<?php while (next_album()): ?>
<div class="album">
<div id="images">
<?php while (next_image(true, $firstPageImages)): ?>
<div class="image">
<div class="imagethumb">
" title="<?php echo strip_tags(getImageTitle());?>"><?php printImageThumb(getImageTitle()); ?><?php printAlbumTitle(); ?></div>
</div>
<?php endwhile; ?>
</div>
<div class="albumdesc">
<h3>
" title="<?php echo gettext('View album:'); ?> <?php echo strip_tags(getAlbumTitle());?>"><?php printAlbumTitle(); ?></h3>
<small><?php printAlbumDate(""); ?></small>
<p><?php printAlbumDesc(); ?></p>
</div>
<p style="clear: both; "></p>
</div>
<?php endwhile; ?>
</div>
<br clear="all" />
<?php printPageListWithNav("« ".gettext("prev"), gettext("next")." »"); ?>
</div>
</div>
<?php if (function_exists('printLanguageSelector')) { printLanguageSelector(); } ?>
<div id="credit"><?php printRSSLink('Gallery','','RSS', ' | '); ?> <?php printCustomPageURL(gettext("Archive View"),"archive"); ?> | <?php echo gettext("Powered by"); ?>
">zenphoto</div>
<?php printAdminToolbox(); ?>
</body>
</html>
Comments
http://www.zenphoto.org/support/topic.php?id=3380
or probably
http://www.zenphoto.org/support/topic.php?id=3505
seems to be a bit slow though -- is there more optimised code for something like this?
`
<?php while (next_album()): ?>
<?php printAlbumTitle();?>
<?php $album = query_single_row("SELECT folder from". prefix('albums')." WHERE id = ".getAlbumID());$images = $_zp_current_album->getImages();
foreach($images as $image) {
echo "";
echo "";echo ""; }?>
<?php endwhile; ?>
`