[buddypress-trac] [BuddyPress Trac] #5130: Synchronizing activity comments to main component

buddypress-trac noreply at wordpress.org
Wed Mar 26 00:55:10 UTC 2014

#5130: Synchronizing activity comments to main component
 Reporter:  r-a-y        |       Owner:  r-a-y
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  2.0
Component:  Core         |     Version:  1.2
 Severity:  normal       |  Resolution:
 Keywords:               |

Comment (by r-a-y):

 `03.patch` incorporates the following fixes:

 - Editing a post comment properly updates the associated activity comment
 - Editing an activity comment entry properly updates the associated blog
 post comment
 - Trashing a post comment will mark the associated activity comment as
 spam.  Untrashing the post comment will reinstate the activity comment.

 - Activity admin list table: The mouseover actions now supports whether
 the activity item allows replies.  I had to create a new method -
 `BP_Activity_List_Table::can_comment()` - that duplicates some
 functionality here unfortunately.

 - Trashing a blog post will *delete* any blog comments that have an
 associated activity entry.  The reason why is
 `bp_blogs_transition_activity_status()` doesn't support trash / untrash
 post statuses.  The proper way would be to mirror how
 `bp_blogs_transition_activity_status()` handles post comment statuses.
 The goal is to do this, but I ran out of time to implement this today and
 wanted to put something up.

 - Miscellaneous: Activity admin dashboard now has an "Action" column.
 I've created a new utility function called
 `bp_activity_admin_get_activity_actions()` to grab a list of registered
 activity actions.  The code already existed in the activity dashboard, but
 was being duplicated.


 **Remaining issues:**

 - Support trash / untrash post status changes and toggling nested activity
 comments as ham / spam
 - Comment depth handling (see comment:17)



 > I'd suggest mirroring it in blogmeta. Then it'll be autoslurped in
 activity loops with https://buddypress.trac.wordpress.org/browser/trunk

 Was looking into this some more.  It would be possible to cache the
 threaded comments depth as that rarely changes, but the `comments_open()`
 function needs to be called at runtime to calculate if a post has
 automatically closed comments after a certain age.

 There is not much gain with only mirroring the threaded comments depth in
 blogmeta, while `comments_open()` is called at runtime during the activity
 loop so I've kept things in the patch as-is.

 > so great idea, But I test it on localhost and my website,
 > when author leave a comment on post, it works;
 > but when a other user leave comment, it doesn't creat a activity.
 > How can I solve this?

 Anonymous blog post comments are not recorded in the BuddyPress activity

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5130#comment:22>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list