不好意思 忘記說明 改 forumdisplay.php
$query = $db->query("SELECT t.* FROM {$tablepre}threads t
WHERE t.fid='$fid' $filteradd AND $displayorderadd
ORDER BY t.displayorder DESC, t.$orderby $ascdesc
LIMIT ".($filterbool ? $start_limit : $start_limit - $stickycount).", $tpp");
if ($start_limit < ($stickycount - $start_limit < $tpp ? $stickycount - $start_limit : $tpp)) {
$querysticky = $db->query("SELECT t.* FROM {$tablepre}threads t
WHERE t.tid IN ($stickytids) AND t.displayorder IN (2, 3)
ORDER BY displayorder DESC, $orderby $ascdesc
LIMIT $start_limit, ".($stickycount - $start_limit < $tpp ? $stickycount - $start_limit : $tpp));
}