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

Login with username, password and session length

JoomlaTune Support Forum    ProofReader component    Bug-reports    Topic: K2 Plugin not returning JComments count to itemlist views.
Pages: [1]   Go Down
  Print  
Author Topic: K2 Plugin not returning JComments count to itemlist views.  (Read 5198 times)
0 Members and 1 Guest are viewing this topic.
Kent Butler
Newbie
*

Karma: 0
Offline Offline

Posts: 1


Email
« on: September 25, 2011, 02:46:33 »

We just installed J-Comments along with the K2 Plugin (K2 JComments v.1.1). The conversion and everything went great :-)

One issue we ran into was the the comments counter on the category/user item lists continuing to report values from the K2 comments system instead of JComments.

This can be fixed with a quick change to /plugins/k2/jcomments.php. The behavior is caused by the K2 itemlist passing it's category params to the onK2CommentsCounter event instead of the params for each item. Not sure why K2 is doing that, but changing the plugin to reference the $params structure associated with the passed $item appears to always access the desired parameters.

To fix, find this code (in /plugins/k2/jcomments.php).

Code:
function onK2CommentsCounter( &$item, &$params, $limitstart, $profile='' )
{
$result = '';
if ($params->get('itemComments')) {

And change to.

Code:
function onK2CommentsCounter( &$item, &$params, $limitstart, $profile='' )
{
$result = '';
if ($item->params->get('itemComments') ) {

That seems to do the trick with all the views implemented on our site.

(Thanks for the great component!)
Logged
smart
Administrator
Hero Member
*****

Karma: 163
Offline Offline

Gender: Male
Posts: 2161



WWW
« Reply #1 on: October 07, 2011, 20:19:58 »

The k2 JComments 1.1 is outdated... There is more fresh vesion - 1.2...
Logged

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

Karma: 0
Offline Offline

Posts: 1


« Reply #2 on: October 10, 2011, 08:32:38 »

Where can I find the 1.2 version?
Logged
smart
Administrator
Hero Member
*****

Karma: 163
Offline Offline

Gender: Male
Posts: 2161



WWW
« Reply #3 on: October 10, 2011, 14:46:45 »

Oh, sorry... I've forgot to update link on site... Now it has been updated... I have two sites: english and russian and sometimes I forget to update one of them
Logged

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

Karma: 0
Offline Offline

Posts: 2


Email
« Reply #4 on: December 27, 2011, 14:42:05 »

I too had been wondering as to why the K2 plugin did not return Jcomments count to item list views. Good to see that the fix has already been released which is altering the PHP code. Anyway, those of you who don’t want these issues and all are better off with version 1.2.
Logged

"Happy New year 2012"
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    ProofReader component    Bug-reports    Topic: K2 Plugin not returning JComments count to itemlist views.
 
Jump to: