[buddypress-trac] [BuddyPress] #3565: Allow a group to post to activity stream as if it were a user

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Thu Sep 8 18:34:18 UTC 2011


#3565: Allow a group to post to activity stream as if it were a user
-------------------------+------------------
 Reporter:  modemlooper  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  1.6
Component:  Core         |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------

Comment (by modemlooper):

 Here's the code Andy had to save the activity. It originally was user_id
 => false. But that did not work to delete, however, the favorites and
 comments worked just not deleting.

  I'm going to attach it to the groups creator id for now because it won't
 delete unless user_id is  anything but 0.



 {{{
                 $admin_id = $group->creator_id;

                 /* Record or update in activity streams. */
                 groups_record_activity( array(
                         'id' => $id,
                         'user_id' => $admin_id,
                         'action' => $activity_action,
                         'content' => $activity_content,
                         'primary_link' => $item['link'],
                         'type' => 'exb',
                         'item_id' => $group_id,
                         'secondary_item_id' => wp_hash( $post['blogurl']
 ),
                         'recorded_time' => gmdate( "Y-m-d H:i:s",
 $post_date ),
                         'hide_sitewide' => $hide_sitewide
                 ) );

 }}}

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


More information about the buddypress-trac mailing list