We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Bystrom Pagination Extension (EE 2.0 beta available)

Development and Programming

mhulse's avatar
mhulse
329 posts
15 years ago
mhulse's avatar mhulse

Hy Michael!

Thanks again for this great extension!

If it helps you test, I am on:

  • ExpressionEngine v 1.6.8
  • PHP Version 5.2.5

Thanks again! Cheers, Micky

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
15 years ago
Matt Weinberg's avatar Matt Weinberg

Hi all,

A fix to the error is to change line 58 to:

$count = (isset($query->num_rows)) ? $query->num_rows: false;

-Matt

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
15 years ago
Matt Weinberg's avatar Matt Weinberg

Michael,

I love this extension but believe I found a bug if the weblog entries tag has an offset. My tag has offset=1, limit=1, and the weblog has 4 entries.

Given that, without an offset there should be 4 pages, but with my offset of one there should only be 3 pages.

With your extension disabled, EE pagination gives 3 pages. With your extension on the pagination links show a 4th page. Navigating to this page comes up with blank results.

Hopefully that was all clear. Thanks again for the great extension.

-Matt

       
Michael Byström's avatar
Michael Byström
23 posts
15 years ago
Michael Byström's avatar Michael Byström

Hi hello all,

I’ve made som fixes on this little extension today. I can still not reproduce the “line 58” error but I’ve made changes to it from this forum so if there is still problem let me know. Changed the deprecated “ereg” in PHP 5.3 Fixed the “offset” bug.

New demo place: http://ee.michaelbystrom.com/bystrom_pagination/

Download: http://michaelbystrom.com/download/ee/

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
15 years ago
Matt Weinberg's avatar Matt Weinberg

Michael,

Thanks for doing that.

This new build introduces a problem where pagination doesn’t work if dynamic=”off”. No pagination shows up at all. That wasn’t the case in the old version.

Can you take a look?

Thanks, Matt

       
Michael Byström's avatar
Michael Byström
23 posts
15 years ago
Michael Byström's avatar Michael Byström

Hello,

Are u sure that worked before it shouldn’t! Pagination doesn’t work if it is set to dynamic=“off” unless you hack EE. or i’m wrong?

-Michael

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
15 years ago
Matt Weinberg's avatar Matt Weinberg

It definitely did work before. Pagination works with dynamic=off as long as you explicitly set the paginate= parameter.

Thanks, Matt

       
Michael Byström's avatar
Michael Byström
23 posts
15 years ago
Michael Byström's avatar Michael Byström

Hej,

Oh way cool i did not know aboout the paginate tag cool. Well I set it up as you described and it works fine on my server.

http://ee.michaelbystrom.com/bystrom_pagination

Is that what you mean or? Let me know

Cheers! -Michael

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
15 years ago
Matt Weinberg's avatar Matt Weinberg

Is that a weblog:entries tag, with dynamic=”off”? On mine it doesn’t work. I have an offset=”1”, dynamic=”off”, and paginate=”both”.

       
Michael Byström's avatar
Michael Byström
23 posts
15 years ago
Michael Byström's avatar Michael Byström

Ok I set it up the same way and it looks funny with paginate=”both”. I included the source in the examples now so you can see.

I’ve re-set it to paginate=”bottom” so it works. I will look in to it little later!

-Micke

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
15 years ago
Matt Weinberg's avatar Matt Weinberg

I investigated this a bit more. I noticed that I could go through all the pages once, but when I tried to go through them again they disappeared. Clearing the cache fixed it.

Looking into it more fully, if “Cache Dynamic Stack Queries?” is turned off in Global Weblog preferences, the problem is fixed. It turns out to have nothing to do with dynamic=”off”, and I apologize for that. (FYI this setting is the $conf[‘enable_sql_caching’] config variable).

I’m not sure why having that option on would do anything. It doesn’t affect the last version.

       
Michael Byström's avatar
Michael Byström
23 posts
15 years ago
Michael Byström's avatar Michael Byström

Nice! glad it works again for you, and thanks for letting me know so I woulden’t go crazy here 😊 I also found that paginate=“both” does not look funny a simple error in my CSS file.

Stay warm and good luck! -Michael

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
15 years ago
Matt Weinberg's avatar Matt Weinberg

Michael– do you have any ideas on getting this thing to work with caching still on? And thanks again for your help here.

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
15 years ago
Matt Weinberg's avatar Matt Weinberg

And obviously if not, I completely understand. This extension is invaluable and I appreciate all the work you’ve put into it.

       
Michael Byström's avatar
Michael Byström
23 posts
15 years ago
Michael Byström's avatar Michael Byström

Hehe no problem! I like to tinker with this when there is time. 😊

I took a peek at this “enable_sql_caching” is called and saved after the pagination is called. But I’n not sure thats the case. I’ll take a look at this a little later got some stuff needs to be done before x-mas holidays.

Cheers! -Michael

       
1 2 3

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.