jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => Topic started by: Miri on 26.01.2018 19:07:35

Title: Question, component integration
Post by: Miri on 26.01.2018 19:07:35
I'm trying to integrate this component (Ccoment) for comments in jdownloads.
From his guide
https://compojoom.com/documentation/ccomment/ch03s02s16
is a very old version of jdownloads and I wanted to ask you:

Which file should I modify add their code?
Does the code match the calls of your component?

I have tested editing this file /components/com_jdownloads/views/download/tmpl/default.php
(they say to modify components / com_jdownloads / jdownloads.html.php but this file does not exist in the latest version of jdownloads)

Where do you suggest adding the code to activate comments?
Thank you
Miri
Title: Re: Question, component integration
Post by: Arno on 26.01.2018 22:44:22
Hi.
QuoteI have tested editing this file /components/com_jdownloads/views/download/tmpl/default.php
Have you also added the placeholder {ccomment} in the activated jDownloads Details layout ?
Title: Re: Question, component integration
Post by: Miri on 26.01.2018 22:59:35
exactly
I have also modified the file /components/com_jdownloads/views/download/tmpl/default.php
       // Option for JComments integration
if(file_exists(JPATH_ADMINISTRATOR . '/components/com_comment/plugins/com_jdownloads/jdownloads.php')) {
JLoader::discover('ccommentHelper', JPATH_ROOT . '/components/com_comment/helpers');
$readmore = ccommentHelperUtils::commentInit('com_jdownloads', $file);
$html_file = str_replace('{ccomment}', $readmore, $html_file);
}
        if ($jlistConfig['jcomments.active']){
            $jcomments = JPATH_BASE.'/components/com_jcomments/jcomments.php';
            if (file_exists($jcomments)) {
                require_once($jcomments);
                $obj_id = $this->item->file_id;
                $obj_title = $this->item->file_title;
                $body .= JComments::showComments($obj_id, 'com_jdownloads', $obj_title);
            }   
        }

but on the user side, you see it as text instead

[gelöscht durch Administrator]
Title: Re: Question, component integration
Post by: Arno on 26.01.2018 23:32:40
Please check whether in the jD configuration is activated in the TAB Frontend the option on the pic below.

[gelöscht durch Administrator]
Title: Re: Question, component integration
Post by: Miri on 27.01.2018 08:29:39
yes, I activated them both, again but it does not activate. you can check yourself in this address...https://www.web.com/download/download/5-file/37-copertina-attivita-lavorativa-mensile
Title: Re: Question, component integration
Post by: Arno on 27.01.2018 11:09:18
Quoteyes, I activated them both,
No. Only the first option please.
Title: Re: Question, component integration
Post by: Arno on 27.01.2018 11:21:40
Hm. It seems that this plugin not exist in the described folder:

if(file_exists(JPATH_ADMINISTRATOR . '/components/com_comment/plugins/com_jdownloads/jdownloads.php')) {

So you should contact the developer from ccomments.
Title: Re: Question, component integration
Post by: Miri on 27.01.2018 12:27:21
Hello. It actually exists in the administrator path:
/administrator/components/com_comment/plugins/com_jdownloads/jdownloads.php
Title: Re: Question, component integration
Post by: Arno on 27.01.2018 14:43:50
Not in my installation. Use you the Pro version?
Title: Re: Question, component integration
Post by: Miri on 27.01.2018 18:06:16
Yes, I'm using the pro version.