[buddypress-trac] [BuddyPress] #2768: Use WP comments' threaded comment depth settings

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Dec 31 22:34:32 UTC 2010

#2768: Use WP comments' threaded comment depth settings
  Reporter:  DJPaul       |      Owner:  DJPaul
      Type:  enhancement  |     Status:  assigned
  Priority:  normal       |  Milestone:  1.3
 Component:  Activity     |    Version:
Resolution:               |   Keywords:

Comment (by DJPaul):

 This is not as trivial as it seems. We can't simply count() everything at
 the start of the activity stream item loop, or use
 bp_activity_get_comment_count(), as those will look down the entire depth
 of any set of items. We need to count down each level of the tree to see
 if any particular set has a number of items higher than the threaded
 comments limit. I took the approach of passing a counter variable through
 the process.

 This needs testing, please. I think it works ok. Some remaining issues:

 1) When submitting a reply via AJAX, if that reply would cause you to
 equal the threaded comments limit, the returned HTML still has the "reply"
 link. Probably something to do with the AJAX activity stream loop
 requesting a specific item rather than starting from the root item.

 2) RE: 1, if the user hits reply on the AJAX, it will get posted, ignoring
 the threaded comments limit. I suggest we need to amend the "add activity
 stream to DB" function and for "activity_comment" items', check the depth.
 If it is at or has passed the threaded comment limit, we'll bump it back
 to a root level reply -- I'm sure we can fiddle the ajax return so that it
 is inserted visually in the correct place, too.

Ticket URL: <http://trac.buddypress.org/ticket/2768#comment:4>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list