Show number of subcategory files in category

Phoca Download - download manager
geoff
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 02 Mar 2015, 13:26

Show number of subcategory files in category

Post by geoff »

Hello, I am currently running phoca download component version 2.1.9 on a Joomla 2.5 site.
I have a number of categories with sub categories and the file count is zero after the category even though there are a number of files in the subcategories.
So for instance it displays Europe (0) even though I would have a number of files in the subcategories (e.g. France (3) Italy (4) etc.).
This is clearly misleading as viewers will see Europe (0) and assume there is nothing in that folder.
I have seen reference to similar posts on this board and you mention searching for a solution but I have searched through the boards and really can't find anything (e.g. changing a line of code in the php to display file count for files in folders and sub folders combined?). Any ideas?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Show number of subcategory files in category

Post by Jan »

Hi, the number displays the count of files in that category, not in subcategories. As written in similar posts - there can be two ways to display the number:

- exclude subcategories files (this is for most of users right as you display the real number of the files in category)
- include subcategories files (for some users it is better to display it with this way - e.g. when they user empty main category)

So for the second case, the code needs to be customized - to add some recursive function which will search all the files in all the tree of subcategories :idea:

Jan
If you find Phoca extensions useful, please support the project
geoff
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 02 Mar 2015, 13:26

Re: Show number of subcategory files in category

Post by geoff »

Hi Jan, thanks for your prompt reply. Unfortunately I am not even remotely an expert in php so this would be beyond my abilities. I was rather hoping someone else had customised the code in a similar way and would be able to point me in the right direction... back to the drawing board!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Show number of subcategory files in category

Post by Jan »

Hi, unfortunately, I didn't do such change yet, so cannot give any clue and exact guide :-(

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