Salut DCZ,
Ca y est, j'y suis arrivé. Voici mon code final, si cela peut aider qq1

N'hésitez pas si vous avez des améliorations à me soumettre

- Code: Tout sélectionner
define('IN_PHPBB', TRUE);
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$user->setup('', $forum_data['forum_style']);
$title = /* contient la recherche */
$sql = "SELECT f.forum_id, f.forum_name, u.user_id, u.username, u.user_colour, t.topic_replies_real, t.topic_replies, t.topic_title, t.forum_id, t.topic_id, t.topic_last_post_time, t.topic_type, t.topic_last_post_id, f.forum_name, t.topic_last_poster_name
FROM ".TOPICS_TABLE." t
LEFT JOIN phpbb3_users u ON u.user_id = t.topic_poster
LEFT JOIN ".FORUMS_TABLE." f ON f.forum_id = t.forum_id
WHERE MATCH (t.topic_title) AGAINST('$title') > 4.7
GROUP BY t.topic_id
ORDER BY rand()
LIMIT 5";
$result = $db->sql_query($sql);
// Boucle d'affichage du post
echo '<ul>';
while($topic_data = $db->sql_fetchrow($result))
{
// Données du topic
$topic_title = $topic_data['topic_title'];
$topic_replies = $topic_data['topic_replies'];
$topic_replies_real = $topic_data['topic_replies_real'];
$forum_id = $topic_data['forum_id'];
$topic_id = $topic_data['topic_id'];
$post_time = $topic_data['topic_last_post_time'];
$forum_name = $topic_data['forum_name'];
$topic_last_post_id = $topic_data['topic_last_post_id'];
$topic_last_poster_name = $topic_data['topic_last_poster_name'];
$replies = ($auth->acl_get('m_approve', $forum_id)) ? $topic_replies_real : $topic_replies;
$start = floor(($replies) / $config['posts_per_page']) * $config['posts_per_page'];
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ( empty($phpbb_seo->seo_url['topic'][$topic_id]) ) {
if ($line[$i]['topic_type'] == POST_GLOBAL) {
$phpbb_seo->seo_opt['topic_type'][$topic_id] = POST_GLOBAL;
}
$phpbb_seo->seo_censored[$topic_id] = $topic_title;
$phpbb_seo->seo_url['topic'][$topic_id] = $phpbb_seo->format_url($phpbb_seo->seo_censored[$topic_id]);
}
if ( empty($phpbb_seo->seo_url['forum'][$forum_id]) ) {
$phpbb_seo->seo_url['forum'][$forum_id] = $phpbb_seo->set_url($line[$i]['forum_name'], $forum_id, $phpbb_seo->seo_static['forum']);
}
// www.phpBB-SEO.com SEO TOOLKIT END
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id . '&f=' . $forum_id . '&start=' . $start ) . '#p' . $topic_last_post_id;
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id . '&f=' . $forum_id );
//On affiche
$topic_title = utf8_decode($topic_title);
echo '<li><a href="'.$topic_url.'" title="'.$topic_title.'">'.ucfirst(strtolower($topic_title)).'</a></li>';
}
echo '</ul>';
$db->sql_freeresult($result);
unset($topic_data);