ok open showthread.php and above
PHP Code:
if ($goto=="nextnewest") {
$thread = verifyid("thread",$threadid,1,1);
add
PHP Code:
// goto newest thread
if ($goto=="newthread") {
if (isset($forumid) and $forumid!=0) {
$foruminfo=verifyid("forum",$forumid,1,1);
$forumid=$foruminfo['forumid'];
$lastthread=$DB_site->fetch_array($DB_site->query("SELECT threadid FROM post WHERE username='$foruminfo[lastposter]' AND dateline='$foruminfo[lastpost]'"));
header("Location: showthread.php?s=$session[sessionhash]&threadid=$lastthread[threadid]");
exit;
}
}
now change the bit i told you to to
PHP Code:
<a href="showthread.php?s=$session[sessionhash]&goto=newthread&forumid=$forum[forumid]">$forum[lasttitle]</a>
sorry it took so long to reply, i thought vBulletin would have had a way to do this, but it didn't so i wrote one.