Member
Member
jphilbert   2013-04-13, 12:12
#1

GetAlbums()does not list sub-albums in the gallery. I have been searching on a way to do it without querying the database directly.
I tried a for loop GetAlbums($i) and GetAlbum($i) with seems logical did not work
Any help will be appreciated.

Administrator
Administrator
acrylian   2013-04-13, 12:22
#2

You have to use getAlbums() on an album object to get it's direct sub albums. So for all levels you need to do this recursively.

Member
Member
jphilbert   2013-04-13, 12:29
#3

ok bet.

Member
Member
sbillard   2013-04-13, 21:04
#4

There is an admin function--genAlbumList() that will give you a list of all the albums a user has the right to upload to. (actually, you can specify the rights you desire, the default is upload)

Member
Member
jphilbert   2013-04-14, 02:51
#5

I like that better ... no need to load folders that a user can see anyway..but it does not work ...\
\
Fatal error: Call to undefined method Gallery::genAlbumList() in /public_html/clients.philbertphotography.com/themes/copy_of_default/image.php on line 88

Administrator
Administrator
acrylian   2013-04-14, 09:53
#6

It is an admin function so you would have to load the admin functions file. Admin functions are of course not available on the front end.

Member
Member
sbillard   2013-04-14, 17:05
#7

And it is not an object method, so you just call the function.

Member
Member
jphilbert   2013-04-15, 04:04
#8

Ok got you .. thanks for your help ... I removed all the legacy and Mysql codes.

Member
Member
vincent3569   2013-04-15, 12:30
#9

hi

I wish to improve google map plugin : I wish to display all pictures (with geo data, of course) of the gallery on a map, with a link from gallery page for example.

do you think the function genAlbumList() may help me to do that ?

Administrator
Administrator
acrylian   2013-04-15, 13:13
#10

Yes, as you need the album objects to get the images. Do you really want to do that? If you have a lot of images this could possibly slow down the site quite a bit.

Member
Member
sbillard   2013-04-15, 16:23
#11

do not forget that this is currently an ADMIN function, so you will have to load those on the front end.

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