Hi all, I was working with phppb for some two days now. and as u can see from my previous posts i was constantly bugging people for tips. anyway, as necessity is the mother of invention, i found a way out of the biggest draw back (for me, atleast) of phpbb. that is not showing the last post topic title in the forum index page. So let me share the mod with all those who want the last post topic title to be shown in forum index. Find in forum_root_folder/index.php default: $sql = "SELECT f.*, t.topic_id, t.topic_title, p.post_time, p.post_username, u.username, u.user_id FROM (( " . FORUMS_TABLE . " f LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id ) LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id ) ORDER BY f.cat_id, f.forum_order"; break; PHP: Replace with default: $sql = "SELECT f.*, t.topic_id, t.topic_title, p.post_time, p.post_username, u.username, u.user_id FROM ((( " . FORUMS_TABLE . " f LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id ) LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id ) LEFT JOIN " . TOPICS_TABLE. " t ON t.topic_id = p.topic_id) ORDER BY f.cat_id, f.forum_order"; break; PHP: Find if ( $forum_data[$j]['forum_last_post_id'] ) { $last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']); $last_post = $last_post_time . '<br />'; $last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> '; $last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>'; } PHP: Replace with if ( $forum_data[$j]['forum_last_post_id'] ) { $last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']); $last_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $forum_data[$j]['topic_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '" title="' . $forum_data[$j]['topic_title'] . '">' .$forum_data[$j]['topic_title']. '</a>' . '<br /> by '; $last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : $forum_data[$j]['username']; $last_post .= '<br />'. $last_post_time; } PHP: there is no need to edit the template file. Hope you enjoy it. You are free to use this, share this, but if you prefer to give someone a link to the mod, please give the link to this thread. Thankyou. Any doubt, just post here.
I had tested that one, but it uses a seperate sql query to fetch the title. why have a seperate query done when it can be done in the same query set?
Not bad...I added substr to the forum title so it doesn't break layout. http://www.360forum.com/forums/ for demo