1
Draven
NewBB bug (Who thought of this?)
  • 2003/10/28 16:39

  • Draven

  • Module Developer

  • Posts: 337

  • Since: 2003/5/28


This is just a silly bug and is a design flaw. I just finished redoing a XOOPS site that has a very large user base and busy forums. In the viewforums.php file there's a section for "paginating" that adds "..." between every three pages. Well if a thread has 96 pages (as one of mine does) it adds 33 "..." and blows the page apart.

This:
if ( $totalpages ) {
        
$pagination .= '   .XOOPS_URL.'/images/icons/posticon.gif" /> ';
        for ( 
$i 1$i <= $totalpages$i++ ) {

            if ( 
$i && $i $totalpages ) {
                
$pagination .= "...";
            } else {
                
$addlink '&start='.(($i 1) * $forumdata['posts_per_page']);
                
$pagination .= '[.$topiclink.$addlink.'">'.$i.']';
            }
        }
    }


Should be:

if ( $totalpages ) {
        
$pagination .= '   .XOOPS_URL.'/images/icons/posticon.gif" /> ';
        
$setdots 0;
        for ( 
$i 1$i <= $totalpages$i++ ) {


                        
// Hacked by Draven
            
if ( $i && $i $totalpages) {
                if(
$setdots == 0){
                    
$pagination .= "...";
                    
$setdots 1
                }
                        
// -- End Hack
                
            
} else {
                
$addlink '&start='.(($i 1) * $forumdata['posts_per_page']);
                
$pagination .= '[.$topiclink.$addlink.'">'.$i.']';
            }
        }
    }


This isn't a beautiful fix, but it works.

Login

Who's Online

268 user(s) are online (148 user(s) are browsing Support Forums)


Members: 0


Guests: 268


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits