Page 1 of 1

Show number of subcategory files in category

Posted: 02 Mar 2015, 13:44
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?

Re: Show number of subcategory files in category

Posted: 03 Mar 2015, 11:58
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

Re: Show number of subcategory files in category

Posted: 04 Mar 2015, 17:03
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!

Re: Show number of subcategory files in category

Posted: 06 Mar 2015, 15:00
by Jan
Hi, unfortunately, I didn't do such change yet, so cannot give any clue and exact guide :-(

Jan