After restoring back to an original showthread.php file for VB 4.2.4 instead of the edits above instead do this edit-
Go to line 1356. after the { hit enter a few times for some blank lines.
Paste this code into the middle of the blank lines, save, and try again. I haven't tested it but I have a feeling it may work. Worst case you restore back to the original showthread.php file, it won't hurt anything.
PHP Code:
$FIRSTPOSTID = $curpostid;
$LASTPOSTID = $curpostid;
// sort out which posts to cache:
if (!$vbulletin->options['threaded_maxcache'])
{
$vbulletin->options['threaded_maxcache'] = 999999;
}
// cache $vbulletin->options['threaded_maxcache'] posts
// take 0.25 from above $curpostid
// and take 0.75 below
if (sizeof($postorder) <= $vbulletin->options['threaded_maxcache']) // cache all, thread is too small!
{
$startat = 0;
}
else
{
if (($curpostidkey + ($vbulletin->options['threaded_maxcache'] * 0.75)) > sizeof($postorder))
{
$startat = sizeof($postorder) - $vbulletin->options['threaded_maxcache'];
}
else if (($curpostidkey - ($vbulletin->options['threaded_maxcache'] * 0.25)) < 0)
{
$startat = 0;
}
else
{
$startat = intval($curpostidkey - ($vbulletin->options['threaded_maxcache'] * 0.25));
}
}
unset($curpostidkey);
foreach ($postorder AS $postkey => $pid)
{
if ($postkey > ($startat + $vbulletin->options['threaded_maxcache'])) // got enough entries now
{
break;
}
if ($postkey >= $startat AND empty($morereplies["$pid"]))
{
$cache_postids .= ',' . $pid;
}
}
// get next/previous posts for each post in the list
// key: NAVJS[postid][0] = prev post, [1] = next post
$NAVJS = array();
$prevpostid = 0;
foreach ($postorder AS $pid)
{
$NAVJS["$pid"][0] = $prevpostid;
$NAVJS["$prevpostid"][1] = $pid;
$prevpostid = $pid;
}
$NAVJS["$toppostid"][0] = $pid; //prev button for first post
$NAVJS["$pid"][1] = $toppostid; //next button for last post
$navjs = '';
foreach ($NAVJS AS $pid => $info)
{
$navjs .= "pn[$pid] = \"$info[0],$info[1]\";\n";
}
}
unset($ipostarray, $postparent, $postorder, $NAVJS, $postid, $info, $prevpostid, $postkey);
(The above is code from threaded mode that I believe makes the next/previous links work.)