- The phpbbhacks website calls this mod Recent posts on index revision 1.0.3, but the comments in the code itself call it "Integrated Toplist 1.0.3". It adds a section to the index page listing the five (by default) most recently-replied-to topics.
I couldn't find anything on here about how to patch this mod so I am posting my procedure for the general good
These instructions assume you have already applied the advanced rewrite mod and the recent posts on index mod.
Files to edit: index.php
- Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------
#
$topic_url = append_sid("viewtopic.$phpEx?t=" . $rows['topic_id']);
$forum_url = append_sid("viewforum.$phpEx?f=" . $rows['forum_id']);
#
#-----[ REPLACE WITH ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
// Following 2 lines moved below
// $topic_url = append_sid("viewtopic.$phpEx?t=" . $rows['topic_id']);
// $forum_url = append_sid("viewforum.$phpEx?f=" . $rows['forum_id']);
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ FIND ]------------------------------------------
#
$replier_name = ( $replier_id != ANONYMOUS ) ? $r_row['username'] : ( !$r_row['post_username'] ? $lang['Guest'] : $r_row['post_username']);
$replier_url = ( $replier_id != ANONYMOUS && !$r_row['post_username'] ) ? ('<a href="' . append_sid("profile.$phpEx?mode=viewprofile&u=$replier_id") . '" target="_top">' . "$replier_name</a>") : $replier_name;
#
#-----[ AFTER, ADD ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ( !isset($phpbb_seo->seo_url['forum'][$forum_id]) ) {
$phpbb_seo->seo_url['forum'][$rows['forum_id']] = $phpbb_seo->format_url($rows['forum_name'], $php$
}
if ( !isset($phpbb_seo->seo_url['topic'][$topic_id]) ) {
$phpbb_seo->seo_url['topic'][$rows['topic_id']] = $phpbb_seo->format_url($rows['topic_title'], $ph$
}
// Following 2 lines moved from above
$topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $rows['topic_id']);
$forum_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $rows['forum_id']);
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
It's only the viewforum and viewtopic URLs that need attention. The member profile and last post URLs it magically gets right anyway without need for any patching.
This works on my forum but it would be appreciated if someone could verify it... Not used to PHP, it's too high level and it melts my brain

English |
French
