colonelwog 1485 Modules Team
| Posté : 27-07-2009 11:39
un nouveau block basé sur celui des forums en action ,ce block affcihe les 10 derniers messages dans les forums et sous forums ...
<?php
global $prefix, $db, $sitename;
$sql = "SELECT t.forum_id, post_id ,post_subject F ROM phpbb_posts AS t, phpbb_forums AS f WHER E f.forum_id=t.forum_id ORDER BY post_time DESC L IMIT 10";
$result = sql_query($sql);
$content = "<br>";
while (list($forum_id, $post_id, $post_subject, $auth_vie w, $auth_read) = sql_fetch_row($result)) {
$forum_id = intval($forum_id);
$post_id = intval($post_id);
$post_subject = check_html($post_subject,&n bsp;"nohtml");
$content .= "<li><a href=\"fo rums/viewtopic.php?f=$forum_id&p=$post_id#p$post_id\" target=\"blank\" >$post_subject</a></li><br>";
}
$content .= "<br><center><a href=\"forums/\"&nb sp;target=\"blank\"><b>Forums</b></a><br><br>& lt;/center>";
sql_free_result($result);
?>
et si vous n'avez pas le block qui affcihe les 10 derniers forums utilisés avec le dernier message :
<?php
global $prefix, $db, $sitename;
$sql = "SELECT t.forum_id, topic_id, topic_title F ROM phpbb_topics AS t, phpbb_forums AS f WHE RE f.forum_id=t.forum_id ORDER BY topic_time DESC  ;LIMIT 10";
$result = sql_query($sql);
$content = "<br>";
while (list($forum_id, $topic_id,$topic_title, $auth_view,&nbs p;$auth_read) = sql_fetch_row($result)) {
$forum_id = intval($forum_id);
$topic_id = intval($topic_id);
$topic_title = check_html($topic_title,&nbs p;"nohtml");
$content .= "<li><a href=\"fo rums/viewtopic.php?f=$forum_id&t=$topic_id\" target=\"blank\">$ topic_title</a></li><br>";
}
$content .= "<br><center><a href=\"forums/\"&nb sp;target=\"blank\"><b>Forums</b></a><br><br>& lt;/center>";
sql_free_result($result);
?>
pour voir ce que cela donne direction :
HTTP://WWW.WAROFGENERALS.COM |  Profil E-mail www |
|