1. Yup - well, any language that can access your MySQL database
2. Yup - see above
It's pretty easy to do... Basically you just connect to the database, and perform a commnd to pull the info for the most recently posted on topics, then display that info.
3....
SELECT t.forum_id, t.topic_id, t.topic_title, t.topic_replies, u.user_id AS user2, u2.user_id AS id2, p2.post_time FROM phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_posts p2, phpbb_users u2 WHERE t.topic_poster = u.user_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id ORDER BY p2.post_time desc LIMIT 10
You can exclude certain areas (mods forum, test forum, etc.) with a statement like this one...
SELECT t.forum_id, t.topic_id, t.topic_title, t.topic_replies, u.user_id AS user2, u2.user_id AS id2, p2.post_time FROM phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_posts p2, phpbb_users u2 WHERE t.topic_poster = u.user_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id and t.forum_id != '25' ORDER BY p2.post_time desc LIMIT 10
Simply change "25" to the number of the forum you want to exclude.. If you want to add more, simply add another "and t.forum_id != 'insert number here'" to the request directly before "ORDER BY".
Just store that in a variable like...
$sql = 'pick one of the examples above';
And you can get the data like this...
$result=mysql_query($sql);
while (list($tfid, $tid, $subject, $replies, $tposter_id, $lposter_id, $dateline) = mysql_fetch_row($result)) {
$subject_long=stripslashes($subject);
if(strlen($subject) > 50) { // Limit title length to avoid wrap
$subject = stripslashes(substr($subject,0,47));
$subject .= "...";
}
$output->Text('<a title="'.stripslashes($subject_long).'" href="viewtopic. php?t='.$tid.'">'.stripslashes($subject).'</a> ('.$replies.' Replies) '.date("m.d.Y",($dateline + 10800)).'<br>'."\n");
}
- $result=mysql_query($sql);
- while (list($tfid, $tid, $subject, $replies, $tposter_id, $lposter_id, $dateline) = mysql_fetch_row($result)) {
- $subject_long=stripslashes($subject);
- if(strlen($subject) > 50) { // Limit title length to avoid wrap
- $subject = stripslashes(substr($subject,0,47));
- $subject .= "...";
- }
- $output->Text('<a title="'.stripslashes($subject_long).'" href="viewtopic. php?t='.$tid.'">'.stripslashes($subject).'</a> ('.$replies.' Replies) '.date("m.d.Y",($dateline + 10800)).'<br>'."\n");
- }
You'll need to remove the space from "viewtopic. php?t=", I had to put it in there so the forum's auto-URL-doohicky didn't modify it
