Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 14 years ago

#1870 closed defect (bug) (fixed)

Limit number of levels of threaded replies

Reported by: ousep's profile ousep Owned by:
Milestone: 1.5 Priority: minor
Severity: Version:
Component: Core 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 15 years ago.

Download all attachments as: .zip

Change History (4)

#1 @apeatling
15 years ago

  • Milestone changed from 1.2 to 1.3

Punting this to 1.3

#2 @boonebgorges
14 years ago

  • Component set to Core

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
14 years ago

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

(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.