Hi, I'm developing a blog similar joomla site using that cool component.
I need to show comments total count in the frontpage, category list and article page.
The strange thing is that in the category list article I found a way in that forum and I already show that magic number.
I'm using in the directory components/com_content/views/category/tmpl/blog_item.php that code
<?php
$commentsCount = 0;
$commentsBlock = '';
$commentsAPI = JPATH_SITE.DS.'components'.DS.'com_jcomments'.DS.'jcomments.php';
if (is_file($commentsAPI)) {
require_once($commentsAPI);
$config = & JCommentsFactory::getConfig();
$categoryEnabled = JCommentsContentPluginHelper::checkCategory($this->item->catid);
if ($categoryEnabled) {
$commentsCount = JComments::getCommentsCount($this->item->id, 'com_content');
if ($commentsCount) {
$commentsBlock = '<span class="comments-counter"><a href="'.$this->item->readmore_link.'#comments">'.$commentsCount."</a></span>";
} else {
$commentsBlock = '<span class="comments-counter"><a href="'.$this->item->readmore_link.'#addcomment">'."0</a></span>";
}
}
}
?>
Clearly I remove the if $categoryEnabled but it doesn't work. And the article page too.
Is there someone who knows how can I solve?
Thanks
Tru