Skip to:
Content

bbPress.org

Opened 10 years ago

Closed 7 years ago

#2617 closed enhancement (fixed)

Allow moderators to adjust reply hierarchy

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6 Priority: high
Severity: normal Version: 2.4
Component: Component - Replies Keywords: has-patch commit
Cc: nashwan.doaqan@…

Description

With recent improvements to reply hierarchy & position, a few helper functions and fields will really tie the room together.

  • bbp_get_reply_ancestors() - necessary because we do not use post_parent (it's used to identify the topic ID)
  • bbp_reply_to form field dropdown, for reassigning reply parentage on a case by case basis.
  • Associated walker class to handle the above dropdown.
  • Edits to metabox and form-reply.php to use above dropdown.
  • Tweaks to bbp_get_dropdown() to allow custom posts array to be passed, with reply_to data appended to each post.

Related: #2588.

Attachments (2)

2617.patch (16.0 KB) - added by johnjamesjacoby 10 years ago.
2617.2.patch (524 bytes) - added by SergeyBiryukov 7 years ago.

Download all attachments as: .zip

Change History (19)

#1 @johnjamesjacoby
10 years ago

In 5387:

Tweak bbp_get_dropdown() to allow an array of custom posts to be used. See #2617.

Version 0, edited 10 years ago by johnjamesjacoby (next)

#2 @johnjamesjacoby
10 years ago

In 5388:

Tweak bbp_get_dropdown() to allow an array of custom posts to be used. See #2617.

#3 @johnjamesjacoby
10 years ago

In 5389:

Introduce BBP_Walker_Reply_Dropdown to help with reply hierarchy dropdown. Also update other Walker class extensions and associated documentation to be a bit more accurate and reliable. See #2617.

#4 @johnjamesjacoby
10 years ago

In 5390:

Introduce bbp_get_reply_ancestors() function to help with reply hierarchy dropdown. Also conveniently wraps logic incase we ever move to a real hierarchical post type. See #2617.

#5 @johnjamesjacoby
10 years ago

In 5391:

Pass $reply_id into calls to bbp_validate_reply_to() and remove reply_query references in BBP_Walker_Reply_Dropdown. Fixes invalid bbp_reply_id value output in form-reply.php. See #2617.

#6 @johnjamesjacoby
10 years ago

In 5393:

Prevent empty array value in bbp_get_reply_ancestors(). See #2617.

#7 @johnjamesjacoby
10 years ago

In 5394:

Smarter ancestor detection in BBP_Walker_Reply_Dropdown. See #2617.

#8 @johnjamesjacoby
10 years ago

In 5395:

Reduce unnecessary complexity and flexibility in bbp_get_reply_to_dropdown(). Since this is a purpose built form field, explicit filtering of arguments is not necessary. See #2617.

#9 @johnjamesjacoby
10 years ago

In 5396:

Add editable reply-to field in form-reply.php for moderators when editing replies. See #2617.

This ticket was mentioned in IRC in #bbpress-dev by jjj. View the logs.


10 years ago

#11 @johnjamesjacoby
10 years ago

  • Owner set to johnjamesjacoby
  • Resolution set to fixed
  • Status changed from new to closed

In 5398:

Update admin area reply-to to use bbp_reply_to_dropdown(). Fixes #2617.

#12 @netweb
10 years ago

In 5422:

Add missing @uses phpdoc to bbp_get_reply_to_dropdown(). See #2617

#13 @alex-ye
10 years ago

  • Cc nashwan.doaqan@… added

#14 @netweb
9 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

When creating a reply in the backend reply admin results in:

e.g. http://src.wordpress-develop.dev/wp-admin/post-new.php?post_type=reply

This webpage is not available

ERR_INCOMPLETE_CHUNKED_ENCODING

The webpage at http://src.wordpress-develop.dev/wp-admin/post-new.php?post_type=reply might be temporarily down or it may have moved permanently to a new web address.

This is caused by is bbp_get_reply_to_dropdown() where reply_id = 0 and then bbp_get_topic_title() cannot handle this as part of the show_none parameter of the bbp_get_dropdown() array.

@tharsheblows added a patch in #2844 https://bbpress.trac.wordpress.org/attachment/ticket/2844/2844.1.diff

#15 @johnjamesjacoby
7 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 6316:

Replies: Check for reply hierarchy before assuming topic-title in reply-to.

Fixes a bug causing malformed output when creating a reply via wp-admin.

Props tharsheblows . Fixes #2617. See #2844.

#16 @SergeyBiryukov
7 years ago

  • Keywords has-patch commit added
  • Resolution fixed deleted
  • Status changed from closed to reopened

[6316] is reversed, it displays 'None' if a non-empty $reply_id is provided (which is pretty much always the case), and an empty string otherwise.

The fatal error mentioned in comment:14 is already fixed in [6095],

#17 @johnjamesjacoby
7 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 6396:

Replies: Invert the $show_none comparison, to fix the default drop-down text.

Props SergeyBiryukov. Fixes #2617.

Note: See TracTickets for help on using tickets.