ok PPN... here it is what i did:
PHP Code:
$templatesused = "home_newthisweek";
chdir("/your/path/to/forum");
require("./global.php");
$newforum="1";
$newposts="3";
$newsql=$DB_site->query("SELECT * FROM thread WHERE forumid='$newforum' ORDER BY dateline DESC LIMIT $newposts");
while ($new=$DB_site->fetch_array($newsql)) {
$newthreadid=$new[threadid];
$newtitle=$new[title];
$newtime=vbdate($timeformat,$getnew[dateline]);
$newdate=vbdate($dateformat,$getnew[dateline]);
$getnewsql=$DB_site->query("SELECT * FROM post WHERE threadid='$newthreadid' ORDER BY postid ASC LIMIT 1");
while ($getnew=$DB_site->fetch_array($getnewsql)) {
$newpagetext=$getnew[pagetext];
$newpagetext=bbcodeparse($newpagetext);
eval("\$newthisweek = \"".gettemplate('home_newthisweek')."\";");
}
}
i went with the logic. this code should grab the title and content from forum 1 and display only the last 3 threads. for some reasons, it will show ony the latest thread, not the 3 of them. can you tell me why?