1. aceofspades21
  2. General Talk
  3. Thursday, 19 February 2009
  4.  Subscribe via email
Whenever I click a comment link in the latest comments module, it will display the article inside my frontpage. Is there something I can do to prevent this? I want the article to appear on its own. When clicking "Read more" on the front page article it properly displays the single article with the correct Itemid. If I could somehow remove the "Itemid=1" from the latest comment module links it would also solve this problem. How can I do this?


Edit:

Alright I figured out a workaround. I was trying to guess which portions of code to delete in the mod_comments.class.php by trial and error but nothing seemed to work. Instead I added a new line to manipulate the $link string.

Original code:
				$link = $comObject->linkToContent($post->_item['contentid'], $post->_item['id'], true);


Code with new line added:
				$link = $comObject->linkToContent($post->_item['contentid'], $post->_item['id'], true);
$link = str_ireplace("Itemid=1","",$link);




Just to clarify, links from the module used to look like this by default:
http://www.MYSITE.com/joomla/index.php?option=com_content&view=article&id=103&joscclean=1&comment_id=37&Itemid=1#josc37


Now they look like this:
http://www.MYSITE.com/joomla/index.php?option=com_content&view=article&id=103&joscclean=1&comment_id=37&#josc37


I hope this helps someone else in the future.
Responses (0)


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Last questions

Questions on new installation...
Working on getting this set up... https://eastend2024.joepolecheck.com/rumma...
3 Replies
Posted on Wednesday, 17 April 2024
  • Resolved
  • New
  • Changes to the Submission form
    Can you make changes to the Submission form? There are a few fields I'd like to ...
    0 Replies
    Posted on Thursday, 18 April 2024
  • New
  • Error received? Class "XMLReader" not fo
    Just installed the Pro version of Hotspots, but am getting an error when I try t...
    1 Replies
    Posted on Wednesday, 17 April 2024
  • Resolved
  • New
  • Links aus Veranstaltungsübersicht funktionieren ni
    Nach der Migration von Joomla 3.10 auf Joomla 5.0.3 treten folgende Probleme auf...
    2 Replies
    Posted on Monday, 08 April 2024
    Custom Hotspot Marker fails to load
    I just updated from Joomla 3 to Joomla 4.3.4 and Hotspots 6.0.12. I decided to e...
    0 Replies
    Posted on Tuesday, 09 April 2024