PDA

View Full Version : Bug with Multiple adopt pages


tahbikat
12-18-2015, 07:16 PM
Weird bug when there are many pages on the myadoptables page.
One of my members reported that once their My Adopts pages reached 9 or 10, they started getting a weird bug where if they tried clicking one of the pages (page 2 or 3 for example) it brings them to the first page instead of the page they wanted.

The "Next" and "Previous" buttons work fine.

I've also noticed this seems to be an issue for the Memberlist pages as well (on a different site that uses the script).

tahbikat
12-27-2015, 02:54 AM
Found the fix.

Go to the classes folder, and find class_pagination.php. Open it up and starting on line 71, replace this code:

elseif($this->getLastPage() >= 9){
if($page < 4) {
for ($counter = 1; $counter < 6; $counter++){
if ($counter == $page)
$pagination .= "<span class='current'>{$counter}</span>";
else
$pagination .= "<a href='{$this->website}{$this->symbol}page-{$counter}/'>{$counter}</a>";
}

with this code:

elseif($this->getLastPage() >= 9){
if($page < 4) {
for ($counter = 1; $counter < 6; $counter++){
if ($counter == $page)
$pagination .= "<span class='current'>{$counter}</span>";
else
$pagination .= "<a href='{$this->website}{$this->symbol}page-{$counter}'>{$counter}</a>";
}

There was simply a slash added where it shouldn't have been, since $symbol takes care of that already.

Abronsyth
12-27-2015, 11:38 AM
Ah, I was actually just about to post the fix for this, haha! I'm glad you found it :)