Hi guys,
I wanted to use the pagination used on coolwater template on non-pligg website but the other theme is completely PHP based, not tpl, so how do i get the pagination used on coolwater to work on php fusion themes?
currently im using...
PHP Code:
// Universal page pagination function by CrappoMan
function makepagenav($start,$count,$total,$range=0,$link=""){
global $locale;
if ($link == "") $link = FUSION_SELF."?";
$res="";
$pg_cnt=ceil($total / $count);
if ($pg_cnt > 1) {
$idx_back = $start - $count;
$idx_next = $start + $count;
$cur_page=ceil(($start + 1) / $count);
$res.="<div class='pagination'>";
if ($idx_back >= 0) {
$res.="<a class='pagination' href='$link"."rowstart=$idx_back'>Previous</a>\n";
if ($cur_page > ($range + 1)) $res.="<a class='pagination' href='$link"."rowstart=0'>1</a>...\n";
}
$idx_fst=max($cur_page - $range, 1);
$idx_lst=min($cur_page + $range, $pg_cnt);
if ($range==0) {
$idx_fst = 1;
$idx_lst=$pg_cnt;
}
for($i=$idx_fst;$i<=$idx_lst;$i++) {
$offset_page=($i - 1) * $count;
if ($i==$cur_page) {
$res.="<span class='current'><b>$i</b></span>\n";
} else {
$res.="<a class='pagination' href='$link"."rowstart=$offset_page'>$i</a>\n";
}
}
if ($idx_next < $total) {
if ($cur_page < ($pg_cnt - $range)) $res.="... <a class='pagination' href='$link"."rowstart=".($pg_cnt-1)*$count."'>".$pg_cnt."</a>\n";
$res.="<a class='pagination' href='$link"."rowstart=$idx_next'>Next</a>\n";
}
$res.="</div>";
}
return $res;
}
how do i replace that with coolwater style pagination?