Skip to:
Content

BuddyPress.org

Opened 17 years ago

Closed 16 years ago

#1870 closed defect (bug) (fixed)

Limit number of levels of threaded replies

Reported by: ousep Owned by:
Priority: minor Milestone: 1.5
Component: Core Version:
Severity: Keywords:
Cc:

Description

Threaded replies, after a point, stop being usable. The textarea becomes too small to type in.

Attachments (1)

buddypress-threaded.png (145.3 KB ) - added by ousep 17 years ago.

Download all attachments as: .zip

Change History (4)

#1 @apeatling
17 years ago

  • Milestone 1.21.3

Punting this to 1.3

#2 @boonebgorges
16 years ago

  • ComponentCore

I'm about to commit a fix that works as follows. It adds a new function bp_activity_can_comment_reply() which, by default, always returns true. You can filter the output of that function to limit reply depth in the following way:

function test_comment_depth_limit( $can_comment, $comment ) {	
	if ( $comment->mptt_left > 3 )
		$can_comment = false;
	
	return $can_comment;
}
add_filter( 'bp_activity_can_comment_reply', 'test_comment_depth_limit', 10, 2 );

$comment->mptt_left refers the number of items to the left of the comment in the comment tree, including the original activity item. So this filter will limit comment depth to two levels (> 3).

#3 @boonebgorges
16 years ago

  • Resolutionfixed
  • Status newclosed

(In [3491]) Adds bp_activity_can_comment_reply() function, allowing plugins to limit depth of activity comment threads. Fixes #1870

Note: See TracTickets for help on using tickets.