Zenphoto 1.2.2 [3131] - default theme.
I am using getRandomImagesAlbum() on my index.php.
When I set the function to choose from a dynamic album I get this error:
`Fatal error: Call to a member function getSearchEngine() on a non-object in path-to-zenphoto\zenphoto\zp-core\template-functions.php on line 2920`
It works fine with all the other "normal" albums.
Any ideas ?
Comments
This is what I have:
`
<?php if ((getOption('Randomimage')== '--Gallery--')) {
makeImageCurrent(getRandomImages(false));
printCustomSizedImageMaxSpace($alt='',600,600,NULL,NULL, false); }
// displays a random image from the entire gallery
else {
makeImageCurrent(getRandomImagesAlbum(getOption('Randomimage')))
printCustomSizedImageMaxSpace('',600,600,NULL,NULL, false);} ?>
//displays a random image from any other chosen album
`
Probably all wrong but maybe you can help me out.
Thanks
`
if ($album->isDynamic()) {
$search = $_zp_current_album->getSearchEngine();
$images = $search->getImages(0);
`
needs instead to say
`
if ($album->isDynamic()) {
$search = $album->getSearchEngine();
$images = $search->getImages(0);
`