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:
`
Functions like getNumImages() will use the global $_zp_current_image parameters if no parameter is supplied. For a custom page, these are unlikely to be specified. (The actual global is setup by the context.)
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.
The reason why this looks like a custom search page is perhaps because I use the same zenhead.php and zenfooter.php page for all the zp pages like album.php, image.php, search.php and latest.php. In my latest.php I actually use the code below and this has always functioned well, until now. The reported error message only occurs on this latest.php page at the point where I only wanted to check what page is loaded so that I can create the right title/navigation for the page.
printLatestImages($number='32',$albumfolder = '',$showtitle = true,$showdate = false,$showdesc = false, $desclength = 24,$showstatistic = '',$width = 160,$height = 160,$crop = false,$collection = false);