This should do the trick for you.
Not tested too heavily as usual (but works on the only board I have that has threads of that size...) , and since it is an extra request it might have a slight impact on the speed
Go to viewtopic.php and find around line 123:
if ($is_admmod)
$post_link .= ' / <a href="post.php?tid='.$id.'">'.$lang_topic['Post reply'].'</a>';
}
After this, add
//Determine the total number of posts in this topic
$result = $db->query('SELECT count(*) as CT FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id) or error('Unable to fetch post count', __FILE__, __LINE__, $db->error());
$cur_post = $db->fetch_assoc($result);
if($cur_post['CT'] <= ($pun_user['disp_posts'] + 2)) $pun_user['disp_posts'] = $cur_post['CT'];
Now, if you also want to get rid of the post counts in viewforum.php, then go to line 264 (ca.)
Replace this
$num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']);
with this
if(($cur_topic['num_replies'] + 1) <= ($pun_user['disp_posts'] + 2)) $num_pages_topic = 1;
else $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']);
The German PunBB Site:
PunBB-forum.de