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

buddypress-trac noreply at wordpress.org
Wed Aug 28 19:14:06 UTC 2013


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

Comment (by r-a-y):

 Thanks for the feedback so far, guys.  Most of your feedback kind of
 cancels each other out! :)

 Anyway, here's my long-overdue update for this ticket.

 '''Note:''' You'll probably want to test this with a new blog post.
 Remember to go to "Settings > BuddyPress > Settings" and check "Allow
 activity stream commenting on blog and forum posts".

 ----

 What's new in 01b.patch:

 * Synching blog post comments back to the main `'new_blog_post'` activity
 entry as an activity comment is now working (two-way sync is complete)
 * Disables activity replying to the `'new_blog_post'` activity entry (and
 its activity comment children) if the WP blog post has closed comments off
 (either manually or automatically)
 * Activity comment permalinks now use the WP comment link instead of the
 main activity permalink.  Some caveats here with AJAX.  See comments in
 `bp_blogs_sync_add_from_activity_comment()`.
 * Changing `bp_get_option()` to check the `buddypress()->site_options`
 array first before querying with `get_blog_option()`.  This allows me to
 use `bp_disable_blogforum_comments()` again as intended.  (Should probably
 create a new ticket for this.)

 What isn't done:

 * Handling deletion for nested comments and its corresponding activity
 items (2-3).
   * Still need to think of a decent strategy.  I'm thinking of deleting
 all WP comment children and all BP activity children instead of trying to
 emulate WP's "move comments up a level" technique.
 * Fixing activity comment permalink when posting via AJAX to use WP
 comment permalink.  This is fixed after AJAX posting (when you refresh the
 page) though.  A slight niggle.

 General concerns:

 * There is a lot of manual code that needs to be written if a plugin dev
 wants to sync activity comments with their component.
   * I want to extrapolate some of the code in
 `bp_blogs_disable_activity_commenting()`,
 `bp_blogs_disable_activity_replies()` and
 `bp_blogs_activity_comment_permalink()` into the API to make things a
 little easier.  But this means adding more activity code into the
 `BP_Component` class... maybe it's a good time to start thinking about a
 `BP_Activity_Extension` class.
   * Plugin devs will still have to probably write code to handle trash /
 spam / ham routines when working with WP comments in their plugins.
 * Synchronizing will only work for new entries.  So people expecting their
 older WP comments to show up under the `'new_blog_post'` activity entry
 will be SOL.
 * People will undoubtedly ask about supporting forum threads.  I don't
 want to do this for the legacy forums because `'bbpress_init'` is kind of
 a killer, but we'll probably want to add support to bbPress 2.4.

 I'll probably start breaking up the patch into smaller commits once the
 deletion issue is handled.

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


More information about the buddypress-trac mailing list