Help with adapting JComment PHP Code for Docman 3

by c2oxide   Last Updated February 10, 2019 13:10 PM

I'm trying to add JComment capabilities to a Docman v3 site. I'm looking at the old Docman 1.4.x tutorial:

I edited this file: /components/com_docman/views/document/tmpl/default.html.php

But I'm getting an internal server error:

Using $this when not in object context

because it's not coded for the current DocMan 3.x platform.

global $mosConfig_absolute_path;
$comments = $mosConfig_absolute_path . '/components/com_jcomments/jcomments.php';

if (file_exists($comments))
    echo '<div style="clear:both; padding-top: 10px;"></div>';
    echo JComments::showComments($this->data->id, 'com_docman', $this->data->dmname);

Related Questions