Member
Member
flu   23-06-2008, 20:17
#1

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.

Member
Member
sbillard   23-06-2008, 20:26
#2

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

Member
Member
flu   23-06-2008, 21:00
#3

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).

Member
Member
flu   23-06-2008, 21:25
#4

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

Member
Member
flu   23-06-2008, 21:45
#5

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 ?

Member
Member
sbillard   24-06-2008, 02:34
#6

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

Member
Member
flu   24-06-2008, 13:02
#7

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.

Member
Member
sbillard   24-06-2008, 15:19
#8

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.

Member
Member
flu   24-06-2008, 16:13
#9

Sure, here it is in album.php :
`

" title=" ">

" title=" ">

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

photos

`

Member
Member
flu   24-06-2008, 18:37
#10

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.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.