$commessag = 8;
define('PHPEXT', 'php');
define('ROOT', 'forum/');
define('FORUM', TRUE);
include(ROOT . 'main/start.' . PHPEXT);
$user->get_session('');
?>
ensuite tu ajoute ton titre, ancres, blabla explicatif, etc.
<?php if ($user->is_logged()) { echo "Vous êtes connectés sur le forum en tant que ".$user->data['u_nickname'].'</a>'; } else { echo "Vous n'êtes pas connecté sur le forum"; } ?>.</p>
<?php
global $cfg, $db, $lg, $tpl, $user, $portail_config;
$f_idx = get_forums_idx(array('ga_view', 'ga_view_topics', 'ga_read'));
if ($f_idx)
{
$f_idx = implode(', ', $f_idx);
$sql = 'SELECT t.t_title, t.t_last_p_id, t.t_last_p_time, u.u_id, u.u_nickname, u.u_color, t.t_total_view, t.t_total_post
FROM ' . SQL_PREFIX . 'topics t
LEFT JOIN ' . SQL_PREFIX . 'users u
ON t.t_last_u_id = u.u_id
WHERE t.f_id IN (' . $f_idx . ')
AND t.t_approve = ' . IS_APPROVED . '
ORDER BY t.t_last_p_time DESC
LIMIT ' . $commessag;
$result = $db->query($sql);
while ($row = $db->row($result))
{
$row['t_title'] = mb_convert_encoding($row['t_title'], "UTF-8", "ISO-8859-1");
$ligne = '<div class="news"><h3 class="newsindex"><img src="images/pointde.gif" alt="{Forum} ?>}" title="Forum" /> ' . print_date($row['t_last_p_time']) . ': ' . htmlspecialchars($row['t_title']) . ' <span class="dequi">(<a href="' . sid(ROOT . 'index.' . PHPEXT . '?p=topic&p_id=' . $row['t_last_p_id']) . '#' . $row['t_last_p_id'] . '" title="'.$lang_f["lire"] . ' ' . htmlspecialchars($row['t_title']) . '">' . $lang_f['lire'] . '</a>)</span><br />
<span class="dequi">[' . $lang_f['postepar'].': <a href="forum/index.php?p=userprofile&id='.$row['u_id'].'">'.$row['u_nickname'].'</a>' . ', '.$lang_n["vu"]." ".$row['t_total_view']." ".$lang_n["fois"] . ', ' . $row['t_total_post'] . ' ' . $lang_f["combmes"].']</span></h3></div>';
echo $ligne;
}
$db->free($result);
}
?>
Après, tu modifie $ligne selon ce que tu veux faire, et tu mets $commessag = 5 si tu veux que 5 messages.
Midori.