By Gerlof Koopmans on Wednesday, 15 January 2014
Posted in General Issues
Replies 5
Likes 0
Views 711
Votes 0
Hi,

The number of category blog posts shown is incorrect (or at least inconsistent with the number shown in the EasyBlog Latest Blogs module).
For an example, take a look at http://www.wegwijzerputten.nl/j30/nieuws/categories/uit-de-groepen.

In the left sidebar (EasyBlog Latest Blogs module), you see avatars of all categories/subcategories, including the number of posts.
Each category shows the total of posts of its subcategories, what is expected behavior in my opinion.

In the right, you see the EasyBlog component output.
As you see in this case, the main category 'Uit de Groepen' shows "0 posts in this category", but this has to be the same as the number in the Latest Blogs module: "3 posts in this category" (total of posts in the subcategories).

Regards

Gerlof Koopmans
OK, clear.
Thanks for your detailed explanation!

Regards

Gerlof
·
Wednesday, 15 January 2014 23:26
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Gerlof,

This is actually the default behavior because the category Uit de Groepen is a category on its own . We'll see if we can update this in the next release of EasyBlog.
·
Wednesday, 15 January 2014 22:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mark,

Thanks for your quick reply.
You say it is default behavior, but your 'own' EasyBlog Latest Blog module is not behaving in the same way. So not so default as it seems

Can you give a hint where/what to change in the underlying code of the component?

Thanks in advance!

Gerlof
·
Wednesday, 15 January 2014 23:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Gerlof,

We actually try to not have as much recursive codes possible because if you need to calculate the number of posts within the unlimited level categories, it would require quite a bit of cpu cycle to compute them. The module actually retrieves the count via a recursive loop which is also bad. If you want to alter this behavior, you can edit the file /components/com_easyblog/views/category/view.html.php and at line 328 locate the codes below:


$category->cnt = $modelC->getTotalPostCount( $category->id );
·
Wednesday, 15 January 2014 23:21
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome
·
Wednesday, 15 January 2014 23:45
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post