ZenPhoto looks really good but I'm struggling with it.
I'm using the default theme.
I have 3-levels of album - gallery / year / location.
From within image.php, I've managed to display the EXIF image copyright information using $_zp_current_image->getCopyright(). But I would like to append the year to this - i.e. the title of the parent album.
$_zp_current_image->GetAlbumName() displays [year]/[location]. How can I pick up just the year value?
Any suggestions would be greatly appreciated.
I'm very much a novice with PHP b-t-w.
Comments
You can get the "date" from the image object via imageObject-> getDate(); But that is a full date, so you will have to parse it with PHP code to extract just the year.
Also, the album name is not the same thing as the album title, so if you really want the title you will have to use the album->getTitle() method.
I am afraid you will need to study up on PHP and the Zenphoto object model if you are going to branch out from what is provided standard.
The image date would not be so good because many of the older images are scanned. My 2nd level albums have names & titles which are just the 4-digit year. If this can't be retrieved directly, I'll have to simply extract the 1st 4 characters from the GetAlbumName()return.
I have solid software development experience so I fully appreciate what's needed to get to grips with php.
But re the Zenphoto object model, I started with the assumption that I should be able to find the answer to this myself. But after a lot of searching through the forum and the user guide I'm making no headway at all. I've just not been able to find documentation on the data model and the functions. Am I looking in the wrong place? Can you point me in the right direction?
Start here:http://www.zenphoto.org/news/zenphotos-object-model-framework
Then here:http://www.zenphoto.org/news/functions-documentation
I've got no excuses now.