if ($mod_options['portal_threads_maxthreads']) {
/////PAGINATION By Felixthekat//////////// $perpage = 10; $itemcount = $db->query_first("SELECT count(thread.threadid) as itemcount FROM " . TABLE_PREFIX . "thread as thread $rthread_join WHERE open != 10 AND thread.visible = 1 " . iif($mod_options['portal_threads_cutoffdate'], 'AND thread.lastpost > ' . (TIMENOW - $mod_options['portal_threads_cutoffdate'] * 86400) ) . iif($ignusers, ' AND thread.postuserid NOT IN(' . $ignusers . ')' ) . "$vba_threads_condition"); $pagenumber = $vbulletin->input->clean_gpc('r', 'pagenumber', TYPE_UINT); sanitize_pageresults($itemcount['itemcount'], $pagenumber, $perpage,$perpage,$perpage); $limitlower = ($pagenumber - 1) * $perpage + 1; $limitupper = $pagenumber * $perpage; if ($limitupper > $itemcount['itemcount']) { $limitupper = $itemcount['itemcount']; if ($limitlower > $itemcount['itemcount']) { $limitlower = $itemcount['itemcount'] - $perpage; }} if ($limitlower <= 0) { $limitlower = 1; } $pagenav = construct_page_nav($pagenumber, $perpage, $itemcount['itemcount'], 'index.php?'); /////////////////////////////////
LIMIT $mod_options[portal_threads_maxthreads]
LIMIT " . ($limitlower - 1) . ", $perpage
<tr> <td> $pagenav </td> </tr>
Screenshots
RecentThreadPag.jpg (87.1 KB, 0 views)
Show Your Support