PHP Code:
$vbulletin->input->clean_array_gpc('r', array(
'perpage' => TYPE_INT,
'page' => TYPE_INT
));
// $TOTALNUMBEROFROWS = total number of rows you have. Probably obtain this from a query and assign $db->num_rows($query) to this.
// $NOOFRESULTSPERPAGE = how many results you want per page. eg. 10 per page or 20 per page.
$perpage = $NOOFRESULTSPERPAGE;
$pagenumber = $vbulletin->GPC['page'];
$pagecount = ceil($TOTALNUMBEROFROWS / $perpage);
$pagenumber = iif(!is_numeric($pagenumber) OR $pagenumber < 1 OR $pagenumber > $pagecount, 1, $pagenumber);
$offset = ($pagenumber-1) * $perpage;
if(empty($vbulletin->GPC['page']))
$page = 1;
else
$page = $vbulletin->GPC['page'];
$pagenav = construct_page_nav($page, $perpage, $TOTALNUMBEROFROWS, "yourpage.php","");
Then in your main query which will limit results, use this as the LIMIT condition.
PHP Code:
LIMIT $offset,$perpage
Now place $pagenav in your template wherever you want it to show.
Hope this helps. It's how I do it at least.