I'm using a custom php page to show my latest images. I get this fatal error at the beginning of the page where I have my h2 tag:
`Fatal error: Call to a member function getNumImages() on a non-object in /srv/jackdaw/www/www.jacktummers.nl/collectie/zp-core/template-functions.php on line 1905`
And this is what I have between the h2 tags:
`
<?php<br />
$zoekopdracht = getSearchWords();
if ($zoekopdracht) {
if (($total = getNumImages() + getNumAlbums()) > 0) {
if (isset($_REQUEST['date'])) {
$searchwords = getSearchDate();
} else {
$searchwords = getSearchWords();
}
echo 'Gevonden op ' . $searchwords . ' (' . $total . ')';
}
$c = 0;
} else if (isImagePage() || isAlbumPage()) {
printParentBreadcrumb('',' » ',' » '); printAlbumBreadcrumb();
} else {
echo "Nieuwste foto's";
}
?>
`
I guess I made a mistake somewhere, but I can't find it.
Comments
You seem to be creating the equivalent of a search page with a custom search, so you would have to set up an appropriate search context.
The `image_album_statistics` plugin does provide some means for showing your latest images. If the format is not what you want at least the algorithms it uses to get the images should be of use to you.
`printLatestImages($number='32',$albumfolder = '',$showtitle = true,$showdate = false,$showdesc = false, $desclength = 24,$showstatistic = '',$width = 160,$height = 160,$crop = false,$collection = false);`
I'm curious, is there any reason why all the themes that come with ZP have complete template pages, not devided into head, body and footer template parts?