×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: mod_comment not linking to comments

mod_comment not linking to comments 14 years 5 months ago #7448

  • AnneMarie Adams
  • AnneMarie Adams's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
Hi,

I am using Joomla 1.5.14 and Yootheme Template Shuffle.

The mod_comments on my home page links back to the home page when an item is clicked:

www.giaengineering.co.uk/

Can anybody advise?

Thanks

mod_comment not linking to comments 14 years 5 months ago #7449

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
404Sef???

mod_comment not linking to comments 14 years 5 months ago #7450

  • AnneMarie Adams
  • AnneMarie Adams's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
Yes I am using SH404SEF - is that the problem?

mod_comment not linking to comments 14 years 5 months ago #7451

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081

mod_comment not linking to comments 14 years 5 months ago #7452

  • AnneMarie Adams
  • AnneMarie Adams's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
Thanks but its a bit over my head. When I look at line 194 in that php file the information is as follows:

if (substr(ltrim($url),0,7)!='http://') {

Can you tell me what to change.... do I need to add all of this...

function linkToContent($contentId, $commentId='', $joscclean=false, $admin=false, $dbg=false) {
$appl =& JFactory::getApplication();

if ($appl->scope == 'mod_comments') {
$mod_data = $this->getCatSecAliasMod($contentId);
$this->_route_catid = $mod_data->catid;
$this->_route_sectionid = $mod_data->sectionid;
//$contentId = $contentId . '-' . $mod_data->alias;
}

Do I delete out the existing info on that line?

Sorry to be a pain, I don't understand code :blush:

Thanks

mod_comment not linking to comments 14 years 5 months ago #7453

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
you have this:
$contentId = $contentId . '-' . $mod_data->alias;

change it to
//$contentId = $contentId . '-' . $mod_data->alias;

mod_comment not linking to comments 14 years 5 months ago #7454

  • AnneMarie Adams
  • AnneMarie Adams's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
Thanks!! It's working!!!!!! :cheer:

mod_comment not linking to comments 14 years 5 months ago #7459

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Should we update the module with that code Daniel? Or will that code hack only work if the user has sh404SEF enabled?

mod_comment not linking to comments 14 years 5 months ago #7461

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
WEll, as far as I can remember this code was working great without 404sef. But I'm sure there is a way to make this work with 404sef and without, but I still don't know what.

P.S. And you don't have to update the module - this is the linkToContent function in the plugin.

mod_comment not linking to comments 14 years 3 months ago #8297

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Ok guys,
I finally found out how to write a good link both for joomla and 404sef and perhaps for all other sef components :)
Instead of commenting out the line
$contentId = $contentId . '-' . $mod_data->alias;
It should change to
$contentId = $contentId . ':' . $mod_data->alias;
This so far I can see generates good sef urls.
Any feedback is appreciated!
  • Page:
  • 1
Time to create page: 0.115 seconds