thanks for your post.
I’ll take a look, but may be a day or so as it’s the weekend !
Hi Robin W,
Thanks for looking into it, enjoy your weekend π
ok, a couple of things I need to try and help me.
1. can you let me have your settings for this widget
2. can you add the standard (bbpress) recent replies widget to the site as a test and see if that does the same or different – that will help me narrow down the search as I use a lot of that widget’s code.
No problem, the widget settings are
- Maximum topics to show: 5
- From forum ID(s): 12515,16924,16957,16961
- All extra the options are disabled
- Order by: Topics With Recent Replies
I’ve added the bbPress reactions widget and just to be sure also it’s recent topic widget. As you can see the bbPress widget has the same problem.
Since I’ve been doing a little coding myself lately maybe the following information could be helpful to you.
When I use bbp_reply_url() the same problem occurs. normally sized topics open fine, large topics are missing the /page/123/ part.
I don’t know how bbPress or your widget determines the page number, but it’s maybe the same way as I did for another script. I tried to calculate how many pages a topic has. That script also worked fine until the topic has over a 1000 replies.
Here’s what happened; I used bbp_get_topic_reply_count() to get the number of replies and divided it with the number of replies per page to get the total amount of pages. However when the number of replies surpassed a 1000, bbp_get_topic_reply_count() adds a comma to its output, like so: 1,000
Because of this I got an error for topics with more than a 1000 replies. I fixed this with the use of str_replace(). My code ended up like this:
$post_count = str_replace(',', '', bbp_get_topic_reply_count());
$post_count++;
$page_count = ceil($post_count / 15 );
Maybe this was some useless information and maybe it helps a little bit.
Best regards,
No that’s great information, I’ll respond in the bbpress thread, as it will help others coming to this later, and then put the solution here.
by the way the above saved me hours of digging – so thanks for posting !!
Glad to hear it was of such help π
I’m gonna try the function you wrote in the bbPress thread and answer there.
Thanks for your active aproach!