gette un petit coup d'oeil à ce script david ;)
Citation:<?php
/***************************************************************************
# Configuration #
****************************************************************************/
$nbr_sujets = 10; // Nombre de sujets à afficher
$url_phpbb = "./forum/"; // chemin vers le dossier PhpBB2 par rapport à la racine du site
$tz = 2; // Heure Locale = gmt + $tz (en France c gmt+1) +2 pour heure d' hiver
$format = 'd M Y H:i'; // Format de la date en php
$long_maxi = 50; // Longueurs maxi d'un titre de sujets (en caract.)
//-------------------------------------------------------------------------
require ("".$url_phpbb."/config.php");
$db = @mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("mysql : erreur a la connexion");
@mysql_select_db("$dbname",$db) or die("mysql : probleme de selection de base");
$table1 = $table_prefix.'topics';
$table2 = $table_prefix.'forums';
$table3 = $table_prefix.'posts';
$table4 = $table_prefix.'users';
$sql = "SELECT t1.topic_last_post_id, t1.forum_id, t1.topic_title, t1.topic_id, t1.topic_time, t2.forum_id, t2.auth_view, t2.auth_read, t3.post_id, t3.post_time,t4.username FROM $table1 t1, $table2 t2, $table3 t3, $table4 t4 WHERE t2.auth_view = '0' AND t2.auth_read = '0' AND t1.forum_id = t2.forum_id AND t3.post_id=t1.topic_last_post_id and t3.poster_id = t4.user_id ORDER BY t1.topic_last_post_id DESC LIMIT $nbr_sujets";
if($r = mysql_query($sql, $db)) {
while($m = mysql_fetch_array($r)) {
$m[topic_title] = stripslashes($m[topic_title]);
$m[topic_title] = substr($m[topic_title], 0, $long_maxi);
$post_date = @gmdate($format, $m[post_time] + (3600 * $tz));
$poster = stripslashes($m[username]);
echo "<a href=\"$url_phpbb/viewtopic.php?t=$m[topic_id]\" target=_blank><b><font FACE=\"Verdana\" color=\"#FFFF00\" size=\"1\">$m[topic_title]</font></b> </a>";
echo "<font FACE=\"Verdana\" color=\"#FFFFFF\" size=\"1\"> le $post_date par $poster</font><br />";
}
}
?>
il devrait etre plus complet que l'actuel que tu utilise ;)