| Code:
|
// How many posts to display
$PostNumber = "3";
// How many characters from the title to display (0 = show complete title)
$PostLength = "0";
$query = "SELECT *
FROM nuke_bbposts, nuke_users, nuke_bbtopics, nuke_bbforums
WHERE nuke_bbposts.topic_id=nuke_bbtopics.topic_id
AND nuke_bbposts.forum_id=nuke_bbforums.forum_id
AND nuke_bbposts.poster_id=nuke_users.user_id
AND nuke_bbforums.forum_id!=7
ORDER BY post_time DESC LIMIT $PostNumber";
$content .= "<br>";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)) {
$topic_title = stripslashes($row[topic_title]);
if($PostLength){
$topic_title = substr($topic_title, 0, $PostLength) . "...";
}
$content .= "<b>$row[forum_name]</b><br>";
$content .= "<a title=\"$row[topic_title]\" href=\"$urlPath/viewtopic.php?t=$row[topic_id]&sid=$row[forum_id]\">$topic_title</a> ";
$content .= "By: $row[username]<br>";
$content .= "<br>";
}
|