Number of files: Include subfolders

Phoca Download - download manager
Corono
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 16 Jul 2018, 19:05

Number of files: Include subfolders

Post by Corono »

Hi
It is possible to show the number of files in a Phoca Download folder. However, I have sometimes a folder that only contains subfolders. There are no files in this topfolder, only in the subfolders. Phoca Download shows now 0 files in this topfolder (which is basically correct, they are all in subfolders), but this is very confusing for the user. An example

Topfolder Year (0)
- Subfolder 2018 (2)
- Subfolder 2019 (3)
- Subfolder 2020 (4)

Is there a way that the topfolder also counts the files in the subfolders? My expectation would be "Topfolder Year (9)".

Best
Corono
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Number of files: Include subfolders

Post by Jan »

Hi, see similar topics in this forum, where it is explained.

The are just two ways: to display count of files in the folder or to display count of files in the folder including subfolders. Hard to say which way is the right. The first options is correct as it just displays the count of files in the category. Its subcategory is just another category so its files should not belong to parent category files. So the first options was voted by community. To do the second option, the code needs to be customized (including some recursive function to count all files in category tree which can slow down loading of page)

Jan
If you find Phoca extensions useful, please support the project
Corono
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 16 Jul 2018, 19:05

Re: Number of files: Include subfolders

Post by Corono »

Hi Jan
Thanks for the answer.
In other words, the second way is not implemented (yet).
Then is there a way to disable the numbers? I found two entries in the view settings for the number of elements, both are set to "no", but the numbers are still shown.

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

Re: Number of files: Include subfolders

Post by Jan »

Hi, yes, not implemented yet.

Hide the numbers - see options - you can disable the numbers for some parts. If there is no option for some part, this can be done per CSS (setting display: none attribute for each part)

Jan
If you find Phoca extensions useful, please support the project
Post Reply