Skip to:
Content

bbPress.org

Opened 11 years ago

Last modified 10 years ago

#2424 new enhancement

Redirect single replies to parent topic

Reported by: mordauk's profile mordauk Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: trunk
Component: Component - Replies Keywords:
Cc: pippin@…

Description

I'm wondering if we should automatically redirect single reply pages to their parent topic.

For example, right now if you go to Replies in the admin and click "View Reply" on a reply, you get a standard bbPress forum view of just that one reply.

This view is more or less useless, since a reply has little relevance outside of its parent topic.

How about redirecting these to the parent topic?

I personally ran into this as a problem when I started incorporating bbPress replies and topics into my site's standard WP search. The search results used get_permalink(), which returned the single reply URL, but viewing this page was pointless because the reply didn't mean anything outside of its topic.

I went ahead and wrote a small plugin to do this: https://github.com/pippinsplugins/bbPress-Redirect-Single-Replies-to-Topics

Change History (6)

#1 @alexvorn2
11 years ago

the reply could have an expand link that will forward the user to the topic page... (like on twitter: if you go to a status message(tweet) - you will see a link below that can show more replies to that status...) http://wpimpact.com/wp-content/uploads/2013/09/tweet.png

#2 @alex-ye
11 years ago

I like the idea, but I still thinking that the single reply view is important too.. So I think we just need to replace the call of bbp_get_reply_permalink to bbp_get_reply_url in some places.

#3 follow-up: @mordauk
11 years ago

I think the issue is more with default WP search results (or other archive-like views) that use get_permalink() on a reply.

Perhaps we should filter get_permalink() to return bbp_get_reply_url() for replies?

#4 in reply to: ↑ 3 @johnjamesjacoby
11 years ago

  • Milestone changed from Awaiting Review to Future Release

Replying to alex-ye:

I like the idea, but I still thinking that the single reply view is important too.. So I think we just need to replace the call of bbp_get_reply_permalink to bbp_get_reply_url in some places.

bbp_get_reply_permalink or the functions that use them, aren't traditionally exposed anywhere in the template parts. Only when you're editing a single reply is there a breadcrumb item for the reply itself. If there are links to single reply pages exposed anywhere, I agree we should replace them.

Replying to mordauk:

I think the issue is more with default WP search results (or other archive-like views) that use get_permalink() on a reply.

Perhaps we should filter get_permalink() to return bbp_get_reply_url() for replies?

This would fix the issue in your case, where you're including Forum posts in your Blog search (which I can see as being valuable in certain site configurations, but don't believe should be the default setup.)

Moving to Future Release, pending a patch, and/or further discussion. Pippin's going to put a plugin together, so we can see how this behaves before committing anything to core.

#5 @mordauk
11 years ago

Very simple plugin I wrote: https://github.com/pippinsplugins/bbPress-Redirect-Single-Replies-to-Topics

You can see this in play on one of my support forums, where I have bbPress topics and replies included in the main search results, instead of using the default bbPress search: http://pippinsplugins.com/support/?s=easy+content+types

Note: See TracTickets for help on using tickets.