By Ignacio Moreno Flores on Tuesday, 14 January 2014
Posted in Technical Issues
Replies 3
Likes 0
Views 715
Votes 0
Hello,

we are using Komento in our websites to, of course, allow our visitors to leave their comments in our news and articles (we are an online newspaper of sport issues). We need to place the number of comments that each article has before the Komento module is loaded (or even if it is not loaded). This is, is there any variable that shows the number of comments of an article?

Thanks.
Hello,

I am sorry but it's not possible unless you load up the model of Komento to retrieve the count of comments. You could do something like this,


require_once( JPATH_ROOT . '/components/com_komento/helpers/helper.php' );

$model = Komento::getModel( 'Comments' );
echo $model->getCount( 'com_xxxx', $id );
·
Tuesday, 14 January 2014 02:35
·
0 Likes
·
0 Votes
·
0 Comments
·
It works perfectly, thanks!!!!
·
Tuesday, 14 January 2014 03:16
·
0 Likes
·
0 Votes
·
0 Comments
·
No problem
·
Tuesday, 14 January 2014 16:26
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post