Search Results for 'notification user id'
-
Search Results
-
Hello, I’m using Buddypress 3.1.0, bbPress 2.5.14, and the Boss theme 2.4.6 to create an online network/forums website. The website is 7ctest2.site and the wordpress version is 4.9.8.
Is it possible to merge the Read and Unread notifications into one page on /members/user/notifications/ ?
How would I go about implementing this?
I’m new to both Buddypress and bbPress and was handed down this website to complete. Any help or idea would be helpful. Thank you!
Hello friends
Got this code from buddydev website
for theme functions php
works, but newer versions of buddypress have
5 group options. This code covers 4.——————————————————————————————————
add_action( ‘bp_core_activated_user’,‘bpdev_set_email_notifications_preference’);
function bpdev_set_email_notifications_preference( $user_id ) {
//I am putting all the notifications to no by default
//you can set the value to ‘yes’ if you want that notification to be enabled.
$settings_keys = array(
‘notification_activity_new_mention’ => ‘no’,
‘notification_activity_new_reply’ => ‘no’,
‘notification_friends_friendship_request’ => ‘no’,
‘notification_friends_friendship_accepted’ => ‘no’,
‘notification_groups_invite’ => ‘no’,
‘notification_groups_group_updated’ => ‘no’,
‘notification_groups_admin_promotion’ => ‘no’,
‘notification_groups_membership_request’ => ‘no’,
‘notification_messages_new_message’ => ‘no’,
);foreach( $settings_keys as $setting => $preference ) {
bp_update_user_meta( $user_id, $setting, $preference );
}//that’s it. have fun!
}
———————————————————————————————————
This is the option it doesn’t cover—–
#5
“Your request to join a group has been approved or denied”Can anyone update this ? That would be awsome.
Thanks alot
buddypress 2.8.2
WordPress 4.7.5Hi,
I’m new to buddypress and I was trying to add the xprofile fields to admin email after activation.
I found this code and I’m desperately trying to figure out how to make it work.
/* Plugin Name: Custom New User Email Description: Changes the copy in the email sent out to new users */ // Redefine user notification function if ( !function_exists('wp_new_user_notification') ) { function wp_new_user_notification( $user_id, $plaintext_pass = '' ) { $user = get_userdata( $user_id ); // The blogname option is escaped with esc_html on the way into the database in sanitize_option // we want to reverse this for the plain text arena of emails. $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); // find the profile field for referrer //$field1 = xprofile_get_field_data( 'Referrer', $user_id ); $field1 = xprofile_get_field_data( 'field_id=1', $user_id ); $field2 = xprofile_get_field_data( 'field_id=2', $user_id ); $field3 = xprofile_get_field_data( 'field_id=3', $user_id ); $field4 = xprofile_get_field_data( 'field_id=4', $user_id ); $field5 = xprofile_get_field_data( 'field_id=5', $user_id ); $field6 = xprofile_get_field_data( 'field_id=6', $user_id ); $field7 = xprofile_get_field_data( 'field_id=32', $user_id ); $field8 = xprofile_get_field_data( 'field_id=8', $user_id ); $field9 = xprofile_get_field_data( 'field_id=9', $user_id ); $field10 = xprofile_get_field_data( 'field_id=10', $user_id ); $field11 = xprofile_get_field_data( 'field_id=13', $user_id ); $field12 = xprofile_get_field_data( 'field_id=16', $user_id ); $field13 = xprofile_get_field_data( 'field_id=25', $user_id ); $message = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n"; $message .= sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n"; $message .= sprintf(__('E-mail: %s'), $user->user_email) . "\r\n\r\n"; $message .= sprintf(__('First Name: %s'), $field1) . "\r\n"; $message .= sprintf(__('Last Name: %s'), $field2) . "\r\n"; $message .= sprintf(__('Job Title: %s'), $field3) . "\r\n"; $message .= sprintf(__('Company: %s'), $field4) . "\r\n"; $message .= sprintf(__('Address 1 : %s'), $field5) . "\r\n"; $message .= sprintf(__('Address 2 : %s'), $field6) . "\r\n"; $message .= sprintf(__('Country : %s'), $field7) . "\r\n"; $message .= sprintf(__('City: %s'), $field8) . "\r\n"; $message .= sprintf(__('Zip: %s'), $field9) . "\r\n"; $message .= sprintf(__('Phone: %s'), $field10) . "\r\n"; $message .= sprintf(__('Fax: %s'), $field11) . "\r\n"; $message .= sprintf(__('Relationship: %s'), $field12) . "\r\n"; $message .= sprintf(__('Interest: %s'), $field13) . "\r\n"; @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message); if ( empty($plaintext_pass) ) return; $message = sprintf(__('Username: %s'), $user->user_login) . "\r\n"; $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n"; $message .= wp_login_url() . "\r\n"; wp_mail($user->user_email, sprintf(__('[%s] Your username and password'), $blogname), $message); } }Please help.
Thank you so much
Dennis
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