(sub)album count variable?

analog_panda
analog_panda's picture

Joined: 2004-04-03
Posts: 2
Posted: Sun, 2004-04-04 06:56

i'm looking for an "album count" variable (or some php that can determine the number of albums) for use in my site navigation.
The way i have my gallery set up is actually one main album with several sub albums so it may be more accurate to say i'm looking for a "subalbum count" variable.
I would need to use this variable on
view_albums.php and
view_photo.php
Is there a global variable that handles this or a thread out there that i may have missed??
--thank you
analogpanda

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2004-04-04 07:36

This http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=68286#68286 might be what you are looking for. Look at the code and you will see how Totals are done on a per album basis. Then you can use part of this code in a wrapper file for counts.
I hope I have pointed you in the right direction.
It gets very complicated for sub albums because of viewing permissions (per album) basis. You have to loop through each sub-album and see if the viewer has permissions to view that album.

But if you want just totals of images then look though albums.php it gives top level albums numbers and total images already.

Dave