Advertisement:

Author Topic: Premium Ads Pagination Fixed... But Need Help With a Glitch  (Read 780 times)

richieboymx

  • Full Member
  • ***
  • Posts: 110
Premium Ads Pagination Fixed... But Need Help With a Glitch
« on: December 02, 2014, 11:50:08 pm »
Hi guys,

So user @lucianinski has come with a solution for the pagination numbers not being shown in the premium listings page (user menu). The credit is all to him.

In order to fix the pagination, you need to replace:

Code: [Select]
<?php for($i $i osc_list_total_pages() ; $i++) {
        if(
$i == osc_list_page()) {
            
printf('<a class="searchPaginationSelected" href="%s">%d</a>'osc_route_url('payment-user-menu-page', array('iPage' => $i)), ($i 1));
        } else {
            
printf('<a class="searchPaginationNonSelected" href="%s">%d</a>'osc_route_url('payment-user-menu-page', array('iPage' => $i)), ($i 1));
        }
    } 
?>

with:

Code: [Select]
<?php for($i $i $total_pages $i++) {
        if(
$i == $page) {
            
printf('<a class="searchPaginationSelected" href="%s">%d</a>'osc_route_url('payment-user-menu-page', array('iPage' => $i)), ($i 1));
        } else {
             
//$num = $i + 1;
             //printf('<a class="searchPaginationNonSelected" href="%s?iPage=">%d</a>', osc_route_url('payment-user-menu-page'), $i+1);
             
printf('<a class="searchPaginationNonSelected" href="%s?iPage='.$i.'">%d</a>'osc_route_url('payment-user-menu-page', array('iPage' => $i)), ($i 1));

}
    } 
?>

The only glitch with this fix is that if I click to go to page 5, the actual address is displayed as "menu?iPage=4"; same with other pages, there is always an inferior page on the address. Does anyone knows how to fix this fix to display proper page number on the address?

Thanks!