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)
Change History (4)
#2
@
16 years ago
- Component → 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).
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Punting this to 1.3