Member
Member
FilMar   30-06-2009, 16:44
#1

Is there a way to have (besides the imagecount) also a subalbum count in the print_album_menu ?

Administrator
Administrator
acrylian   01-07-2009, 09:46
#2

"Is there a way" is not really the right question actually. The answer is not without modifying the plugin.

Member
Member
FilMar   02-07-2009, 10:43
#3

Thanks for the answer, I know that everything is possible but was wondering if it was foreseen.
Is it a lot of work?

Thanks in advance,

Administrator
Administrator
acrylian   02-07-2009, 11:16
#4

I have put that as an option (either subalbum or image count, both would be confusing) on my list. can't promise when I get to that though.

Member
Member
FilMar   03-07-2009, 12:44
#5

Thanks,

You're probably right about the one or the other option but a 'x photos in y albums' would be nice too ;-). Only that you need to count all levels and sublevels at once then.

Member
Member
FilMar   04-07-2009, 13:10
#6

acrylian, for the moment I don't need the option any more (but I think it may be usefull for others too), I changed my template in a way that I don't use Print_album_menu any more.

But I have another question. I found the functions getNumImages and getNumSubalbums but is there also a function already available that counts the images in the subalbums?
Or some codelines to achieve the same.

I will have some toplevel albums (as catagories) wich all contains a number of subalbums.
Here I would like to show with each toplevel the total number of images and the number of subalbums (getNumSubalbums).
I know where to put it (gallery.php, div album) but I don't see directly how to get the right number.

Many thanks in advance,

Administrator
Administrator
acrylian   04-07-2009, 13:30
#7

No, there is no direct function to get the number of images within the subalbums of a certain album.

You have two way to get those:

  1. via object orientation using our classes: Code a loop using the album class method getSubalbums()and create an album of each of that to get its image number and then add them together.

  2. via MySQL: A count query using the LIKE statement as all subalbums have the name of their top level album in there name (e.g. toplevelalbum/sublevelalbum/...).

Member
Member
FilMar   05-07-2009, 07:59
#8

OK, thanks, I'll try to figure that out.

Keep up the good work... ;-))

Member
Member
FilMar   07-07-2009, 14:46
#9

OK, it works (almost)

I did it via a MySQL query.
I have only one little problem. How do I get the foldername of an album in Zenphoto?
There are some albums that I changed the title so the foldername is not the title...

Thanks in advance,

Member
Member
sbillard   07-07-2009, 15:51
#10

The albumid field of the image is the record ID of the album. You have to query that record and extract the folder field

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