I'm using Jcomments together with K2. I've set it all up correctly and it works very nice
showing the latest comments. However! The link in the Latest Comments module which will send users to the comments and K2-article is NOT working properly.
When I press the link, I'm not sent to the article itself, as I should. Instead the article is loaded in the content area of the front page.
Try it out yourself at my site:
http://norshine.no. First open an article the normal way by chosing one at the frontpage (just scroll down a bit). Then go back to the frontpage and to the Latest Comments, which is located to the right where the module says "Siste kommentarer" (Norwegian) and press one of the comment links.
See my problem? How can I fix this? I've searched the PHP and found this code, which I believe has something to do with it:
function getContentLink(&$row)
{
global $mainframe, $Itemid;
if (JCOMMENTS_JVERSION == '1.5') {
require_once (JPATH_ROOT.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php');
$link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid)) . '#comments';
} else {
$compat = $mainframe->getCfg('itemid_compat');
if ( $compat == null ) {
// Joomla 1.0.12 or below
if ( $Itemid && $Itemid != 99999999 ) {
$_Itemid = $Itemid;
} else {
$_Itemid = $mainframe->getItemid( $row->id );
}
} else if ( (int) $compat > 0 && (int) $compat <= 11) {
// Joomla 1.0.13 or higher and Joomla 1.0.11 compability
$_Itemid = $mainframe->getItemid( $row->id, 0, 0 );
} else {
// Joomla 1.0.13 or higher and new Itemid algoritm
$_Itemid = $Itemid;
}
$link = sefRelToAbs( 'index.php?option=com_content&task=view&id='. $row->id .'&Itemid='. $_Itemid );
}
return $link;
}
Thanks in advance if someone wants to help me
