forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: GreymanUK on August 11, 2011, 01:56:52 pm

Title: Albums and Files totals in Parent Catagories
Post by: GreymanUK on August 11, 2011, 01:56:52 pm
Is it possible to show album quantity and file quantity in parent categories that would be a total of child categories?  The reason being that if you have say a 3 tier cat system with what could possibly alot of 3rd tier catagories it would be easier to find non empty cats.

My Gallery (http://www.smartsbox.com/photobox/index.php)

So my gallery will eventually be sorted by Family Name and then by each smaller family group.  So potentially the third tier could be quite large.  I tried hiding empty categories as was explained in another thread but that was not an ideal solution.  It hid empty parent categories and only showed 3rd tier categories if you changed your config to display categories 3 deep.

Maybe there is a simpler more elegant solution.  I.e. Only add the categories as family members join the site but I would rather have it ready and configured before each family joins up.  So a single category depth but with a total of albums/files in child categories would be, in my mind a prettier/easier way to see whats worth clicking on and what will be empty.

I am pretty much a novice a php so baby steps please, if there is even a solution to do what I hoped to do.

Thank you kindly in advance for your help in this matter.

Jay
Title: Re: Albums and Files totals in Parent Catagories
Post by: Αndré on August 11, 2011, 03:09:04 pm
So you need a possibility to only hide categories which are really empty and not just displayed as empty, right?
Title: Re: Albums and Files totals in Parent Catagories
Post by: GreymanUK on August 21, 2011, 11:10:26 am
Sorry for the delay, been away.  Yes correct.  I would like to hide categories that are empty but not if they have child categories that have content.  If that makes sense.

Also, sorry to ask another question but its a quick one.  If you disable personal galleries for everyone, admin included and you hide admin controls........ is there a way to get admin controls to show again?  Or is it a trip through the config table in phpmyadmin?  If you disable the gallery option you loose the link to hide/show admin controls.  Doh!

Thanks for the help on the category issue.

Jay
Title: Re: Albums and Files totals in Parent Catagories
Post by: Αndré on August 30, 2011, 04:21:38 pm
I would like to hide categories that are empty but not if they have child categories that have content.
The mod you already tried just checks the layout and removes the row if Coppermine doesn't display the number of albums/files. You'd need to query the database and check if there's any album/file in all sub albums and just remove the row if the category is really empty. Unfortunately such code doesn't exist yet (as far as I know) and it has to be created.