Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    General discussion    Topic: Display comments inside an article
Pages: [1]   Go Down
  Print  
Author Topic: Display comments inside an article  (Read 10025 times)
0 Members and 2 Guests are viewing this topic.
shamin
Newbie
*

Karma: 0
Offline Offline

Posts: 3


« on: November 03, 2009, 20:00:12 »

Hi All,

I am a newbie to jcomments, I want to know is it possible to display comments inside an article, if yes how?.
Please help!

Thanks in advance

Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: November 03, 2009, 21:09:48 »

You need install JComments and setup categories where comments enabled (in JComments settings).
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
shamin
Newbie
*

Karma: 0
Offline Offline

Posts: 3


« Reply #2 on: November 03, 2009, 21:29:40 »

Thanks for the reply,

basically I had done all the installations and comments showing , below or above article, but I want to show the comments inside my article content.

eg:

article cotent-------------
----------------------
-------------------------
comments goes here
article content----------
------------------------


Thanks in advance.
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #3 on: November 03, 2009, 21:41:44 »

Hm, by default such feature doesn't supported but it can be implemented with some modification of JComments Content plugin. At this moment comments list is displayed using onAfterDisplayContent method but you need make some changes... Something like this (I didn't make any tests but it must work)

1. Open /plugins/content/jcomments.php
2. Find and replace line:

Code: (php)
function onAfterDisplayContent(&$article, &$params, $limitstart = 0)
with
Code: (php)
function displayComments(&$article, &$params, $limitstart = 0)
3. Find and replace
Code: (php)
} else {
JCommentsContentPluginHelper::clear($article, true);
}
with
Code: (php)
} else {
if (JCommentsContentPluginHelper::_findTag($article, '/{jcomments}/is')) {
$commentsList = $this->displayComments($article, &$params, $limitstart);
$article->text = str_replace('{jcomments}', $commentsList, $article->text);
}
JCommentsContentPluginHelper::clear($article, true);
}

So after this you can insert into text tag {jcomments} and it will be replaced with comments list, i.e. you can insert comments inside article text.
« Last Edit: April 06, 2010, 14:18:26 by smart » Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
shamin
Newbie
*

Karma: 0
Offline Offline

Posts: 3


« Reply #4 on: November 04, 2009, 11:50:34 »

Hi,

 Sad , it loads blank page.

One thing is,
function onAfterDisplayContent(&$article, &$params, $limitstart=0) is not in the jcomments.php file but
function onAfterDisplayContent(&$article, &$params, $limitstart) ., ie $limitstart is not initialised to 0.
Please help!

thanks in advance.
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #5 on: November 04, 2009, 13:42:12 »

One thing is,
function onAfterDisplayContent(&$article, &$params, $limitstart=0) is not in the jcomments.php file but
function onAfterDisplayContent(&$article, &$params, $limitstart) ., ie $limitstart is not initialised to 0.
I new version it already has this initalization.. I check this modification and it works fine for me... I test it on Joomla 1.5.14 and JComments 2.1.0.0 or latest test build of JComments... so it workable...
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
strgg
Newbie
*

Karma: 0
Offline Offline

Posts: 3


« Reply #6 on: April 06, 2010, 05:59:12 »

HI Smart,

Thanks for this contribution!

Unfortunately it does not seem to work:

i only have the file
/plugin/content/jcomments.php
and not like suggested
/plugin/content/jcomment.php

i modified the sequences told by you and checked the file after saving but it does not
work, it does not even recognize {jcomments} and displays it literally.

Please be that kind to give more detail instruction how to do this on Version 2.1.0.0

Much appreciated  Cheesy

Best regards and a good day
Logged
marco168
Newbie
*

Karma: 0
Offline Offline

Posts: 8


« Reply #7 on: January 10, 2011, 23:27:48 »

I am also looking for this integration~
Any news about that? Huh

I found a website integrate greatly by using tab.  Hope we could do it also
http://www.salonstreet.com.hk/details/fusion-fusion.html
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    General discussion    Topic: Display comments inside an article
 
Jump to: