Ok, I call the page with: portfolio.php?album=glamour
Then at the top of the page I have: require_once("backend/zp-core/template-functions.php");
And halfway down the page (which is all HTML) I have the code as posted above.
The album "glamour" does exist.
This worked before. (I didn't change anything but install zenphoto again)
Well, I will believe you -since you are the developer- but strangely enough it did. And I reverted to the old situation from svn to check...and it did work like that.
Oh well, that is of no consequence now...could you tell me how to create an album object in this setup please?
The controller used to be loaded from the template-functions script. But that was not correct and caused problems with using zenphoto as a plugin. The controller processes all the normal zenphoto url parameters. You will have to setup the zenphoto environment directly:
$_zp_gallery= new Gallery(); $_zp_current_album = new Album($_zp_gallery, ;
I suggest you review the functions guide for how the zenphoto functions are used.