[Resoved] Posting custom type activity vía bp_activity_add() in groups
-
Hi everyone!
I’m successfully posting activity in the main activity page and the user’s profile using this:
bp_activity_add( array( 'action' => $action, 'content' => $content, 'component' => 'activity', 'type' => $type, 'user_id' => $user_id ) )
$action, $content, $type, etc. are dynamically changed and it posts ok.
But I cannot achieve this when trying to post within a GROUP. Only to the short function:
groups_post_update(array('content' => $content, 'group_id' => $gid))
But using that I can not customize the action or the type (or I’m making something wrong).
I tried also:
bp_activity_add( array( 'action' => $action, 'content' => $content, 'component' => 'activity', 'type' => $type, 'group_id' => $gid, 'user_id' => $user_id ) )
But with no effect (the activity keeps being posted ‘outside’ the group).
Please if someone could help me, I’m using this on a plugin that will then share with the community
Thanks to all in advance!
- The topic ‘[Resoved] Posting custom type activity vía bp_activity_add() in groups’ is closed to new replies.