How pagination should work perfectly

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon Jul 21, 2014 8:45 am
Reply with quote
Report this post
I would like your help on a problem.
The results of the pagination function properly only to the 7th page
From page 1 to 7 and everything works fine. After the 7th page numbers disappear and appear only previous - next
User avatar
Fresh Boarder

teitbite
Wed Jul 23, 2014 10:08 am
Reply with quote
Report this post
Hi

Please show me a page with an example.
User avatar
Moderator

teitbite
Thu Jul 24, 2014 11:46 am
Reply with quote
Report this post
Hi

For start please tell me if You are using sh404sef. Disable it please and see if this makes a difference.

Second test is to rename /html/pagination.php file to /html/_pagination.php

Please let me know if one of this worked.
User avatar
Moderator

GK User
Thu Jul 24, 2014 12:10 pm
Reply with quote
Report this post
I do not use sh404sef.

I made the change you told me about the name change and the layout worked normally but lost the formatting appearance
User avatar
Fresh Boarder

teitbite
Fri Jul 25, 2014 2:52 pm
Reply with quote
Report this post
Hi

Please send me an access to ftp. I need to work with code to fix the problem.
User avatar
Moderator

teitbite
Tue Jul 29, 2014 12:19 pm
Reply with quote
Report this post
Hi

I have checked the issue and looks like the problem is with joomla wrongly recognises which page is selected a the moment. Since it's a joomla functionality we cannot change I have used a method from joomla default files and just made sure it will use template style. So basicaly I have replaced this:

Code: Select all
   if(count($list['pages']) >= 7) {
      $founded = false;
      
      for($i = 1; $i <= count($list['pages']); $i++) {
         if($list['pages'][$i]['active'] != 1) {
            $founded = $i;
            break;
         }
      }

      for($i = 1; $i <= count($list['pages']); $i++) {
         if($i == 1 && $founded > $i + 2) {
            $html .= '<li><span>&hellip;</span></li>';
         }
         
         if($i == count($list['pages']) && $founded < $i - 2) {
            $html .= '<li><span>&hellip;</span></li>';
         }
         
         if($i >= $founded - 2 && $i <= $founded + 2) {
            $html .= '<li>'.$list['pages'][$i]['data'].'</li>';
         }
      }
   } else {
      for($i = 1; $i <= count($list['pages']); $i++) {
         $html .= '<li>'.$list['pages'][$i]['data'].'</li>';
      }
   }(



with this:

Code: Select all
      for($i = 1; $i <= count($list['pages']); $i++) {
         $html .= '<li>'.$list['pages'][$i]['data'].'</li>';
      }
User avatar
Moderator

GK User
Tue Jul 29, 2014 4:08 pm
Reply with quote
Report this post
Thank you very much for your time my friend !!!!!!!!!!!!!!!!!!!!
User avatar
Fresh Boarder

teitbite
Wed Jul 30, 2014 5:32 pm
Reply with quote
Report this post
Hi

No problem. Glad I could help :)
User avatar
Moderator


cron