I swear, probably 80% of my posts result in me solving my own damn problem.
Inside your notification loop, if you can not see the item_id when using print_r on the notification object (returned by bp_core_get_notifications_for_user($uid, ‘object’) ) then call this function on the notification ID: bp_notifications_get_notification( $notif->id )
The object this returns contains the item_id (print_r it to see what’s up).
Hope this helps someone
I’m trying to allow users to take action on notifications on the fly. Thusly, I need the ID for, say, the friend request but all I have is the notification ID. Can I get the friend request ID from the notification ID?
created a forum for people on our website – on the user participant profile within wp dashboard
I gave every participant the same name and password and the email attached to that is a email for our organization, is there anyway to add multiple emails in the wp dashboard – maybe under the user profile (participant) so that I don’t need to create an individual password, username and email for all the participants? I want the forum people to know when someone replied and posted to the forum
Hi agin Thank u & sorry for my late response.
@henrywright & @bphelp this is the feuters that I want:
1- Users can upload their resume.
2- Users can find jobs, people and business opportunities recommended by other users.
3- Employers can list jobs and search for potential candidates.
4- Job seekers can review the profile of hiring managers and discover which of their existing contacts can introduce them.
5- Users can post their own photos and view photos of others to aid in identification.
6- Users can follow different companies and can receive notifications about the new joining and offers available.
7- Users can save (bookmark) jobs that they would like to apply for.
8- Users can “like” and “congratulate” each other’s updates and new employments.
9- Users can see who has visited their profile page.
10- Questions & Answers
11- Advertisments (for admin a.k.a me)
12- Job listings
13- “Apply with” button
14- “Saved Jobs” button
15- Users can endorse each other’s skills.
16- Influencers (like the one in the linkedIn)
thx u all
Wordpress 3.8.1 (multisite with subdirectories); buddypress 2.0; P2 1.5.3;
http://teambox.dongguk.ac.kr/debug/
When using more than 10 @username in a post, BuddyPress freaks out and repeats one of the mentions and adds incremental numbers after the @username, like:
@siegler @jake @groba @buckley @heath @daniel @daryl @stacy @virginia
@steve @jake0 @jake1 @jake2 @jake3 @jake4
If I try to edit the post, the correct @usernames are there without the numbers. Everything looks normal. When I publish, the numbers reappear. Notification emails do not go out to users after the names begin repeating or the numbers get added.
How do I know it’s BuddyPress 2.0?
I’ve been using BuddyPress 1.9.2 for almost a month without this issue. To be sure though I used the filter to disable mentions the problem went away completely.
How do I know it’s P2?
When I use another theme, the problem goes away.
To really see how bad it is, I made a test post with more than 25 @usernames:
@amber @barney @beth @catw @david @dermot @kingsley @hahapauli @leeg @barney @beth @catw @david @dermot @kingsley @hahapauli @leeg @matt @mckerron @michael @patty @phymus @qiana @sabs @sherwin @stuart @virginia @timr @jenhowell77 @siegler @jake @groba @buckley @heath @daniel @daryl @stacy @virginia @steve @paige @patty @amber0 @barney @beth @catw @david @dermot @kingsley @hahapauli @leeg @matt @mckerron @michael @patty @phymus @qiana @sabs @sherwin @stuart @virginia @timr @jenhowell77 @siegler @jake @groba @buckley @heath @daniel @daryl @stacy @virginia @steve @paige @patty @amber1 @barney @beth @catw @david @dermot @kingsley @hahapauli @leeg @matt @mckerron @michael @patty @phymus @qiana @sabs @sherwin @stuart @virginia @timr @jenhowell77 @siegler @jake @groba @buckley @heath @daniel @daryl @stacy @virginia @steve @paige @patty @amber2 @barney @beth @catw @david @dermot @kingsley @hahapauli @leeg @matt @mckerron @michael @patty @phymus @qiana @sabs @sherwin @stuart @virginia @timr @jenhowell77 @siegler @jake @groba @buckley @heath @daniel @daryl @stacy @virginia @steve @paige @patty @amber3 @barney @beth @catw @david @dermot @kingsley @hahapauli @leeg @matt @mckerron @michael @patty @phymus @qiana @sabs @sherwin @stuart @virginia @timr @jenhowell77 @siegler @jake @groba @buckley @heath @daniel @daryl @stacy @virginia @steve @paige @patty @amber5 @barney @beth @catw @david @dermot @kingsley @hahapauli @leeg @matt @mckerron @michael @patty @phymus @qiana @sabs @sherwin @stuart @virginia @timr @jenhowell77 @siegler @jake @groba @buckley @heath @daniel @daryl @stacy @virginia @steve @paige @patty @amber6 @barney @beth @catw @david @dermot @kingsley @hahapauli @leeg @matt @mckerron @michael @patty @phymus @qiana @sabs @sherwin @stuart @virginia @timr @jenhowell77 @siegler @jake @groba @buckley @heath @daniel @daryl @stacy @virginia @steve @paige @patty @amber7 @barney @beth @catw @david @dermot @kingsley @hahapauli @leeg @matt @mckerron @michael @patty @phymus @qiana @sabs @sherwin @stuart @virginia @timr @jenhowell77 @siegler @jake @groba @buckley @heath @daniel @daryl @stacy @virginia @steve @paige @patty @amber8 @barney @beth @catw @david @dermot @kingsley @hahapauli @leeg @matt @mckerron @michael @patty @phymus @qiana @sabs @sherwin @stuart @virginia @timr @jenhowell77 @siegler @jake @groba @buckley @heath @daniel @daryl @stacy @virginia @steve @paige @patty @amber9 @barney0 @barney2 @barney3 @barney4 @barney5 @barney6 @barney7 @barney8 @barney9 @beth0 @beth1 @barney0 @beth2 @beth3 @barney @beth @catw @david @dermot @kingsley @hahapauli @leeg @matt @mckerron @michael @patty @phymus @qiana @sabs @sherwin @stuart @virginia @timr @jenhowell77 @siegler @jake @groba @buckley @heath @daniel @daryl @stacy @virginia @steve @paige @patty @amber3 @amber @beth4 @beth5
what what typed:
@amber @barney @beth @catw @david @dermot @kingsley @hahapauli @leeg @matt @mckerron @michael @patty @phymus @qiana @sabs @sherwin @stuart @virginia @timr @jenhowell77 @siegler @jake @groba @buckley @heath @daniel @daryl @stacy @virginia @steve @paige @patty @amber @johnwendel @calebx
Well, I did that and I have buddypress default registration page. The default registration page has the name as a required field and it can be seen by everyone, I am having problem with buddypress default registration page for many reasons:
1) If you visit the default buddypress registration page, and leave all the fields blanks and hit complete sign up, you will only receive three red notifications for required accounts details as follows:
a. Please enter a username
b. Please check your email address.
c. Please make sure you enter your password twice
Although the name is a required field, but you don’t receive similar message for a required field, and if the user don’t fill the name, the page refreshes without asking the user to fill the name.
2) Having the name as a required feild, will discourage users registration and I am not sure how to make it optional at the registration stage.
Thank you
Awesome, a post that isn’t years old that I may actually be able to help!
In functions.php add the following function:
function cg_current_user_notification_count() {
$notifications = bp_core_get_notifications_for_user(bp_loggedin_user_id(), 'object');
$count = !empty($notifications) ? count($notifications) : 0;
return $count;
}
In frontend-noajax.inc.php (you can find this in plugins/bp-direct-menus/inc) add the following code around line 150 (near where all the counts are initialized):
$notifcount = cg_current_user_notification_count();
$item->title = str_ireplace("%notificationcount%", $notifcount, $item->title);
$item->title = str_ireplace("%(notificationcount)%", ($notifcount > 0) ? '('.$notifcount.')' : '', $item->title);
Hope that helps you, or if you already figured it out, helps somebody else.
Cheers,
Gabe
Hi,
BP is starting to be an awesome platform. A Question. Has anyone put together a “how to use BP” for new users? This is a tricky one since newbies require visual aids that match the theme and configuration of the particular site they are on.
My request is how hard would it be to build a two way mailing system into BP’s groups. By two way, I’m suggesting that if someone posts a comment in a group, everyone subscribed to that group will then get an email/notification of that post(the first direction). They should then be able to use their email client to then post a reply(the 2nd direction), and not have to go back online to the site. I don’t want to put GES (Groupe Email Services) out of business, but that pluggin’s option to configure mail from immediate to various digest types would be a must as well.
Hi,
BP is starting to be an awesome platform. A Question. Has anyone put together a “how to use BP” for new users? This is a tricky one since newbies require visual aids that match the theme and configuration of the particular site they are on.
My request is how hard would it be to build a two way mailing system into BP’s groups. By two way, I’m suggesting that if someone posts a comment in a group, everyone subscribed to that group will then get an email/notification of that post(the first direction). They should then be able to use their email client to then post a reply(the 2nd direction), and not have to go back online to the site. I don’t want to put GES (Groupe Email Services) out of business, but that pluggin’s option to configure mail from immediate to various digest types would be a must as well.
@modemlooper
// I got it working by putting these lines of your code on my existing function
if ( bp_is_user() && bp_user_has_access() ) {
$count = bp_notifications_get_unread_notification_count( bp_displayed_user_id() );
$class = ( 0 === $count ) ? ‘no-count’ : ‘count’;
$bp->bp_nav[‘notifications’][‘name’] = sprintf( __( ‘Alerts <span class=”%s”>%s</span>’, ‘buddypress’ ), esc_attr( $class ), number_format_i18n( $count ) );
}
I really appreciate your gesture. Thank you very much.
BP 1.9+
function custom_notification_menu_tabs(){
global $bp;
if ( bp_is_user() && bp_user_has_access() ) {
$count = bp_notifications_get_unread_notification_count( bp_displayed_user_id() );
$class = ( 0 === $count ) ? 'no-count' : 'count';
$bp->bp_nav['notifications']['name'] = sprintf( __( 'Alerts <span class="%s">%s</span>', 'buddypress' ), esc_attr( $class ), number_format_i18n( $count ) );
}
}
add_action('bp_setup_nav', 'custom_notification_menu_tabs', 201);
Hi Pals,
How can I hid/remove “All Members” notification on the tab. I don’t want to display how many people to logged in users except for super admin? Thanks.
I have a custom field in registration and asking to user membership type with radio button.
There are two selections like “A” and “B” when he registered, as always does in wordpress, i’m getting notification email that “New User Registered on you site bla bla…” i want to add this selection to this email and see fastly which one he/she choosed.
Ex.:
New user registration on your site
Username: John Doe
Email: johndoe@gmail.com
Membership Type: B
Please help if you have an idea..
Looks like 3 of them are from the same topic (15959). Go into the db and do a search on the activity table for secondary_item_id = 15959. That will give you a link to the topic. Go to it and 1: see if it exists still (probably does) and 2: see if there is something weird about it.
OH. Is bbpress up to date? Maybe there is a bbpress plugin causing issues?
I just tested this on my site. I created a topic as one user. I logged in as another and replied to the top. Notification was sent… no problem. I logged in as administrator and deleted the topic completely. The notification title still showed up, so I doubt deletions are your issue.
Sorry that I’m grabbing at straws. It would help if I was having this problem (glad I’m not) 🙂
That sounds like a better approach than mine. I just have a rather crude looking button which marks as read all unread notifications.
bp_notifications_mark_notifications_by_type is the function I’m using to do the marking. For example:
if ( bp_is_active( 'notifications' ) ) {
bp_notifications_mark_notifications_by_type( bp_loggedin_user_id(), buddypress()->messages->id, 'new_message' );
bp_notifications_mark_notifications_by_type( bp_loggedin_user_id(), buddypress()->activity->id, 'new_at_mention' );
}
Hello
I have installed the latest version of BP, and the notification setting for internal PM’s is set by notify by email by default, which I have not changed. However, I am unable to get email notifications for the users when they receive PM’s. Anyone have an idea what I can do to approach this problem?
I also have the plugin “Invite Anyone”, and last time I used it I was unable to make it send external email notifications as well, so there might be a common problem..
Hi @transmission,
this is not the solution, but an example for your inspiration.
The below shows how the notification counter can be moved/implemented on the toolbar.
/* moving the notification counter from right to left */
remove_action( 'admin_bar_menu', 'bp_members_admin_bar_notifications_menu', 90 );
function bpfr_notification_ontheleft() {
global $wp_admin_bar;
if ( !is_user_logged_in() )
return false;
$notifications = bp_core_get_notifications_for_user( bp_loggedin_user_id(), 'object' );
$count = !empty( $notifications ) ? count( $notifications ) : 0;
$alert_class = (int) $count > 0 ? 'pending-count alert' : 'count no-alert';
$menu_title = '<span id="ab-pending-notifications" class="' . $alert_class . '">' . $count . '</span>';
// Add the top-level Notifications button
$wp_admin_bar->add_menu( array(
/*'parent' => 'top-secondary',*/ // this is the original position
'id' => 'bp-notifications',
'title' => $menu_title,
'href' => bp_loggedin_user_domain(),
) );
if ( !empty( $notifications ) ) {
foreach ( (array) $notifications as $notification ) {
$wp_admin_bar->add_menu( array(
'parent' => 'bp-notifications',
'id' => 'notification-' . $notification->id,
'title' => $notification->content,
'href' => $notification->href
) );
}
} else {
$wp_admin_bar->add_menu( array(
'parent' => 'bp-notifications',
'id' => 'no-notifications',
'title' => __( 'No new notifications', 'buddypress' ),
'href' => bp_loggedin_user_domain()
) );
}
return;
}
add_action( 'admin_bar_menu', 'bpfr_notification_ontheleft',30);
/* other position # are 10, 20, 40, 50, 60, 70, 80, 90 */
In your case, you also have to check this Codex page. And possibly do some research here.
Hi,
I am using the new (?) dynamic menus to link to a users profile, messages etc. I would like to show a notification count in the menu, next to where it says “min profil”. Does anyone know a simple way to do this. Thanks in advance for any help/pointers.

@mercime
Ok, set up a throw-away account.
URL: http://slamfans.com/wp/members/demouser01/
Login: demouser01
Pass: demo123
On that demouser01 profile page, you should see where the Achievements link is forced to a second line but it’s still following the CSS positioning. If you visit another member page, you don’t see that error. I’m assuming that’s because you don’t see the Notifications link on other members profiles.
I’m trying to remember how I did it on another Buddypress site where I was able to force all of the plugin links, like Achievements, into a second line so that the first line remains with all of the default links. I did that about 2-3 years ago and that since has since floated away into the aether. So dunno if it’s even possible anymore with recent changes to Buddypress.
Hope there’s a solution to be had. (But thinking about it, it would be awesome if there was a plugin that could me made for custom WP themes that would allow you to position links in the order and places you’d like.)
Thanks!
Hello,
I’m getting the above error whenever anyone other the admin tries to access
any BP functions – profile, forums, notifications, docs, etc…
Literally everything was working fine last night. Got up, had emails from my members
asking what’s going on?
I’ve disabled the theme I was using – BP-Social, I’ve reset permalinks, I’ve disabled
every plugin, changed the theme, reset the permalinks again, then enabled the plugins…
no change.
I’ve tried taking another user and making them an admin – but if with those credentials
things still didn’t work. Apparently only my original admin username is the only account
that is working normally.
Can someone please help? Normally I wouldn’t be freaking out like this but I just out 30K
emails last night inviting people to the site…timing is everything! LOL
Thank you for any help!!!
Rob
Hello,
I’m having trouble with the friend requests when someone adds a friend, appears in the notification bar, but when I go to accept or reject, do not show any friend request.
I did a debug and queries are failing:
SELECT DISTINCT FROM u.user_id the wp_bp_xprofile_data u WHERE id = AND u.field_id u.user_id IN (2) ORDER BY ASC LIMIT 0 u.value, 20
SELECT COUNT (DISTINCT u.user_id) FROM WHERE u.field_id wp_bp_xprofile_data u = AND u.user_id IN (2)
It’s not filling the u.field_id, I do not know what to do, please help.
I have been messing about with buddypress for a while now and I am hoping to start a whole new business based on a website for people connecting together(using buddyypress)
Currently I am no where near ready to launch and is wordpress + buddypress with a bunch of other plugins and layouts I am trying out. I have a couple of questions so far that although I have found information on, its outdated or not very clear. Please be aware I can tinker about with code buy I am no coder.
Newsletter/Mass Message Users
Is there a way to send out a newsletter to all members email addresses? Or the alternative being sending them a mass private message that they see and get a email notification about? If not then what is my options for integrating something like mailchimp to the registration process with a checkbox?
Profile Views
Who is looking at your profile, how many times etc. Currently I have only found “YD Profile Visitor Tracker” is there anything else out there?
Media Files
I am wanting to add the ability of adding media files to activity updates, rtmedia is the best I have found, any other options?
Social Network Only
I really want this to be more like a social network rather than somewhere to have discussions in groups. Can groups just be somewhere to list members rather than post any activity within them? Or can this be restricted to admin users only?
Finally – Ideas Wall
For example http://www.wedundee.com/view-thoughts/ – This website lets users submit there thoughts and it is displayed in a nice decorative wall. Is there anything similar (wordpress/buddypress) can achieve? Would be good to see users of my site be able to share those ideas, comment and “like” those ideas.
When user accepts a friendship request the author of request receives a notification “%s accepted your friendship request”, but when there’s more than one notification of this type is shown “%d friends accepted your friendship requests”, what I want is one-per-one notification for each accepted request.
and also, how can i get the notification’s ID in the ‘friends_format_notifications’ function, I need this because I’m implementing to when user click in the notification, mark it as read (facebook-like).
Hi @oken
In BP 1.9 + you can now do
echo bp_notifications_get_unread_notification_count( bp_loggedin_user_id() );
I have some custom front-end displays for notifications set up (i.e. a dropdown menu item). I notice when I get a message (assuming it is just a single message) the link will take me to the message itself. I get the notifications using bp_core_get_notifications_for_user($uid, ‘object’). I added a custom notification insert for comments on activity replies using bp_core_add_notification(). I want these notifications to have the same behavior as those of single messages. How do message notifications pass a link to the get_notifications function? How would I do the same for bp_core_add_notification()? Do I need to pass it in that function itself, or is the url to the individual activity inherent in the notification whether you pass it or not? Currently my custom notifications take me to the users activity stream, but don’t go to the activity that was commented on.
P.S. Bonus points if the link just scrolls down to the appropriate activity on the stream as opposed to going to the individual activity url – either works though at this point