Member
Member
tiesto   2008-09-21, 20:06
#1
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"><a>" title="<?php echo strip_tags(getImageTitle());?>"><?php printImageThumb(getImageTitle()); ?></a><?php printAlbumTitle(); ?></div>
</div>
<?php endwhile; ?>

</div>

<div class="albumdesc">
<h3><a>" title="<?php echo gettext('View album:'); ?> <?php echo strip_tags(getAlbumTitle());?>"><?php printAlbumTitle(); ?></a></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>
Member
Member
tiesto   2008-09-22, 13:23
#2
anyone please
Member
Member
edbury   2008-10-07, 15:49
#3
I believe we're after the same thing:

http://www.zenphoto.org/support/topic.php?id=3380

or probably

http://www.zenphoto.org/support/topic.php?id=3505
Junior Member
Junior Member
singlecell   2008-10-07, 16:50
#4
i believe this code is pretty close.. (found it deep in the forums)
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 "<img src='".WEBPATH."/".ZENFOLDER."/i.php?a=".$album['folder']."&i=".$image."&h=80&w=80&t' />";echo ""; }?>
<?php endwhile; ?>
`
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.