$recentforumget = 5; // Number of posts to get
$recentforumlength = 30; // Length of title to display before cutting off
$forumexclude = ""; // Add forum id's to exclude from get (eg private ones) sepetate by a comma
$getposts = query("SELECT tid,title,forum_id FROM ".$ibf_prefix."topics WHERE (state <> 'link')".iif($forumexclude," AND (forum_id NOT IN ($forumexclude))")." ORDER BY last_post DESC LIMIT $recentforumget");
while ($post = fetch_array($getposts)) {
$post[short_title] = iif(strlen($post[title]) > $recentforumlength,substr($post[title],0,$recentforumlength)."...",$post[title]);
$post[full_title] = $post[title];
$recentforumposts .= "<a href=\"$forumpath/index.php?act=ST&f=$post[forum_id]&t=$post[tid]\" title=\"$post[full_title]\">$post[short_title]</a><br />\n";
}