Count sub categories in categories image

Phoca Gallery - image gallery extension
thierrycv
Phoca Member
Phoca Member
Posts: 10
Joined: 04 Mar 2022, 18:39

Count sub categories in categories image

Post by thierrycv »

Hi Christine and Jan

In categories image you count only images stored in the relevant folder and not sub categories stored inside

How is it possible to count everything ?

Exemple

Cat1 (3)
- cat1-1(2)
- cat1-1-1
- cat1-1-2
- cat1-2
- cat1-3 (2)
- cat1-3-1
- cat1-3-2

Thanks for your help

Thierry
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47865
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Count sub categories in categories image

Post by Jan »

Hi see similar posts in this forum. There is count only for current category. There can be two possible ways:

a) count images from current category
b) count images from currenct category and its subcategories

It was selected the a) by community (by similar logic like if someone ask you how old you are, you don't count your daughter's or son's years, only your years)

To count even images from subcateogries, for this recursive function needs to be done - first the tree of categories needs to be build and then count all images in the tree. Such function of course can slow down loading of the results as whole tree of categories needs to be checked. And because of the possible performance problems such function does not exists, so it needs to be completely customized :-(

Jan
If you find Phoca extensions useful, please support the project
thierrycv
Phoca Member
Phoca Member
Posts: 10
Joined: 04 Mar 2022, 18:39

Re: Count sub categories in categories image

Post by thierrycv »

Hi Jan
Ok then 🥲
Thanks
Post Reply