4
4
4ecHo4ek2015-10-26 20:23:59
Joomla
4ecHo4ek, 2015-10-26 20:23:59

How to insert JComments comment counter in different modules in Joomla 3?

Comment counters and "Add comments" are displayed only in the "Category Blog" module. And I have all the information in the modules "Materials - news" and "Module - category list". How to display counters and "Add comments" in other modules? I saw the manual for php developers ( www.joomlatune.ru/jcomments-developers-manual.html) , but I don't understand - I don't know php. But I know html, css and a bit of JS. How to implement it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tlegen Bayangali, 2018-11-16
@TlegenBayangali

hope it helps

<?php 
    $commentsAPI = JPATH_SITE . '/components/com_jcomments/jcomments.php';
      if (file_exists($commentsAPI)) :
        require_once($commentsAPI);
        $total = JComments::getCommentsCount($this->item->id, 'com_content');
        echo $total;
      endif;
 ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question