Search Results for 'notification user id'
-
Search Results
-
I’ve been using bp_notifications_add_notification to add a notification with “component_action”=”activity_liked” for component_name activity. I can see that it is being saved in the database, but when I try to display an entry for it in the notifications view it seems that my callback function never runs. Every example I’ve found online has mirrored my function but it never seems to be called. Do I need to register the component_action or something?
I’ve looked in the buddypress core files and they all seem to pass 8 parameters instead of 5 during apply_filters_ref_array, which I also tried but still my callback wouldn’t run. I’ve tried it every way with no other plugins but buddypress activated and still it fails.
I’m truly lost on how to get this working.
function custom_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) { // New custom notifications if ( $action == 'activity_liked') { $custom_title = 'activity liked'; $custom_link = '/activity/' . $item_id . '/'; $custom_text = bp_core_get_user_displayname( $secondary_item_id ) . ' liked your activity'; // WordPress Toolbar if ( 'string' === $format ) { $return = apply_filters( 'custom_filter', '<a href="' . esc_url( $custom_link ) . '" title="' . esc_attr( $custom_title ) . '">' . esc_html( $custom_text ) . '</a>', $custom_text, $custom_link ); // Deprecated BuddyBar } else { $return = apply_filters( 'custom_filter', array( 'text' => $custom_text, 'link' => $custom_link ), $custom_link, (int) $total_items, $custom_text, $custom_title ); } } else { $return = $action; } return $return; } add_filter( 'bp_notifications_get_notifications_for_user', 'custom_format_buddypress_notifications', 10, 5 );
Topic: Email solution
The buddypress default notifications are causing us to exceed our hosts email limit, and our host is throttling emails which is causing new users not to receive their confirmation email to signup. Someone recommended MailGun but not sure if it will work well integrating into an existing site? Considered using buddypress notification plugin to change defaults on notifications to “no” but don’t want to limit new users email notifications. SendGrid said they don’t have a solutions and recommended MailGun but MailGun seemed to have some issues playing nice with BuddyPress. Your thoughts and ideas would be appreciated, trying not to spend too much $ but also trying not to cause issues with a successful site either. How do you deal with issue of exceeding email allotment on your hosts?
Searched here and couldn’t find an answer, but if I missed it please direct me to it. Thank you again
Hello I’m trying to Call Xprofile Field Data into the Appointments+ notification email
I have create an xprofile field with id 206 and I am also using WPMU appointments+ Within that there is a email notification template section where you can insert PlaceHolder code to pull the users info into the emails. They have some built in but I need to add a new one
I have made a new field and want to add USERS_PHONE to the placeholder system.
this is the code snippet im working in
$customerUser = get_userdata($r->user);
$artistUser = get_userdata($r->worker);$args = array(
‘user’ => $r->name,
‘customer_username’=>$customerUser->user_login,
‘artist_username’=>$artistUser->user_login,
‘service’ => $appointments->get_service_name( $r->service ),
‘worker’ => appointments_get_worker_name( $r->worker ),
‘datetime’ => $r->start,
‘price’ => $r->price,
‘deposit’ => $appointments->get_deposit( $r->price ),
‘phone’ => $r->phone,
‘note’ => $r->note,
‘address’ => $address,
’email’ => $email,
‘city’ => $r->city,
‘number_of_guest’=>$r->number_of_guest,
‘travel_type’=>$travel_type,
‘ID’=>$r->ID
);Now I’ve used <?php echo xprofile_get_field_data(‘206’); ?> and can show the info within a page template but do not know how to make the above code work. My disconnect is how to pull the xprofile data into this snippet and then call the data to show in the email. I will use USERS_PHONE in the email template to call the data
Topic: Fake Notifications Error
Hi
I have some Fake BuddyPress Notifications that are creating issues on a few functions on my site including the LMS.
When a user logs in he has hundreds of fake notifications on the top right WP profile
Until the notifications are there a few links/pages/lessons don’t work as expected.
As soon as you click on some pages like EDIT MY PROFILE the notifications disappear & everything is fine again.Here is a 30 sec video https://youtu.be/8ZFJQ2nJ72g
Everything is up to date on the site and it happened with a few themes
Does anybody have the fix?Regards
AntonioI had an old WP site that came back to life. It was running phpBB, and I successfully imported everything to bbPress. In the new site, we are also using BuddyPress. Old users are reporting that they are now getting email notifications on replies from forum posts that are many years old.
After first posting this to the bbPress support forums, I kept digging. The email notifications came from BuddyPress. I initially thought it was bbPress, since it was linked to a forum reply. But apparently, after the old users logged into the new site as themselves again, BuddyPress grabbed the forum replies (even though really old) and added them to the user’s activity stream. The activity stream sees it as a new mention to another member, and that triggered the email notification.
Ideas and guidance are appreciated.
Hiya guys.
Unfortunately, I am having serious problems with a topic seen here every once in a while. I did go through all the posts I could find and tried half a dozen approaches, but none seems to be working.
I am adding notifications to a user when someone is requesting access to a post of that user and so far, everything is fine. The notification shows up in the DB with ID, user id, item_id and secondary_id as well as component_name and component_action.
Now, whenever I receive such a notification, it shows up completely blank.
This is my code:function request_filter_notifications_get_registered_components( $component_names = array() ) { // Force $component_names to be an array if ( ! is_array( $component_names ) ) { $component_names = array(); } // Add 'custom' component to registered components array array_push( $component_names, 'project-pitches' ); // Return component's with 'custom' appended return $component_names; } add_filter( 'bp_notifications_get_registered_components', 'request_filter_notifications_get_registered_components' ); // Formatting custom with respect to action function bp_request_format_buddypress_notifications( $component_action_name, $item_id, $secondary_item_id, $item_count, $format = 'string' ) { if ($component_action_name !== 'request') { return $component_action_name ; } $link = get_site_url(); $returnlink = $link . "/my-projects/"; $request_title = "Test"; /*get_the_title($item_id);*/ $request_link = $returnlink; $request_text = "abc"; // New custom notifications if ( 'request' === $component_action_name ) { // WordPress Toolbar if ( 'string' === $format ) { $return = apply_filters( 'request_filter','Your custom notification for <a href="'.$request_link.'">'.$request_title.'</a> ', $request_text, $request_link ); $return = "Test"; // Deprecated BuddyBar } else { $return = apply_filters( 'request_filter', array( 'text' => $request_text, 'link' => $request_link ), $request_link, (int) $total_items, $request_text, $request_title ); } return $return; } } add_filter( 'bp_notifications_get_notifications_for_user', 'bp_request_format_buddypress_notifications', 10, 5 );
Any idea what I might be doing wrong here? Thanks a ton, this is driving me nuts!
As an admin and people @mention me a lot on bbpress, I’m getting a ton of emails when people keep quoting a post that I was mentioned in.
Please can we disable mentions when they are inside a quote? THe person has already been notified when the OP did the mention. Please remove this bombardment of emails when users keep quoting the OP.
Thank you. Also I have no option in my profile settings (on my website) about mentions, so I cannot even disable email notifications. Maybe as I have activity stream disabled?
First of all, a big thank you to all contributors for this useful and traight out mindblowing software! And for free! Wow! :
In general I am not much of a coder, but I can understand some, and I have two questions:
QUESTION 1.
About buddypress bubble notification (not email) when there is a bbpress answer to a topic you either started or are subscribed to:
– This does not work on my new site – should it? As buddypress and bbpress are so welded together, it would surprise me if this “bubble notification on forum replies” is not thought about before, but if it isn’t – what would I want to do, to notify users via the bubble when someone replies to a topic they either started or subscribed to?
– I have enabled the notification addon in buddypress, and I reveive emails, it just doesn’t notify via the bubble.QUESTION 2.
When a new member register, and is active – either in bbpress or in buddypress / groups or updates his profile or something else – he is still not visible under sitewide activity: New members. This does not work on a clean install of newest wordpress, newest buddypress and whatever theme. I’ve tested many.Is this a bug, or do I have to do something to the settings to make this work?
Hello,
I’m creating a gifting system for my website. When user sends gift to another user, receiver should receive a notification.
Here’s what I tried:
gift class:
<?php class tbtPoklon { public function init() { add_filter( 'bp_notifications_get_registered_components', array($this, 'add_component') ); add_filter( 'bp_notifications_get_notifications_for_user', array($this, 'display_notification'), 10, 5 ); } public function get_gifts() { global $wpdb; $gifts = json_decode(json_encode($wpdb->get_results("SELECT * FROM tbt_pokloni")), True); return $gifts; } public function get_gift($gift_id) { global $wpdb; $gift_data = json_decode(json_encode($wpdb->get_results("SELECT * FROM tbt_pokloni WHERE gift_id = {$gift_id}")), True); return $gift_data[0]; } public function add_component( $component_names = array() ) { if ( ! is_array( $component_names ) ) { $component_names = array(); } array_push( $component_names, 'tbtPoklon' ); return $component_names; } public function display_notification( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) { if ( 'tbtPoklonPoslan' === $action ) { $senderName = bp_core_get_user_displayname( $item_id ); $custom_title = $senderName." ti je poslao/la poklon! otvori..."; $custom_link = "#"; $custom_text = $custom_title; if ( 'string' === $format ) { $return = apply_filters( 'tbtPoklon_filter', '<a href="' . esc_url( $custom_link ) . '" title="' . esc_attr( $custom_title ) . '">' . esc_html( $custom_text ) . '</a>', $custom_text, $custom_link ); } else { $return = apply_filters( 'tbtPoklon_filter', array( 'text' => $custom_text, 'link' => $custom_link ), $custom_link, (int) $total_items, $custom_text, $custom_title ); } return $return; } } public function send_notification( $sender, $reciever, $gift ) { bp_notifications_add_notification( array( 'user_id' => $reciever, // Gift reciever 'item_id' => $sender, // Gift sender 'secondary_item_id' => $gift, // Gift ID 'component_name' => 'tbtPoklon', 'component_action' => 'tbtPoklonPoslan', 'date_notified' => bp_core_current_time(), 'is_new' => 1, ) ); } }
calling send_notification method:
<?php function test_notification() { $class = new tbtPoklon(); $class->init(); $class->send_notification(17 /* sender */, 1 /* receiver */, 5 /* gift id */); } test_notification();
I get this error: [13-Feb-2018 21:59:06 UTC] Table ‘prefix.n’ doesn’t exist za upit SELECT * FROM n WHERE user_id IN (1) AND item_id IN (17) AND secondary_item_id IN (5) AND component_name IN (‘tbtPoklon’) AND component_action IN (‘tbtPoklonPoslan’) AND is_new = 1 koji je postavio/la require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), include(‘/themes/kleo-child/functions.php’), sendtestnot, tbtPoklon->send_notification, bp_notifications_add_notification, BP_Notifications_Notification::get
I hope you could help me. Thanks, regards.
Hello everyone. I really need some help here.
So I’ve had issues with not receiving (and users not receiving) notification emails before. I’ve done the whole deactivating plugins to see what is not compatible, I’ve repaired emails under TOOLS. I’ve even uninstalled and reinstalled BuddyPress and bbpress, but for whatever reason I cannot fix this problem this time. Also, while trying to fix this problem myself, I realized that if you are using a YAHOO account then you will receive notifications, but it is not working at all for gmail or Texas University email accounts. I became aware of this problem today and it was working perfectly fine last Friday. Please, if someone can help me with this problem it would be greatly appreciated!