Search Results for 'notification user id'
-
Search Results
-
I have been customizing the way my notifications are shown and have split them out from the main notifications bubble, so far i have managed to do this via these hooks/filters
bp_friend_get_total_requests_count
bp_notifications_get_unread_notification_count
messages_get_unread_countNow i don’t know the ones that relate specifically to the comment notifications a user receives when someone replies or comments on their status update etc, any ideas?
Hi,
I’ve found some info about turning off email notifications by default for new users (here: https://buddypress.org/support/topic/how-to-disable-email-notification-to-all-newly-registered-users/) and would like to check 4 things.
The 2 code options referenced there are these, added to the child theme functions.php:
1.function bp_set_notification_default( $user_id ) { $keys = array( 'notification_activity_new_mention', 'notification_activity_new_reply', 'notification_friends_friendship_accepted', 'notification_friends_friendship_request', 'notification_groups_admin_promotion', 'notification_groups_group_updated', 'notification_groups_invite', 'notification_groups_membership_request', 'notification_messages_new_message', 'notification_messages_new_notice' ); foreach ( $keys as $key ) { update_user_meta( $user_id, $key, 'no' ); } } add_action( 'bp_core_signup_user', 'bp_set_notification_default', 100, 1 );2.
add_action('bp_core_signup_user','bp_set_notification_default',100,1); function bp_set_notification_default($user_id) { $keys = array('notification_activity_new_mention','notification_activity_new_reply','notification_friends_friendship_accepted','notification_friends_friendship_request','notification_groups_admin_promotion','notification_groups_group_updated','notification_groups_invite','notification_groups_membership_request','notification_messages_new_message','notification_messages_new_notice'); foreach($keys as $key) { update_user_meta($user_id,$key,'no'); } }So my questions are:
1. which code should be used?
2. Is this code still OK since the recent BP updates?
3. Does it turn off email notifications to admin for new user signups too?
4. If so, how can I keep just that functionality on?Many thanks.
This outputs “test left the group Group logo of Test GroupTest Group 16 seconds ago”
Into your activity feed. Useful if you want to track who has currently left your group. As there is no way of knowing if your groups get large. It also inserts in show with disbanded groups to view all members who have disbanded.
Just insert this code into your themes functions.php file and you are good to go.
Preview
////////////////////////////////////////// ////////// LEFT GROUP //////////////////// ////////////////////////////////////////// add_action( 'groups_leave_group', 'groups_left_group', 10, 2 ); function groups_left_group( $group_id, $user_id = 0 ) { global $bp; if ( empty( $user_id ) ) $user_id = bp_loggedin_user_id(); // Record this in activity streams groups_record_activity( array( 'type' => 'left_group', 'item_id' => $group_id, 'user_id' => $user_id, ) ); // Modify group meta groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() ); return true; } function groups_register_left_actions() { $bp = buddypress(); if ( ! bp_is_active( 'activity' ) ) { return false; } bp_activity_set_action( $bp->groups->id, 'left_group', __( 'Left group', 'buddypress' ), 'bp_groups_format_activity_action_left_group', __( 'Group Disbands', 'buddypress' ), array( 'activity', 'group', 'member', 'member_groups' ) ); do_action( 'groups_register_activity_actions' ); } add_action( 'bp_register_activity_actions', 'groups_register_left_actions' ); function bp_groups_format_activity_action_left_group( $action, $activity ) { $user_link = bp_core_get_userlink( $activity->user_id ); $group = groups_get_group( array( 'group_id' => $activity->item_id, 'populate_extras' => false, ) ); $group_link = '<a href="' . esc_url( bp_get_group_permalink( $group ) ) . '">' . esc_html( $group->name ) . '</a>'; $action = sprintf( __( '%1$s left the group %2$s', 'buddypress' ), $user_link, $group_link ); return apply_filters( 'bp_groups_format_activity_action_joined_group', $action, $activity ); }I do have a question for the developers here, how do you make this so that the join/left activity log cannot be deleted by the user who joined/left? I want it so that if a person joins/leaves, then they can’t delete their join/left activity from the log.
I could probably use
groups_is_user_member( $user_id, $group_id )
For when the member leaves a group but what about posting that they joined a group? I would prefer if admins/mods of the group could only delete those.Enjoy, and hope someone can answer this question also.
Hi,
Is there any way to set BP to create notifications when there is any activity within a group that the current user is a member of? It seems like a function that should be present by default, which is why I ask, though I can’t find it…
Thanks,
DavidTopic: Profile features
Hi guys,
I’m thinking of using the KLEO theme (based on BuddyPress), but I am in need of the below features, perhaps you know if these are default BuddyPress or can be found in a plugin:1. From profile: Is it possible to send to two or more friends as once e.g. a group message?
2. From profile: Is it possible to tag friends on status updates and thus the notification show up on friends profile e.g “going out with Maria and Patricia this weekend” where notification will show on Maria and Patricias profiles – like @ tagging on Facebook?
3. From profile: Is it possible to report a user to the admins if they are insulting – like on Facebook?
4. From profile: Is it possible for users to check-in (Patricia @Hard Rock Cafe) based on geo and show it on their profile – just like on Facebook?Thanks for your ideas!
Hi everyone!
I have a custom field in the registration page asking the new user to give us his/her ideas of what’s on their mind about a personal project so we can help him/her make it possible.
The thing is that I need that custom field to be part of the notification email that the admins recieves whenever somone registers.
I tried to follow the instructions given here:
https://buddypress.org/support/topic/using-xprofile-fields-in-notification-mail/But I’m not sure whre to put this code. In the functions.php? Is that code right?
Thaks ahead!
I have installed BP notify post author on blog comment (http://buddydev.com/plugins/bp-notify-post-author-blog-comment/), it works but those notifications won’t be cleared unless I clicked the read button. Is that possible to solve this problem?
Besides, if users commenting on other author’s blog posts, they won’t be notified when the author reply their comment. I would like to know if there is any codes to make blog comment reply notifications available.
Topic: what is "Pending" mean?
I had two users in the backend sitting under “users > manage signups” and I didn’t even know they were there. I didn’t receive a notification.
Were they “pending” because they didn’t click the activation email link?
Hey guys !
I am searching since one week for a solution of my problem.
My idea is to create 2 icons in my topbar (no bp-admin-bar, i have an own seperate topbar). I have already create a counter for notification and friends and have a dropdown function.
In the friends dropdown i have input the code from friends-request.php and if you click on the icon there is an dropdown which shows the reqeuest. The problem is that it only shows the reqeust inside the dropdown if you are on a profilpage.
If you hit the notification icon there should be only show new notifications and no friend requests.
At the moment it shows everything.For the counter i use this function:
<?php function bpfr_add_notification_to_page_title( ) { //do not change if the user is not logged in if( ! is_user_logged_in() ) $user_id = get_current_user_id();//logged in user's id $count = bp_notifications_get_unread_notification_count( $user_id ); if( $count > 0 ) $title = sprintf( "You Have %d New Notification(s) - ", $count ); $anzahlNeuigkeiten = $count; echo '<a class="news" data-dropdown="news" aria-controls="autoCloseExample" aria-expanded="false"> <i class="fi-megaphone" ></i></a><span class="update" >'.$anzahlNeuigkeiten.'</span>'; echo '<a style="margin-left:10px;" class="frequest" data-dropdown="friendrequest" aria-controls="autoCloseExample" aria-expanded="false"><i class="fi-torsos"></i></a><span class="update">'; echo bp_friend_get_total_requests_count( bp_loggedin_user_id() ) ; echo '</span>'; } ?>I found already a thread which trys to explain how to fix it ”
How to split out BuddyPress notifications drop down items to their own top level” but there is no content for the dropdown.So my question is . How can I show the requests of friends in the dropdown on every page? And how can filter notifications? It should be like on Facebook, if you hit the friends icon then it shows requests. If you hit the notification icon than it shows news.
Thannk you guys for your help !
Best Regards !
Peter


I have just recently installed BuddyPress on my own website after seeing it being used on another site and I very much like it. One thing that I am not 100% sure of is how the ‘notifications’ work – they seem to be working fine apart from there being no notifications when someone mentions a user in a comment on a post…
… I’m not sure if it is meant to be that way or not, but I do know that the other site I saw BuddyPress on did have notifications whenever a user was mentioned in a comment on a post (so I know it’s possible).
Am I missing something really obvious, or is BuddyPress designed to not give notifications for mentions in comments on a post (even though the ‘mention’ itself does link to the users profile).
Any help much appreciated.
Wordpress version 4.1.1
BuddyPress version 2.2.1