Info
- 5 posts
- 2 voices
- Started 4 years ago by HowToGeek
- Latest reply from HowToGeek
Possible to add paging to views?
-
- Posted 4 years ago #
Something my forum users have been complaining about is the lack of ability for paging on the various views, whether built-in ones or the extended ones available through the my-views plugin.
I've not yet looked into this, but I figured I'd drop a line here to see if somebody had already solved it (searched with no results)
-
- Posted 4 years ago #
Views do actually have (the ability to do) paging.
If you put /page/2 after a view url you think should have a second page you'll see it works.I vaguely remember encountering the same problem but I can't recall how I fixed it.
I believe the answer was something missing in the template but I am not positive and will see if I can find how I did it.
-
- Posted 4 years ago #
Okay I think everything broke with 0.8.3 and the replacement bb_query class.
Prior to 0.8.3, all views did a bb_count_last_query() to determine the entire result count vs. the query with a LIMIT. This is how pagination was determined (via $view_count / $page)
But the new bb_query_class is short-sighted as it simply returns the number of results it found with the LIMIT attached, which is useless.
This essentially is a bug. Surprised no-one noticed it sooner. I don't have 0.8.3 running on any large site so I never saw it before.
I'm trying to find a work-around for my own plugins (ie. "my-views") but this will affect any plugin developer working with views.
-
- Posted 4 years ago #
I have now updated "My-Views" to support pagination (multi-page) views for all the standard style views.
version 0.09 should be in the plugin browser shortly...
http://bbpress.org/plugins/topic/67you can see a demonstration of the feature here:
http://bbshowcase.org/forums/view/latest-discussions -
- Posted 4 years ago #
Sweet!
As usual, you rule.
-
You must log in to post.