Go Back   Pligg CMS Forum > Pligg Development > Pligg Templates > Template Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-03-2008, 11:43 PM
Koshin's Avatar
Casual Pligger
Pligg Version: 9.9.0
Pligg Template: Convergence v9.9.0
 
Join Date: Jan 2008
Posts: 34
Thanks: 1
Thanked 0 Times in 0 Posts
Pligg pagination HELP plz

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 $range1);
      
$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?
__________________
Da-African-Site -- gotto check it out.

Last edited by Koshin; 03-04-2008 at 12:13 AM..
Reply With Quote
  #2 (permalink)  
Old 03-04-2008, 12:00 AM
Koshin's Avatar
Casual Pligger
Pligg Version: 9.9.0
Pligg Template: Convergence v9.9.0
 
Join Date: Jan 2008
Posts: 34
Thanks: 1
Thanked 0 Times in 0 Posts
I have managed to add most of it, im missing PREVOUS, to show it at all time but to be deactive when they are on the first page just like pligg.
__________________
Da-African-Site -- gotto check it out.

Last edited by Koshin; 03-04-2008 at 12:08 AM..
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
No pagination with tag page in v9.8 deeplygreen Bug Report 12 07-31-2008 10:42 AM
Pagination is absent zeugman Bug Report 1 06-09-2008 11:03 PM
pagination argh2xxx Bug Report 1 03-19-2007 05:45 PM
Pagination bug still exists? revolver General Help 0 12-07-2006 02:43 PM


Search Engine Friendly URLs by vBSEO 3.2.0