BuddyPress Group Activities Notifier plugin notifies group members of any new activities in his/her group on BuddyPress based Social Networks.
It is based on simple idea to add a local notification for user(Like in other social networks) when any activity happens in his/her group.
Here is what it does currently.
Features:-
- Notifies members if someone posts an update in the group
- Notifies members if a user joins the group
- Notifies members if someone posts a new topic
- Notifies members on new reply in the forum
- Should work for any other plugin which adds activity in the group
Screenshots:-
Currently, in the initial release, it only locally notifies the users(Adds these to users notification list on the network).
Notify by email:-
This plugin does not support notification by email out of the box. The email notifications are resource intensive and based on the number of members of group, may cause timeouts. If you still believe that you want the email notification, you can put the following code in your bp-custom.php
function buddydev_mail_on_new_group_activity( $user_ids, $args ) { if ( empty($user_ids ) ) { return ; } //do a bulk query $users = get_users( array( 'include' => $user_ids ) ); $group = new BP_Groups_Group( $args['group_id'] ); $loggedin_user_display_name = bp_get_loggedin_user_fullname(); $activity = new BP_Activity_Activity( $args['activity_id'] ); $activity_content = $activity->content; $activity_permalink = bp_activity_get_permalink( $activity->id, $activity ); $subject = sprintf( '%1$s posted to %2$s', $loggedin_user_display_name, $group->name ); $message = <<<'MAINCONTENT' Hi %1$s, %2$s posted... %3$s Link: %4$s MAINCONTENT; foreach ( $users as $user ) { $message = sprintf( $message, $user->displayname, $loggedin_user_display_name, $activity_content, $activity_permalink ); wp_mail( $user->user_email, $subject, $message ); } } add_action( 'bp_group_activities_notify_members', 'buddydev_mail_on_new_group_activity', 10, 2 );
It is recommended to use an email queuing plugin if you are using the above code. you may use any of the below:-
Future Plans:-
These or other features may come depending on your suggestions on the blog post. Go ahead and let us know your suggestions here.
- Should we allow users to opt out of the notifications? If yes, what should we do by default, keep them subscribed and allow to unsubscribe ?
- Should we send emails on new group activities?
- Is there anything else you want to do ?
It is Free, enjoy 🙂