I was recently asked how to add a listing (such as the one on the right) of recent PHPBB posts to a website...here it is
As always, its easily customizable to suit your needs of what you want to display (in this case its just the subject as a link)
Regards
Bastien
<?
$sql = '';
$limit = 10; //default number of posts to show change it to show more or fewer recent posts
$path = 'phpbb2'; //default path to the phpbb folder in your site
//this assumes it is one deeper that this page
//change it to match your site's layout
// Connect to your database: Fill in the elements below
$db = mysql_connect("localhost", "user", "pass") or die("Unable to connect to mysql.".mysql_error());
//phpbb is the default phpbb db name, change it if it is not correct
mysql_select_db ("phpbb",$db) or die("Unable to select database".mysql_error());
// Select the info you need from your table.
$sql = "SELECT a. * , b.post_time
FROM phpbb_posts_text a, phpbb_posts b
WHERE a.post_id = b.post_id
ORDER BY post_time DESC
LIMIT $limit";
$result=mysql_query($sql) or die("Unable to select news.".mysql_error());
while($row = mysql_fetch_array($result)){
// echo out entry here
// column_name is the name of the column in the database
echo "Subject: <a href=\"$path/viewtopic.php?p=".$row['post_id']."#".$row['post_id']."\">".$row["post_subject"]."</a><br>";
}
// Now disconnect from the database.
mysql_close($db);
?>