Topic: Have all Last Post links point to Topic instead.
I'm sure this is a simple one for a lot of you guys, but not for me.
I want the change all last post links to point to the subject Topic instead, while maintaining the links appearance designating the date and time of the last post. I know the links will no longer point directly to the last post (instead, the top of the topic page), but I believe this to be a small but valid SEO advantage, because it eliminates duplicate URLs without losing your total number of internal links. phpBB has a mod that does just that.
I think, for the Index page last posts I need to change some stuff here, or maybe not.:
//$forums_info = $db->query('SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, id, forum_name FROM '.$db->prefix.'forums ORDER BY disp_position') or error(implode($db->error(),''),__FILE__,__LINE__,$db->error());
$forums_info = $db->query('SELECT f.num_topics, f.num_posts, f.parent_forum_id, f.last_post_id, f.last_poster, f.last_post, f.id, f.forum_name, p.poster_id as last_poster_id, t.subject FROM '.$db->prefix.'forums AS f LEFT JOIN '.$db->prefix.'posts AS p ON (p.id=f.last_post_id) LEFT JOIN '.$db->prefix.'topics AS t ON t.last_post_id=f.last_post_id ORDER BY disp_position') or error(implode($db->error(),''),__FILE__,__LINE__,$db->error());
while($current = $db->fetch_assoc($forums_info)) {
if ($current['parent_forum_id'] != 0)
{
$sfdb[$sfcount][0] = $current['parent_forum_id'];
$sfdb[$sfcount][1] = $current['num_topics'];
$sfdb[$sfcount][2] = $current['num_posts'];
$sfdb[$sfcount][3] = $current['last_post_id'];
$sfdb[$sfcount][4] = $current['last_poster'];
$sfdb[$sfcount][5] = $current['last_post'];
$sfdb[$sfcount][6] = $current['id'];
$sfdb[$sfcount][7] = $current['forum_name'];
$sfdb[$sfcount][8] = $current['last_poster_id'];
$sfdb[$sfcount][9] = $current['subject'];
$sfcount++;
}
}
What do I change to have the last post links point to the topic instead?
Thanks!