JComments

Integration of JComments To Mosets Tree

Mosets Tree — is one of the most powerfull Joomla catalogues. Any level difficulty or structure catalouge can be created by means of this component. The good example of component possibilities is the popular extensions.joomla.org based on Mosets Tree. Primary there is the built-in comment system to catalogue's objects. However, JComments has more possibilities and features and the integration will replace the built-in comment system with JComments.

Integration JComments with Mosets Tree 2.2.3+

  1. Open file/components/com_mtree/templates/kinabalu/page_listing.tpl.php (where kinabalu is the name of used template)
  2. Find the line:
    if ($this->mt_show_review) include $this->loadTemplate( 'sub_reviews.tpl.php' );
    and replace with:
     
      $comments = JPATH_SITE . '/components/com_jcomments/jcomments.php';
      if (file_exists($comments)) {
            require_once($comments);
            echo JComments::showComments($this->link->link_id, 'com_mtree', $this->link->link_name);
      }

Integration JComments with Mosets Tree 1.5.x

  1. Open file/components/com_mtree/templates/bluetree/page_listing.tpl.php (where bluetree is the name of used template)
  2. Find the line:
    <?php if ($this->mt_show_review) include $this->loadTemplate( 'sub_reviews.tpl.php' ) ?>
    and replace with:
    <?php
      global $mosConfig_absolute_path;
      $comments = $mosConfig_absolute_path . '/components/com_jcomments/jcomments.php';
      if (file_exists($comments)) {
        require_once($comments);
    ?>
    <center>
    <div class="mtframe">
        <?php echo JComments::showComments($link->link_id, 'com_mtree', $link->link_name);?>
    </div>
    </center>
    <?php
      }
    ?>
  3. Open file /components/com_mtree/templates/bluetree/sub_listingDetails.tpl.php (where bluetree is the name of used template)
  4. Find and delete line:
        <?php $this->plugin( 'ahrefreview', $this->link, 'class="bulletData"') ?>
  5. Open file /components/com_mtree/mtree.php
  6. Find the line:
        # Get reviews 
    and replace with:
        # Get reviews
    /* 
  7. Find the line:
        $pageNav = new mosPageNav( $total_reviews, $limitstart, $mt_fe_num_of_reviews );
    and replace with:
        $pageNav = new mosPageNav( $total_reviews, $limitstart, $mt_fe_num_of_reviews );
    */
        $pageNav = '';
  8. Find and delete lines:
        $savant->assign('reviews', $reviews);
        $savant->assign('total_reviews', ((isset($total_reviews)) ? $total_reviews : 0 ));
  9. Find the line:
        $savant->assign('mt_show_review', $params->get( 'show_review' ));
    and replace with:
        $savant->assign('mt_show_review', 0);

After all above changes were done the visitors will be able to leave comments to all items(objects) if Mosets Tree catalogue.

See also:

 
JoomlaTune