Skip to:
Content

bbPress.org

Opened 7 years ago

Last modified 7 months ago

#1918 new enhancement

New topics to appear in Recent Replies widget

Reported by: edinchez Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.0
Component: API - Widgets Keywords:
Cc: stephen@…, jared@…, wordpress@…

Description

When someone creates a new topic, it isn’t shown in the Recent Replies widget, and that way it usually remains unseen and without any replies in a site where the forum is mainly based on the widget.

Attachments (2)

widgets_inc_new_topics.diff (6.0 KB) - added by netweb 7 years ago.
replies_widget_query_filter.diff (859 bytes) - added by morgul 7 months ago.
Allow filtering of replies widget's query

Download all attachments as: .zip

Change History (25)

#1 @netweb
7 years ago

  • Cc stephen@… added

i.e. Include in the 'Recent Replies' widget a checkbox option to also include 'newly created topics with no replies'

REF: http://bbpress.org/forums/topic/recent-replies-widget-not-showing-new-topics/

#2 @netweb
7 years ago

I have just had a crack at this...

It introduces $replies_query to include a dropdown option in the replies widget to be able to select "Include fresh topics with no replies" yes or no (default) to include 'New topics with no replies' within the current standard 'Recent replies' widget options.

It is using the same structure for this as the current topics widget $topics_query

http://bbpress.trac.wordpress.org/browser/trunk/includes/core/widgets.php#L535

Everything works I believe as it should with one very large exception, I haven't been able to figure the actual query needed for this to work.

Thus this diff at the moment does effectively nothing as currently the query is identical for each of the options but if someone can help me out with what this query should actually be so that the results returned are 'Recent Replies' AND 'New topics with no replies' sorted by date then this patch would be good to go once variable names etc are suitably chosen.

The query as it stands at the moment is the same as the standard replies widget query

$replies_query = array(
  'post_type'      => $post_types,
  'post_status'    => join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ),
  'posts_per_page' => $max_shown,
  'meta_query'     => array( bbp_exclude_forum_ids( 'meta_query' ) )
 );

#3 @johnjamesjacoby
7 years ago

  • Milestone changed from Future Release to 2.4

#4 @jaredatch
7 years ago

  • Cc jared@… added

#5 @MZAWeb
6 years ago

  • Cc wordpress@… added

#6 @johnjamesjacoby
6 years ago

  • Milestone changed from 2.4 to 2.5
  • Version set to 2.0

That's what the recent topics widget is for.

Moving to 2.5.

#7 follow-up: @MZAWeb
6 years ago

Idea: Let's merge those two widgets into a "Recent Activity" one and add 3 radio buttons in the widget settings.

  • Show Recent Topics
  • Show Recent Replies
  • Show Both

#8 @jaredatch
6 years ago

Short of users having their old widgets nuked when they upgrade, I do like the idea to consolidate widgets.

#9 @MZAWeb
6 years ago

We can map the old widgets classes to the new one with the correct options selected

#10 in reply to: ↑ 7 ; follow-up: @johnjamesjacoby
6 years ago

  • Milestone changed from 2.5 to 2.6

What problem does this solve? Does it improve the end user experience, or does it possibly clutter 1 widget with more options?

Moving to 2.6, pending a compelling patch.

#11 in reply to: ↑ 10 @MZAWeb
6 years ago

Replying to johnjamesjacoby:

What problem does this solve?

Having a unified stream of "latest activity" in a widget.

Not terrible sold on the idea, but I can see some value on it.

#12 @tharsheblows
6 years ago

I have this page on my site: http://thefastdiet.co.uk/latest-50-forum-comments/ - I'm not sure if that's the sort of thing you're looking for.

Re the "why" issue - I also have a page with all recent topics using [bbp-topic-index]. People use the two pages in different ways. The ones that go to the page with all recent topics are in transit - they come from another page (less than 5% of entrances) and then head out (stay on page < 1min) to various individual topics (bounce rate <25%). The people that use the "last 50 forum comments" page are more likely to go straight to that page (entrances over 25%) stay on the page reading (nearly 4 min) and then over half leave. I figure "last 50 comments" people are the most regular users of the forum.

Apols if this is off topic, this is my first post on trac, not quite sure of the etiquette but I figured a direct comparison of the two might be interesting since someone asked.

#13 @ronthai
6 years ago

I would prefer for the Recent Replies widget the option to set it for a single or more forum ID's same as the Recent Topics widget has.

Also the Recent Topics widget should always display (or have the option) to have the topic creation date and not freshness of replies.

Both should show the title/link on one line, then a break and author + date/freshness.
This because the title is usually the longest and takes up a whole line, while author and date/freshness easily fit on one line.

Visually it would be nice to have:
Avatar (float:left) say 40x40px and then the 2 lines title/link [break] author name + date/freshness
.......
|AVA | Title/link of the topic or reply
| ..... |
|TAR | Author + Topic creation Date or Reply Freshness
.......

#14 @ryanssealey
6 years ago

I have worked with bbPress on two sites and both times have found myself wanting a widget that can display a list of recent posts. This includes new topics with one post, as well as replies to existing topics. The freshness and author information of the most recent post (not the topic author) should be able to be displayed.

I really like ronthai's suggestion for the layout of the widget. If those components are at least included with classes or IDs, that layout could be created using CSS easily.

 -----
| Ava | Title of the post (linked)
| tar | by [Post Author] on [Post Date]
 -----
Last edited 6 years ago by ryanssealey (previous) (diff)

#15 @oskarlin
6 years ago

I can't understand why this is not ready implemented? It's for me the most important feature a Forum must have. How's it going with this?

Is it possible to use @netweb's solution? If so could someone help me with that?

#16 @johnjamesjacoby
5 years ago

  • Milestone changed from 2.6 to 2.7

This needs a refresh, so moving to 2.7.

#17 @tharsheblows
5 years ago

Replying to netweb

here is the query I am using for the page I did above:

$replies_query = new WP_Query( array(
		'post_type'      => array (bbp_get_reply_post_type(), bbp_get_topic_post_type()),
		'post_status'    => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
		'posts_per_page' => 50
	) );

It would make sense to me for this to go in the Recent Replies widget as a tickbox "All posts (including new topics)". I think you could probably make this query the default as it's probably what people expect. And of course don't hardcode the posts per page.

Last edited 5 years ago by tharsheblows (previous) (diff)

#18 follow-up: @nicoloks
5 years ago

+1 for having a widget with both new topics without replies, and new replies to existing topics. A one stop widget that shows all forum activity.

The "Why" factor is easy. For many sites a better user experience would be gained by only having to look at one spot to see all recent forum activity rather than at one spot for replies and another for new topics.

#19 in reply to: ↑ 18 @johnjamesjacoby
5 years ago

Replying to nicoloks:

+1 for having a widget with both new topics without replies, and new replies to existing topics. A one stop widget that shows all forum activity.

The "Why" factor is easy. For many sites a better user experience would be gained by only having to look at one spot to see all recent forum activity rather than at one spot for replies and another for new topics.

Sorting the topics widget by freshness or 'most recent' has this exact same effect. Can you explain to me what differences you are imagining?

#20 @welshdemon
5 years ago

Well it has taken me months and many, many pages and topics read until I have realised how to get the recent activity all in 1 widget. This shows, new topics (even without replies) and (unique) current topics with replies. Brilliant.

Perhaps this needs to be more obvious?

To acheive it, for those who don't realise (like myself and many more) you need to use the Recent Topics widget, ordered by "Topics with recent replies"

I think this is what people are looking for but they don't realise it is possible with the current widgets!!

I am posting this here to help others who were in my situation.

#21 @welshdemon
5 years ago

Oops! I spoke too soon.

The links on the widget point to the start of the topic, unfortunately some topics are very long.

Maybe you could have the post "date" become a link to the most recent reply? Or perhaps a small arrow or something next to the post date, which people can click to go to the most recent reply. Or they can click the topic title to go to the start of the topic.

Just some feedback.

Many thanks

#22 @johnjamesjacoby
5 years ago

  • Milestone changed from 2.7 to 2.8

Bumping all 2.7 to 2.8 milestone.

@morgul
7 months ago

Allow filtering of replies widget's query

#23 @morgul
7 months ago

I propose you simply add a filter that allows modifying the query array, for the replies widget. I attached a patch for this.

This way it will let us users have control over what the widget will show.

With this, I was able to have it showing both topics and replies, and to show only those under a certain forum, by changing the query array on the filter function:

<?php
        $widget_query['post_parent__in'] = $parentsIDsArray;
        $widget_query['post_type'] = array('reply', 'topic');
Note: See TracTickets for help on using tickets.