Question on Comments link in News Show Pro GK4

GK User
Thu Sep 02, 2010 11:37 am
Hi, all my articles are in K2 and I use Jcomments
I want to show in homepage the link Comments under the articles so I added %COMMENTS in the module parameters... now I have the link Comments (0) and the counter doesn't work

if I enter in the article there is the link Comments (1)

For me is not important to have the counter in home.
Only the link 'Comments' it would be right

How can I fix the counter in home or delete it?

thanks for your support

my site: http://lnx.coldplayzone.it
article you can see: http://lnx.coldplayzone.it/index.php?op ... Itemid=139
User avatar
Expert Boarder

teitbite
Thu Sep 02, 2010 7:54 pm
Hi

I have no idea. Will need to check the code of that. Have I got ftp login acces to Your site ?
User avatar
Moderator

GK User
Thu Sep 02, 2010 8:25 pm
ftp data just sent to your email
thanks
User avatar
Expert Boarder

teitbite
Fri Sep 03, 2010 6:57 pm
Hi

I've done it by hacking file templates/gk_partyfreak/htlp/mod_news_pro_gk_4/layout.parts.php

lines 350 and 372 from:

Code: Select all
            $info_comments = '<a class="nsp_comments" href="'.urldecode(JRoute::_(K2HelperRoute::getItemRoute($news_id.':'.urlencode($news_alias), $news_cid.':'.urlencode($news_cat_alias)))).'#itemCommentsAnchor">'.JText::_('COMMENTS').' ('.(isset($comments['art'.$news_id]) ? $comments['art'.$news_id] : '0' ).')</a>';


to

Code: Select all
            $info_comments = '<a class="nsp_comments" href="'.urldecode(JRoute::_(K2HelperRoute::getItemRoute($news_id.':'.urlencode($news_alias), $news_cid.':'.urlencode($news_cat_alias)))).'#itemCommentsAnchor">'.JText::_('COMMENTS').'</a>';// ('.(isset($comments['art'.$news_id]) ? $comments['art'.$news_id] : '0' ).')</a>';
User avatar
Moderator

GK User
Fri Sep 03, 2010 8:10 pm
thank you so much!
User avatar
Expert Boarder

GK User
Mon Sep 06, 2010 8:25 am
teitbite please don't kill me... maybe it's better if the number of comments appears in homepage too

Comments (number-of-comments)

Is it possible?

thanks for your support
User avatar
Expert Boarder

teitbite
Mon Sep 06, 2010 6:08 pm
Hi

I've found a bug in NSP4. There is:

Code: Select all
$this->content['comments']


should be

Code: Select all
$this->content['comments'][$i]


in module at helper.php

Unfortunately I cannot se an article which has a comments to check it ;/
User avatar
Moderator

GK User
Mon Sep 06, 2010 6:43 pm
I added [$i] at line 161 in helper.php but it doesn't work..

here is a news with 2 comments inside
http://lnx.coldplayzone.it/index.php?op ... Itemid=139

you can find it in homepage too

you need to login to see comments
User avatar
Expert Boarder


cron