ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Comment link not for zero comments

spektr 04 Dec, 2008
Hi,

Is it possible to show comments link only when there are actually some comments?

I guess that there is only one IF sentence missing or something?

Thanks
spektr 05 Dec, 2008
Max,

I change this in chronocomments.php file in plugins/content folder. I change this:

//end link
if (count($blogcomments)>0)
{
$language = '<br /><a href="'.$page_link.'#comments">'.JText::_( 'READ N COMMENTS' )."</a>";
$row->text = $row->text.str_replace("{n}", count($blogcomments), $language);
}
//return true;

I add an If sentence, and now there is no link when comments count is 0!

Further more. There are no more links on the top of page of newsfeeds,...

I hope this is correct!
Max_admin 05 Dec, 2008
Cool hack!🙂
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
spektr 06 Dec, 2008
I add an extra br here:

$language = '<br /><br /><a href="'.$page_link.'#comments">'.JText::_( 'READ N COMMENTS' )."</a>";

So between the text and comment link is a free line. But it only works If I'm logged in🙂
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com