ZenphotoCMS Forum
album location field ?! - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Themes (https://forum.zenphoto.org/forum-5.html)
+--- Thread: album location field ?! (/thread-3148.html)



album location field ?! - flu - 2008-06-23

Hi,
I've searched the board but I just don't get it :
In the admin section where you can edit the datas about an album, there's a field called "location".
Could someone tell me how to display it in the album.php ?
This is probably simple, but I'm looking for it for hours...

Thank you.




album location field ?! - sbillard - 2008-06-23

You would have to use echo getAlbumData('location');




album location field ?! - flu - 2008-06-23

Thanks but sorry, I've already made it but it just doesn't work, the data location isn't displayed and I just don't know why...
I use the last stable version (not a nightly).




album location field ?! - flu - 2008-06-23

Oops... I'm about to realize my mistake... I think I used it in a wrong place.




album location field ?! - flu - 2008-06-23

No way, I can display this data viewing the thumbnail in a subalbum containing images but not in its parent album :
for example :
www.url.tld/album-containing-only-subalbums/subalbum-with-images : fine I get it
www.url.tld/album-containing-only-subalbums : nothing is displayed

Does this function must be in a special loop or something like that ?




album location field ?! - sbillard - 2008-06-24

This function only works with $_zp_current_album. If you want to get the data for an arbitrary album you need to use the class functions. You should visit our WEB site and review the functions guide http://www.zenphoto.org/documentation-official/index.html




album location field ?! - flu - 2008-06-24

Well I'm trying to get it (I've already read the documentation, especially this one : http://www.zenphoto.org/documentation/zenphoto/_template-functions.php.html) but I must admit that the way to use the class functions looks like chinese to me...
If I understand, to display every field "location" of the subalbums listed in album.php, I can't do it in the same way that in a specific album, a custom function is required, right ?
So I must try to get these datas using $subalbums but I can't see something about it in the doc.
Sorry to ask again but any help would be really appreciated.




album location field ?! - sbillard - 2008-06-24

Perhaps you should show us a little of the code where you are trying to do this. Is it within the next_album loop? Then the getAlbumData() function should work.




album location field ?! - flu - 2008-06-24

Sure, here it is in album.php :
`

" title=" ">

" title=" ">

" title=" ">[b]``[/b]

photos

`




album location field ?! - flu - 2008-06-24

Well... don't ask me why and how but it works now, sorry for the waste of time.
Don't worry I have many dumb questions to ask.
Thanks for your time.