Skip to:
Content
Pages
Categories
Search
Top
Bottom

Possible to add paging to views?


  • HowToGeek
    Member

    @howtogeek

    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)

Viewing 4 replies - 1 through 4 (of 4 total)

  • _ck_
    Participant

    @_ck_

    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.


    _ck_
    Participant

    @_ck_

    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.


    _ck_
    Participant

    @_ck_

    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/67

    you can see a demonstration of the feature here:

    http://bbshowcase.org/forums/view/latest-discussions


    HowToGeek
    Member

    @howtogeek

    Sweet!

    As usual, you rule.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.