Skip to:
Content
Pages
Categories
Search
Top
Bottom

How many topics and replies to show per page


  • Jgonl
    Participant

    @jgonl

    Please help

    How many topics and replies to show per page … 10

    Not working, That is what happens?

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

  • Jgonl
    Participant

    @jgonl

    Aaaaaah

    If …
    Reply Threading Enable threaded (nested) replies
    is activated
    Then does not work show per page 10

    If is off
    show per paga “n” … then it works correctly

    Please help, thanks


    niuserre
    Participant

    @niuserre

    I think it works like this: If nested is enabled, it will show 10 parent replies, it won’t count the second level nested replies in the 10 (because that would break a discussion over multiple pages). Does that help at all?


    Jgonl
    Participant

    @jgonl

    Thanks Niuserre
    But …
    Even with 2 replies and 2 threads does not work either.


    niuserre
    Participant

    @niuserre

    But it would have to have 10 replies before the pagination would appear…or do you mean you have set the ‘Topics and Replies Per Page’ limit to less than 2?

    The nested replies limit only does how many levels deep the conversation can go, it doesn’t affect pagination.

    Sorry if I’m not understanding your question :S Maybe add some screenshots of the settings and of the results you get (you can share them using http://imgur.com).


    Jgonl
    Participant

    @jgonl

    I have done a test with 25 response and 20 replies.
    and should jump pagination, I have it set to 2
    and nothing.
    I remove the nested responses and working properly.


    niuserre
    Participant

    @niuserre

    Does it work if you use a default theme (e.g. twenty twelve)?


    Jgonl
    Participant

    @jgonl

    I use the theme Boldy
    but I’ve proven with the theme Twenty twelve
    I’ve also tested with the theme Buddypress Default 1,8,1

    and all makes me do the same.

    nested responses activated. paging not work
    Nested responses disabled. paging if it Works

    thanks Niuserre


    marky_uk
    Participant

    @marky_uk

    Got the same here and just trying to work this out – can recreate exactly the same as yourself, Jgonl and want to get this fixed!


    marky_uk
    Participant

    @marky_uk

    Actually, just found out how to “fix” this … but not sure of the impact.

    In file bbpress/includes/replies/template.php there’s two places -

    Around line 174, I’ve remarked out the IF statement -

    // Set posts_per_page value if replies are threaded
    $replies_per_page = $r['posts_per_page'];
    /*if ( true === $r['hierarchical'] ) {
    	$r['posts_per_page'] = -1;
    }*/

    And around line 250, I’ve made the IF never be true just to try it out -

    if ( true === $r['hierarchical'] & 1==2) {
    	$walker      = new BBP_Walker_Reply;
    	$total_pages = ceil( (int) $walker->get_number_of_root_elements( $bbp->reply_query->posts ) / (int) $replies_per_page );
    } else {
    	$total_pages = ceil( (int) $bbp->reply_query->found_posts / (int) $replies_per_page );
    

    And that works. But what’s the impact of doing that beyond fixing what I wanted? Am I missing something?


    Jgonl
    Participant

    @jgonl

    OK, thank you very much.


    marky_uk
    Participant

    @marky_uk

    Hey hey … I can’t go back to edit my code … the second piece of code … the first line has just got one & and should have TWO!

    So it should read:

    if ( true === $r['hierarchical'] && 1==2) {
    	$walker      = new BBP_Walker_Reply;
    	$total_pages = ceil( (int) $walker->get_number_of_root_elements( $bbp->reply_query->posts ) / (int) $replies_per_page );
    } else {
    	$total_pages = ceil( (int) $bbp->reply_query->found_posts / (int) $replies_per_page );

    And don’t forget this is totally an experiment at my end here … but it’s working well on two local dev installations and our dev server setup :-)


    Jgonl
    Participant

    @jgonl

    OK ;)
    Thanks


    OptiMystic13
    Participant

    @optimystic13

    I’m having a very difficult time with this. Even using the above hack does not fix the issue. Is this something that bb press is working on for a new release? Is 2.6 anywhere on the horizon for release?

    I have thousands of responses and so with threading not working the forum is an unorganized disaster.


    Doremdou
    Participant

    @doremdou

    Hello, thank you for your code @marky_uk :)
    Unfortunately it does not seem to work right.
    In fact, there is a pagination with threaded replies with your code, but same replies are replicated on each page (so it is always the whole bunch of replies on each page) it does not separate them.

    Would be greatly appreciated if someone has another idea :)
    thank you :)


    wancasil
    Participant

    @wancasil

    Hi there. Please, I hope anyone can help me.
    I’m trying to set a maximum number of replies a user can submit to a specific post.
    Attention, it is not the maximum replies to show but the maximum replies per user per post.
    Is it possible somehow? Have anyone done it yet? If yes, please help me achieve the same result.

    Rgds,
    WanCaSil


    Doremdou
    Participant

    @doremdou

    Hi @WanCaSil, sorry but I think you should start your own topic for your question because it is not the same as this one, if you create your topic with a specific title it will be easier for people to help you :)

    Dorem

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

You must be logged in to reply to this topic.