use this:
PHP Code:
<?php
error_reporting(7);
$templatesused = "home_reviews,home_mainpage";
chdir("/home/path/to/web/forum");
require("./global.php");
$reviews="1";
$reviewposts="3";
$newsql=$DB_site->query("SELECT * FROM thread WHERE forumid='$reviews' ORDER BY dateline DESC LIMIT $reviewposts");
while ($new=$DB_site->fetch_array($newsql)) {
$newthreadid=$new[threadid];
$newtitle=$new[title];
$getnewsql=$DB_site->query_first("SELECT * FROM post WHERE threadid='$newthreadid' ORDER BY postid ASC LIMIT 1");
$newtime=vbdate($timeformat,$new[dateline]);
$newdate=vbdate($dateformat,$new[dateline]);
$newpagetext=$new[pagetext];
$newpagetext=bbcodeparse($newpagetext);
eval("\$newthisweek .= \"".gettemplate('home_reviews')."\";");
}
eval("dooutput(\"".gettemplate('home_mainpage')."\");");
?>
this will call the first post only of a specific thread. the code is self explanatory.
NOTE: $reviews is the forum ID you want to pull the info from, and $reviewposts is the no. of posts you want to pull from.
in this way you can have a custom template to show where ever you want it in your website
you could also make the forum invisible so it will not show on the forums list. the script will still pull the info.
regards,
nakkid.