Search Results for 'notification user id'
-
Search Results
-
Hello,
I am trying to create 2 functionalities and i would like to ask for your help please.
1. Trying to get all users with WP_User_Query that have not been active for last 60 days
// Get the contributors and administrators who haven't logged in for 60 days $args = array( 'role__in' => array( 'contributor', 'administrator' ), 'meta_key' => 'last_activity', // this is a meta_key storing the last time the user was logged in by buddypress in 'Y-m-d H:i:s' format 'meta_query' => array( array( 'key' => 'last_activity', 'value' => date('Y-m-d H:i:s', strtotime( "-60 days" )), // what am i doing wrong? 'compare' => '<', 'type' => 'DATE' // Let WordPress know we're working with date ) ) ); $remind_users = new WP_User_Query( $args );
-What am i doing wrong on the comparison?
2. Send en email notification to specific users when there is a sidewide notice on our website.
function important_notification() { $notification = '' . bp_get_message_notice_text( $notice->message ) . ''; $args = array( 'meta_key' => '_is_featured' ); $members = get_users( $args ); foreach( $members as $member ) { $user_id = $member->ID; $member_account = bp_core_get_user_domain( $user_id ); $first_name = $member->first_name; $email_subject = 'Important information'; $message = sprintf( 'Hello %1$s,' , $first_name ) . "<br><br>"; $message .= sprintf( 'We have an important information for you:' ) ."<br><br>"; $message .= sprintf( '<i>%1$s</i>' , $notification ) ."<br><br>"; $message .= sprintf( 'Please login <a href="%1$s" target="_blank">to your account</a> to remove the information if you want.' , $member_account ) ."<br><br>"; wp_mail( $member->user_email, $email_subject, $message ); } } add_action( 'xxxxxxxx', 'important_notification');
-Will the
$notification = '' . bp_get_message_notice_text( $notice->message ) . '';
get the message text of the sidewide notice?
-In which action could i hook this function in order to send an email when admin will publish a sidewide notification?
add_action( ‘xxxxxxxx’, ‘important_notification’);Thank you very much for your time.
Topic: How to get message ID
We have a question regarding the BP Rest API.
We are building a mobile app, in which forum is a key function. BP Rest API is used in our WordPress site that powers this app.
When the forum a user subscribes to has new reply or new topic, the user will receive a notification.
We would like the user click on the notification and be redirected to the forum new forum.
To achieve this on the mobile app, we need message ID to redirect the user to the right screen. We are using BP Rest API. How to obtain the message ID? Please advise.
hello, good evening,
I am using buddypress with bbpress and I have a little problem: when I get a notification where a user mentioned me; I click on the notification and buddypress redirects me to my profile / activity / mention whereas I would like buddypress to redirect me directly to the post.
Does anyone have the solution?
Project Details :
– WordPress version : 5.5.3
– BuddyPress version : 6.3.0
– Website Link : https://microfarmap.dev-local.com/
– Other plugins I use : Advanced Custom Fields PRO, Advanced Custom Fields: JSON, bbPress, bbPress – Moderation Tools, BuddyForm Premium, BuddyForm Advanced Custom Fields, BuddyForm Hook Fields, BuddoForm Members Premium, BuddyPress Username Changer, Custom Post Type UI, LoginPress, Paid Memberships Pro, Progress Map, List & Filter, User Role Editor …Hello,
I have been updating a WordPress website that was made by others, I might lack some information.BuddyPress works like a charm except for a few features :
– From the user profile, we can send friendship requests. As a new user, I sent a friendship request to my admin account. I did receive the notification on my admin profile, but the Friends tab says there is no friend requests pending. It just doesn’t display theme on my customized Understrap theme.
– Switching to WordPress Twenty Twenty One theme does solve the issues. Switching to Understrap parent theme does switch the issue. There seems to be a problem with my custom theme.
Under this custom there, there is a /buddypress/ directory with template pages and loops. The buddypress/members/single/friends/requests-loop.php file was not modified, it’s the default one. That’s where I checked first.
I also checked in the plugin files directly, under plugins/buddypress/bp-friends/bp-friends-functions.php but did not find a clue.
After some research, I found out that only users that have an active ‘ Paid Memberships Pro ‘ subscription can send friend requests, or atleast their friend requests appear.
I also installed the ” BuddyPress Integration ” plugin from Paid Memberships Pro website, in which there is an option to allow non-registered users to send friend requests, but it did not solve the issue.
Please if you need more details or even an access, do not mind asking.
Hi, I have a site with no functions. the only plugin activated is buddy press,
so when it loads the object for the nav after the bp-wrap div it has
<nav class=”main-navs no-ajax bp-navs single-screen-navs horizontal users-nav” id=”object-nav” role=”navigation” aria-label=”Member menu”>
I had the site with custom themes and functions and removed everything to try and find out where it was getting hung up.
Is there something else I can trouble shoot this with to find out why it does not load with Ajax – I thought that should be the default
WP is 5.6
Theme twenty twenty-one 1.1
php 7.4
Buddy Press info Version 7.1.0
Active components Community Members, Extended Profiles, Account Settings, Friend Connections, Private Messaging, Activity Streams, Notifications, User Groups
Active template pack BuddyPress Nouveau 7.1.0 ( I have tried with bp legacy also )
Toolbar No
Account Deletion Yes
Community Members: Profile Photo Uploads Yes
Community Members: Cover Image Uploads Yes
Extended Profiles: Profile Syncing Yes
User Groups: Group Creation Yes
User Groups: Group Photo Uploads Yes
User Groups: Group Cover Image Uploads Yes
Activity Streams: Post Comments Yes
Activity Streams: Activity auto-refresh YesI think I may have spotted a bug in the notifications that are raised for a nested reply.
In
bbpress/includes/extend/buddypress/notifications.php
LINE 165// Notify the immediate reply author if not the current reply author if ( ! empty( $reply_to ) && ( $author_id !== $reply_to_item_id ) ) { $args['user_id'] = $reply_to_item_id; $args['secondary_item_id'] = $topic_author_id; bp_notifications_add_notification( $args ); }
I believe the secondary_item_id here should be $author_id.
Otherwise:
user1 writes the topic
user2 replies to the topic
user3 replies to user2This will add a notification for user2 with user1 as the author, where as it should have a notification for user2 with user3 as the author.
The fix is to change this line to
$args['secondary_item_id'] = $author_id;
Would love to know if I’ve misunderstood the logic here, or if this is a genuine bug.
Thanks
Pete
Some of my users encounter this statement “”There has been a critical error on your site.”, when they create groups. Although when they refresh it and click on their profile the group is created. This is the error found.
[11-Sep-2020 07:12:01 UTC] PHP Fatal error: Uncaught Error: Class ‘PHPMailer’ not found in /srv/htdocs/wp-content/plugins/buddypress/bp-core/classes/class-bp-phpmailer.php:91
Stack trace:
#0 /srv/htdocs/wp-content/plugins/buddypress/bp-core/bp-core-functions.php(3233): BP_PHPMailer->bp_email(Object(BP_Email))
#1 /srv/htdocs/wp-content/plugins/buddypress/bp-groups/bp-groups-notifications.php(365): bp_send_email(‘groups-invitati…’, 102044344, Array)
#2 /srv/htdocs/wp-content/plugins/buddypress/bp-groups/classes/class-bp-groups-invitation-manager.php(55): groups_notification_group_invites(Object(BP_Groups_Group), 102044344, 102044348)
#3 /srv/htdocs/wp-content/plugins/buddypress/bp-core/classes/class-bp-invitation-manager.php(197): BP_Groups_Invitation_Manager->run_send_action(Object(BP_Invitation))
#4 /srv/htdocs/wp-content/plugins/buddypress/bp-groups/bp-groups-functions.php(1718): BP_Invitation_Manager->send_invitation_by_id(1178)
#5 /srv/htdocs/wp-content/plugins/buddypress/bp-groups/actions/create.php(139): groups_send_invites(Array)
#6 /wordpress/core/5.5.1/wp-includes/class-wp-hook.php(287): groups_action_create_group(”)
#7 /wordpress/core/5.5.1/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
#8 /wordpress/core/5.5.1/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#9 /srv/htdocs/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(353): do_action(‘bp_actions’)
#10 /wordpress/core/5.5.1/wp-includes/class-wp-hook.php(287): bp_actions(”)
#11 /wordpress/core/5.5.1/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
#12 /wordpress/core/5.5.1/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#13 /srv/htdocs/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(430): do_action(‘bp_template_red…’)
#14 /wordpress/core/5.5.1/wp-includes/class-wp-hook.php(287): bp_template_redirect(”)
#15 /wordpress/core/5.5.1/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
#16 /wordpress/core/5.5.1/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#17 /wordpress/core/5.5.1/wp-includes/template-loader.php(13): do_action(‘template_redire…’)
#18 /wordpress/core/5.5.1/wp-blog-header.php(19): require_once(‘/wordpress/core…’)
#19 /wordpress/core/5.5.1/index.php(17): require(‘/wordpress/core…’)
#20 {main}
thrown in /srv/htdocs/wp-content/plugins/buddypress/bp-core/classes/class-bp-phpmailer.php on line 91I hope someone can help me with this. This is a link to my site https://getaprofessor.com/
Topic: Bubble Notifications Problem
Hi all! I’m new in php & css.
After reading a lot and learning very little, I managed to program the notifications in my project in php and css. It works fine, shows the amounts (friends, messages and notifications) and redirects where it should.
My problem is that I need to “hide” the bubble of “0” when the user has no notifications and only show when if they have 1 or more notifications
Functions.php
function my_counter_nav_menu($menu) { if ( ! is_user_logged_in() ) { return $menu; } $user_id = bp_loggedin_user_id(); $user_url = bp_loggedin_user_domain(); $friends_url = $user_url . bp_get_friends_slug() . '/'; $msg_url = $user_url . bp_get_messages_slug() . '/'; $notify_url = $user_url . bp_get_notifications_slug() . '/'; ob_start(); ?> <li><a><a href="<?php echo bp_loggedin_user_domain();?>friends"><span class="notifications_icons"><i class="fas fa-user-friends" style="font-size:17px;"></i></span><span class="my_bubble_notify"><?php echo friends_get_friend_count_for_user( $user_id );?></span></a></a></li> <li><a><a href="<?php echo bp_loggedin_user_domain();?>messages"><span class="notifications_icons"><i class="fas fa-envelope" style="font-size:17px;"></i></span><span class="my_bubble_notify"><?php echo bp_get_total_unread_messages_count( $user_id );?></span></a></a></li> <li><a><a href="<?php echo bp_loggedin_user_domain();?>notifications"><span class="notifications_icons"><i class="fas fa-bell" style="font-size:17px;"></i></span><span class="my_bubble_notify"><?php echo bp_notifications_get_unread_notification_count( $user_id );?></span></a></a></li> <?php $menu_items = ob_get_clean(); $menu = $menu . $menu_items; return $menu; } add_filter( 'wp_nav_menu_items', 'my_counter_nav_menu' )
CSS
.notifications_icons { color: #ffffff; vertical-align: middle; margin: -7px; } .my_bubble_notify { color: #ffffff; border-radius: 3px; background-color: #f7823f; vertical-align: 20%; position: relative; font-size: small; padding: 0.1em 5px; }
Buddypress 6.0.0
Wordpress 5.4.2
site: http://www.gamerstroop.com
If you need, you can use test account (acc:test – pw:test)I dont know if I can paste my site link here. If I can’t please remove it or let me know, thank you so much for reading and helping me! <3
Have set up BuddyPress Groups. I opted not to have forums (fora), because I already have nice fora set up in bbPress.
When I view a User’s BuddyPress profile, I see the user’s BuddyPress sub-menu showing :
Home | Activity | Profile | Notifications | Messages |Friends | Groups |Forums | Settings
When I click on ‘Forums’, a page comes up saying:
Forum Topics StartedOh, bother! No topics were found here.
…It seems as if BuddyPress is pointing the User to non-existent BP fora.
How can I either:
(i) HIDE the BP ‘Forums’ sub-menu item (users can access the bbPress fora from a WP widget)
OR
(ii) Make the BP ‘Forums’ sub-menu item link to the bbPress which I have fora already made.
?
Thank you.
Topic: timestamp issue
Hey everybody,
I’ve install the buddypress plugin and every thing works fine.
Just the Time is wrong.The Time “message sent” is always 3 hours behind the real time it was sent.
also the time from the activy, from auser, shows in the future it say “in 4 hours”.But if i get a Notification of a message, there is the correct time shown.
any Idea?
Hello,
I am using buddyboss theme and buddypress plugin and I can not see toolbar or notification bar on the frontend of the site.
which settings do I need to check and which steps I need to follow. please guide asap.I would like to create a simple email send to admin when a user updated a specific Profile Field.
The field is a checkbox so it should be an array because a have multiple values.The code that i alreade try to use is
function buddypress_profile_update( $user_id ) { $admin_email = "YOUR-EMAIL@DOMAIN.COM"; $message = sprintf( __( 'Member: %1$s', 'buddypress' ), bp_core_get_user_displayname( $user_id ) ) . "\r\n\r\n"; $message .= sprintf( __( 'Color: %s' ), bp_get_profile_field_data('field=Color') ). "\r\n\r\n"; wp_mail( $admin_email, sprintf( __( '[YOUR SITE] Member Profile Update' ), get_option('blogname') ), $message ); } add_action( 'xprofile_updated_profile', 'buddypress_profile_update', 10, 5 );
1st Problem. In the email i get just “Color: Array” , i have tried to use vsprintf instead but it gives me back only one value.
2d Problem. I get an email whenever there is an update in general, and not only when there is an update from the specific field with ID 7.
Any help would be appreciated.
The Original Buddypress email template:
{{poster.name}} replied to one of your updates:
"{{usermessage}}"
Go to the discussion to reply or catch up on the conversation.
Is there a way to add a “{{{thread.content}}}” or something similar so that the user can just view the original title of the thread instead of having to head to the URL?
A function that can grab the contents of the original update post and place it inside the email?
Thanks in advance!
On the BuddyPress notification page for users, the page ID appears to be set to 0, which creates issues with other plugins I have that are interacting with that page when it shouldn’t be due to the null value. Is this page intentionally set to a null value and is there a reason that the page ID shows up as a 0?
Thanks!
I’m not one to normally ask for help as I’ve figured out ways to do quite a few things but I just need some conceptual help from people smarter than I.
I have a buddypress instance where someone performs an action on my website (using strava as an example, imagine it’s them logging a workout) and it creates A) a database entry in my own database and B) an activity in the BP world (and database of course).
I am looking to add the ability to tag another user in this activity, and then the other user would then verify (yes/no) and if yes, then it creates the activity in the BP world and in my database.
I have so far been able to add mentions to my custom form (without a problem, what an easy system!) but I’m stuck conceptually how to continue.
Should I create a duplicate activity with the tagged user’s ID? Will that lead to them getting a notification? Is there a way for them to approve or decline the notification that is already in existence or will I have to build something for that?
Just looking for the most “BuddyPress-ic” way to attack this problem and was hoping I could use your insight.
Thanks in advance!
Topic: BuddyPress Friend Request
We have installed and activated buddypress on our multisite. We are currently facing an issue when we tried to add a friend from another user profile. When someone sent a request, I see correctly the notification, but when I click on it, or, when I go in profile > Friends > Request, Buddypress just tells me “No friend request pending”.
I have tried deactivating the plugins and theme but it did not work.
Kindly guide us in fixing the issue.