JComments

Integration of JComments to VFM file archive

VFM — is quite good component to create the file archive with AJAX technology support and possibility to setup user access rights to files. The offered to your attention integration is inteneded to replace the built-in comment system by JComments. It is important to note that files with name and description given by administrators can be commented only.

  1. Open file /components/com_vfm/tpl/view_success.php
  2. Find lines:
    <?php # JoComment Integration ?>
    <?php if (VFM_Core::checkJoCommentInstalled() && $conf['enable_jocomment']): ?>
    <h3>Comments (<?php echo $entry['comments']; ?>)</h3>
    <?php $vfmCommentHTML->printComments(); ?>
    <?php $vfmCommentHTML->printCommentForm(); ?>
    <?php endif; ?>
    and replace with:
    <?php
      $id = $vfm->recordsByFilename[$entry['filename']]->id;
      if ($id) {
        global $mosConfig_absolute_path;
        $comments = $mosConfig_absolute_path . '/components/com_jcomments/jcomments.php';
        if (file_exists($comments)) {
          require_once($comments);
          echo JComments::showComments($id, 'com_vfm', $entry['title']);
        }
      }
    ?>

See also:

 
JoomlaTune