Updated to Ver 2.0 'no_comments_text' adding )

Support forum dedicated to free and advanced Joomla content presentation module with various layout options and data sources support.
GK User
Mon Oct 18, 2010 11:44 am
I've Updated to Ver 2.0 and after the 'no_comments_text' the scripts add a ')'
how i can fix it?
thanks in advance
luke


website: http://www.burroefarina.it
User avatar
Senior Boarder

GK User
Mon Oct 18, 2010 11:51 am
you're right - problems occurs only with K2 articles. To fix it please change file layout.parts.php fragment:

Code: Select all
if($config['no_comments_text'] && (!isset($comments['art'.$news_id]) || $comments['art'.$news_id] == 0)){
                $comments_amount = JText::_('NO_COMMENTS');
            } else {
                $comments_amount = JText::_('COMMENTS').' ('.(isset($comments['art'.$news_id]) ? $comments['art'.$news_id] : '0' );
            }
            $info_comments = '<a class="nsp_comments" href="'.urldecode(JRoute::_(K2HelperRoute::getItemRoute($news_id.':'.urlencode($news_alias), $news_cid.':'.urlencode($news_cat_alias)))).'#itemCommentsAnchor">'.$comments_amount.')</a>';


to:

Code: Select all
if($config['no_comments_text'] && (!isset($comments['art'.$news_id]) || $comments['art'.$news_id] == 0)){
                $comments_amount = JText::_('NO_COMMENTS');
            } else {
                $comments_amount = JText::_('COMMENTS').' ('.(isset($comments['art'.$news_id]) ? $comments['art'.$news_id] : '0' ) . ')';
            }
            $info_comments = '<a class="nsp_comments" href="'.urldecode(JRoute::_(K2HelperRoute::getItemRoute($news_id.':'.urlencode($news_alias), $news_cid.':'.urlencode($news_cat_alias)))).'#itemCommentsAnchor">'.$comments_amount.'</a>';
User avatar
Administrator

GK User
Mon Oct 18, 2010 12:00 pm
great!!!
now it works fine...
thank for so quick reply!!!

luke :)
User avatar
Senior Boarder


cron