Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'notification user id'

Viewing 25 results - 176 through 200 (of 768 total)
  • Author
    Search Results
  • phucitol
    Participant

    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 );
    #272567

    Topic: Email solution

    in group forum Installing BuddyPress
    mrditt
    Participant

    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

    #272517
    Varun Dubey
    Participant

    @demiano You can try following codes inside your child theme functions.php or use code snippet plugin

    
    add_action( 'bp_core_activated_user', 'wb_set_email_notifications_preference');
     
    function wp_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 );
        }
    
    }
    
    kwavewd
    Participant

    So here’s what I have done.

    if I set it like this

    $User_phone = get_userdata($r->user);
    $Worker_phone = 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,
    			'user_phone'  => $User_phone->user_login,
    			'worker_phone' => $Worker_phone->user_login,
    			'note'     => $r->note,
    			'address'  => $address,
    			'email'    => $email,
    			'city'     => $r->city,
    			'number_of_guest'=>$r->number_of_guest,
    			'travel_type'=>$travel_type,
    			'ID'=>$r->ID
    		);

    and I set USER_PHONE and WORKER_PHONE in my email templates is shows the correct usernames or worker name of each user or worker in the emails so the shortcode setup works it’s just the data on the right .

    so It would seem what need to be changed is this

    'user_phone'  => $User_phone->user_login,
    'worker_phone' => $Worker_phone->user_login,

    but if I change to

    $User_phone->user_login, to $wpdb->get_col(“SELECT value FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 7 AND user_id = $r->ID”),

    you were missing the closing ” and I can’t put ; it has to be , at the end

    it shows no errors just shows blank on the email.

    here is the entire confirmation email template

    <?php
    
    class Appointments_Notifications_Confirmation extends Appointments_Notification {
    
    	/**
    	 * Send confirmation email to customer, admin and worker
    	 *
    	 * @param integer $app_id Appointment ID
    	 *
    	 * @return bool True if emails were sent
    	 */
    	public function send( $app_id ) {
    		$appointments = appointments();
    
    		$app = appointments_get_appointment( $app_id );
    		if ( ! $app ) {
    			return false;
    		}
    
    		$options = appointments_get_options();
    
    		$send_confirmation = 'yes' === $options["send_confirmation"];
    		$send_confirmation = apply_filters( 'appointments_send_confirmation', $send_confirmation, $app_id );
    		if ( ! $send_confirmation ) {
    			return false;
    		}
    
    		$sent_to = array();
    		$customer_email = $app->get_customer_email();
    		$result = $this->customer( $app_id, $customer_email );
    
    		if ( $result ) {
    			$sent_to[] = $customer_email;
    			$admin_email = $appointments->get_admin_email();
    			if ( ! in_array( $admin_email, $sent_to ) && $this->admin( $app_id, $admin_email ) ) {
    				$sent_to[] = $admin_email;
    			}
    
    			$worker_email = $appointments->get_worker_email( $app->worker );
    			if ( ! in_array( $worker_email, $sent_to ) ) {
    				$this->admin( $app_id, $worker_email );
    			}
    
    			return true;
    
    		}
    
    		return $result;
    	}
    
    	/**
    	 * Sends a confirmation email to the customer
    	 *
    	 * @param int $app_id Appointment ID
    	 * @param string $email Email to send to
    	 *
    	 * @return bool True if the email has been sent
    	 */
    	public function customer( $app_id, $email ) {
    		$appointments = appointments();
    
    		$r = appointments_get_appointment( $app_id );
    		if ( ! $r ) {
    			return false;
    		}
    
    		if ( ! is_email( $email ) ) {
    			$this->manager->log( sprintf( __( 'Unable to notify the client about the appointment ID:%s confirmation, stopping.', 'appointments' ), $app_id ) );
    			return false;
    		}
    
    		$template = $this->get_customer_template( $app_id, $email );
    		if ( ! $template ) {
    			return false;
    		}
    
    		$attachments = apply_filters( 'app_confirmation_email_attachments', '', $app_id );
    		$mail_result = wp_mail(
    			$email,
    			$template['subject'],
    			$template['body'],
    			$appointments->message_headers(),
    			$attachments
    		);
    
    		if ( ! $mail_result ) {
    			return false;
    		}
    
    		$this->manager->log( sprintf( __('Confirmation message sent to %s for appointment ID:%s','appointments'), $r->email, $app_id ) );
    
    		do_action( 'app_confirmation_sent', $template['body'], $r, $app_id, $email );
    
    		return true;
    	}
    
    	/**
    	 * Send a confirmation email to admin
    	 *
    	 * @param $app_id
    	 * @param $admin_email
    	 *
    	 * @return bool
    	 */
    	public function admin( $app_id, $admin_email ) {
    		$appointments = appointments();
    
    		$r = appointments_get_appointment( $app_id );
    		if ( ! $r ) {
    			return false;
    		}
    
    		$disable = apply_filters( 'app_confirmation_disable_admin', false, $r, $app_id, $admin_email );
    		if ( $disable ) {
    			return true;
    		}
    
    		if ( ! is_email( $admin_email ) ) {
    			return false;
    		}
    
    		$template = $this->get_admin_template( $app_id );
    
    		if ( ! $template ) {
    			return false;
    		}
    
    		$result =  wp_mail(
    			$admin_email,
    			$template['subject'],
    			$template['body'],
    			$appointments->message_headers()
    		);
    
    		if ( $result ) {
    			do_action( 'appointments_confirmation_admin_sent', $admin_email, $app_id, $template['body'], $template['subject'] );
    		}
    
    		return $result;
    	}
    
    	public function get_admin_template( $app_id ) {
    		global $wpdb;
    		$appointments = appointments();
    
    		$r = appointments_get_appointment( $app_id );
    		if ( ! $r ) {
    			return false;
    		}
    
    		$customer_email = $r->get_customer_email();
    		if ( ! $customer_email ) {
    			return false;
    		}
    		
    		
    
    		/*$provider_add_text  = sprintf( __('A new appointment has been made on %s. Below please find a copy of what has been sent to your client:', 'appointments'), get_option( 'blogname' ) );
    		$provider_add_text .= "\n\n\n";
            
    		$subject = __('New Appointment','appointments');*/
            /*Added by */
            $options = appointments_get_options();
            $subject = $options["confirmation_subject_artist"];
            $provider_add_text = $options['confirmation_message_artist'];
            
             
    
             if($r->travel_type==2){
             	$address=$r->address;
             	$travel_type="Photographer Travel to Me";
             } else {
             	$sql = "SELECT * FROM <code>wppl_friends_locator</code> where member_id=".$r->worker;
    			 
    			$squad=$wpdb->get_results( $sql );
    			
    			if($squad){				
    				$address=$squad[0]->formatted_address;
    			}
    			else{
    				$address="";
    			}
             	$travel_type="Travel to Photographer";
             }
                 $customerUser = get_userdata($r->user);
             $artistUser = get_userdata($r->worker);
    	
    	
    	 
    $User_phone = get_userdata($r->user);
    $Worker_phone = 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,
    			'user_phone'  => $User_phone->user_login,
    			'worker_phone' => $Worker_phone->user_login,
    			'note'     => $r->note,
    			'address'  => $address,
    			'email'    => $email,
    			'city'     => $r->city,
    			'number_of_guest'=>$r->number_of_guest,
    			'travel_type'=>$travel_type,
    			'ID'=>$r->ID
    		);
    
    		$provider_add_text = $this->replace_placeholders( $provider_add_text, $args, 'confirmation-body', $r );
              /*end Added by */
            
    		$body = $this->get_customer_template( $app_id, $customer_email );
    
    		return array(
    			'subject' => $subject,
    			'body' => $provider_add_text 
    		);
    	}
    
    	public function get_customer_template( $app_id, $email ) {
    		global $wpdb;
    		$appointments = appointments();
    
    		$r = appointments_get_appointment( $app_id );
    		if ( ! $r ) {
    			return false;
    		}
    
    		$options = appointments_get_options();
    		$body = $options['confirmation_message_customer'];
           
             
    
             if($r->travel_type==2){
             	$address=$r->address;
             	$travel_type="Photographer Travel to Me";
             } else {
    			$sql = "SELECT * FROM <code>wppl_friends_locator</code> where member_id=".$r->worker;
    			 
    			$squad=$wpdb->get_results( $sql );
    			
    			if($squad){
    				$address=$squad[0]->formatted_address;
    			}
    			else{
    				$address="";
    			}
             	
             	$travel_type="Travel to Photographer";
             }
              $customerUser = get_userdata($r->user);
             $artistUser = get_userdata($r->worker);
    		 
    		$Worker_phone = 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,
    			'worker_phone'  => $Worker_phone->user_login,
    			'note'     => $r->note,
    			'address'  => $address,
    			'email'    => $email,
    			'city'     => $r->city,
    			'number_of_guest'=>$r->number_of_guest,
    			'travel_type'=>$travel_type,
    			'ID'=>$r->ID
    		);
    
    		$body = $this->replace_placeholders( $body, $args, 'confirmation-body', $r );
    
    		$body = $appointments->add_cancel_link( $body, $app_id );
    		$body = apply_filters( 'app_confirmation_message', $body, $r, $app_id );
    
    		$subject = $options["confirmation_subject_customer"];
    		$subject = $this->replace_placeholders( $subject, $args, 'confirmation-subject', $r );
    
    		return array(
    			'subject' => $subject,
    			'body' => $body
    		);
    	}
    
    }

    thank you again

    kwavewd
    Participant

    I believe the user is is already pulled because we show username, links to profile pages in email template already.

    There is a notification file but I already called USER_PHONE AND WORKER_PHONE. Correctly into this file.

    		$replacement = array(
    			'/\bSITE_NAME\b/U'        => wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ),
    			'/\bCLIENT\b/U'           => $args['user'],
    			'/\bCUSTOMER_USERNAME\b/U'=> $args['customer_username'],
    			'/\bARTIST_USERNAME\b/U'  => $args['artist_username'],
    			'/\bSERVICE_PROVIDER\b/U' => $args['worker'],
    			'/\bSERVICE\b/U'          => preg_replace( '/\$(\d)/', '\\\$$1', $args['service'] ),
    			'/\bDATE_TIME\b/U'        => mysql2date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $args['datetime'] ),
    			'/\bORDER_ID\b/U'         => $args['ID'],
    			'/\bTRAVEL_TYPE\b/U'      => $args['travel_type'],
    			'/\bUSER_PHONE\b/U'       => $args['user_phone'],
    			'/\bWORKER_PHONE\b/U'     => $args['worker_phone'],		

    This basically sets the SHORTCODE for use in admin notification email template section.

    I think I also need to add some code to the functions.php file of my theme. I see some other coding in functions.php from my past developer but it may not be related to the notification parts.

    
    $profile_name=xprofile_get_field_data( 'Profile Name' , $user_id );
        if($profile_name!=""){
    		global $wpdb;
    		$query="select * from {$wpdb->prefix}bp_xprofile_data";
    		$phone=$wpdb->get_results($query);
    		if(count($phone)>0){
    			$arr=array();
    			foreach($phone as $service){
    			$arr[]=	$service->ID;
    			$arr2=array(
    				'service_id' => $service->ID,
    				'provider_id' => $user_id,
    				'additional_price' => 0						
    				);
    				
    			$wpdb->insert( "{$wpdb->prefix}app_service_additional_price", $arr2);
    			}

    I don’t understand how we can change this to bp_xprofile_data all I need to call at this point is the phone data id 206 and 7 the field title is Phone.

    This is what I have in my confirmation template but not working error line user phone and worker phone

    $User_phone = get_userdata($r->phoneuser);
    $Worker_phone = get_userdata($r->phoneworker);
    		 
    		$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,
    			'user_phone'  => $User_phone->user_login,
    			'worker_phone' => $Worker_phone->user_login,
    			'phoneuser' => $wpdb->get_col("SELECT value FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 206 AND user_id = $user_id");
    			'phoneworker' => $wpdb->get_col("SELECT value FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 7 AND user_id = $user_id");	
    			'note'     => $r->note,
    			'address'  => $address,
    			'email'    => $email,
    			'city'     => $r->city,
    			'number_of_guest'=>$r->number_of_guest,
    			'travel_type'=>$travel_type,
    			'ID'=>$r->ID
    		);

    I also tried this which did not show errors but just didn’t work

    $User_phone = $wpdb->get_col("SELECT value FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 206 AND user_id = $user_id");
    $Worker_phone = $wpdb->get_col("SELECT value FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 7 AND user_id = $user_id");		 
    		 
    		$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,
    			'user_phone'  => $User_phone->user_login,
    			'worker_phone' => $Worker_phone->user_login,
    			'note'     => $r->note,
    			'address'  => $address,
    			'email'    => $email,
    			'city'     => $r->city,
    			'number_of_guest'=>$r->number_of_guest,
    			'travel_type'=>$travel_type,
    			'ID'=>$r->ID
    		);
    #272451
    Venutius
    Moderator

    Hi Glenn,

    I’ve never tried Peepso or Social Engine, so I@m not speaking from a point of balance. I have tried other dedicated hosted platforms such as Ning though so I do have some wider experience.

    I think your issues can be boiled down into two areas: Maintenance, and features.

    Any WordPress site, any site for that matter is going to require maintenance the main question is who does that maintenance, how well is it done and how quickly new issues can be resolved.

    With a WordPress/BuddyPress installation I’d say that the level of maintenance that you yourself have to do (or pay for) is going to be higher than with peepso. Much depends on what features your add to the basic installation, in my experience in general WP and BP updates are solid and cause few issues, it’s usually the other plugins that can cause issues (prime eample recently was a SiteOrigin Page Builder update that wrecked my front page and they did not fix it for several months).

    My expectation with Peepso is that what you sacrifice in the way of variety of options available to you I’d hope that in return the options you do get will be reasonably well integrated with each other and less likely to cause conflicts resulting in feature or site loss that you would need to take a hand in resolving. The downside is if you find there are specific feature you need, or issues that are not getting resolved, you have few alternatives to go to, you may find yourself stuck.

    I once had a paid hosted site costing $50 per month which pretty much ground to halt and the provider refused to see the problem. It made me feel pretty helpless and it was the reason I moved to BuddyPress – I figured the money I saved on hosting I could use to fund feature additions to the basic BP setup.

    Anyway getting back to the point, so I reckon peepso will be less maintenance but with less features, and this brings me on to the second point – features.

    I think it would probably be a good idea to map out exactly which features you want in quite some detail and see how that drives your thoughts. For example you say you want video, would this be you hosting the video files or libraries of YouTube style embeds? Would you need group galleries, user galleries, sitewide gallery etc?

    Here’s what I tend to use:

    Chat – IfyChat – free version limited to 10 concurrent users but an excellent chat engine
    Video/photos/audio – Either MediaPress or rtMedia, rtMedia is more stylish but add-ons are quite expensive.
    Groups/xprofiles, activity, friends – BuddyPress.
    News areas – probably more general workpress based solutions for this, are you thinking RSS feeds from other sites or internal news (could be done with a simple News category?).
    Polls – never really looked at polls, I note there is this – https://themekraft.com/new-plugin-buddypress-polls/ for starters, looks interesting but I’ve not tried it.

    Regarding supporting mobile, BP is coming out with a new theme – BP Nouveau, this has options for vertical menus which I think will be a lot more mobile friendly.

    The bulk of being mobile friendly comes down to the theme you are using and whilst most are responsive these days I personally find that having a mobile responsive theme is not good enough for phones, what I do is run a second mobile specific theme and use a theme switcher to detect and switch themes.

    Another point to bear in mind with BP is that there are a great many plugins that help you choose how your site is going to work, there’s a range of plugins that change the may notifications and email subscriptions work. This is a benefit of BP, but it does also increase the plugin count.

    kwavewd
    Participant

    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

    #272236

    In reply to: Assign Members Page

    baccoeur
    Participant

    Hi

    I have figure it out where the issue is i have checked this 3 components
    PLease see screenshot
    https://prnt.sc/j7k2k1

    So i can now assign my member page
    http://prntscr.com/j7k7uf

    So can you please give easy way instrutions or tutorial?
    On How can i make this Please!

    1.Create Buddypress Community
    *Users can create and update profiles, including the use of profile photos. Site administrators can easily set up the parameters of the user profiles.

    *Users can befriend one another. The site owner can decide what special abilities friends have with regard to one another.

    *Users can send private messages. BuddyBoss comes with a robust private messaging system, similar to that found on Facebook. Users can choose whether or not to receive an email notification when someone sends them a message.

    *Users can form and join groups. Groups can be used for a wide range of functions within the website. Administrators can choose to let their users create and join groups of common interest.

    *Users can follow activity streams. BuddyPress activity streams provide a quick digest of the recent activity going on within a site or with regard to a particular user.

    *Users can create blogs. Capitalizing on the full functionality of WordPress, the most popular blogging platform in the world, BuddyPress gives administrators and users a full-featured online publishing platform.

    *Users can participate in forum discussions. BuddyPress is fully integrated with bbPress, a slick forum system.

    2. Active Login portal with Facebook or Google login credentials.
    3. Active User generated material through BuddyForms or other methods.

    Please advice thank you!

    #272202
    Ermejo
    Participant

    Tnx Vapvarun

    It’s definitely Buddypress as the LMS wasn’t installed a few years ago when I started noticing them

    With the LMS installed now, users cannot see the lessons their profile has these notifications

    Any idea how to fix the issue?

    Regards

    Antonio

    #272157
    Ermejo
    Participant

    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
    Antonio

    Oaz
    Participant

    Hello,

    I have a wp + BP installation where users do not get email notifications when a private message is being sent (all other emails notifications are ok).

    What is strange is that I have a clone of this installation where only users and posts are different (same theme and child theme, same plugins…) where the problem does not exist.

    I tried everything I could think about to find out what the problem is : changing theme, desactivating extensions…but to no avail.So I presume there is something wrong in my database ?

    Really don’t know what to try next. Any idea ?

    Thanks for your help

    d d
    Participant

    I’m seeing the pattern now. Even in forums more than a decade old (and before @ mentions became a feature on many sites), people used @username even if it did nothing. This was simply shorthand for getting a specific person’s attention in a thread with many participants.

    Looks as though BuddyPress is trying to be smart and pull these @ mentions from old content and add them to the activity stream. Since it’s a new addition to the activity stream, BuddyPress also thinks it’s new and therefore sends out an email notification. This is why it only affects old members.

    Now… How do stop it?

    Stopping notifications across the board is not a good idea. Even if I do it now and turn it back on later, we’ll never know when an old member might join us again. So really the only solution is to have BuddyPress stop importing old forum posting with the ‘@’ character into a new activity.

    Still open to suggestions. Thanks.

    d d
    Participant

    I 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.

    studioleland
    Participant

    Hey all,

    I have a custom form that provides member to member emailing for various purposes but I also need to log those messages into the PM system so users can track communications from their Messages inbox component. I see I can trigger this via messages_new_message( $args ) somehow but I don’t want any email notifications to be sent. I do want other BP notifications sent just not PMs from this particular message creation. I’ve seen suggestions of removing the messages_message_send action but won’t that also block the message from being saved. I’ve looked through many threads but haven’t found a clear path. Any assistance here would be amazing.

    #271512
    bumblebeegames
    Participant

    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!

    #271458
    Michael Ritsch
    Participant

    Hi, i didn’t found any fittings solution for my problem, i hope you can help me out.

    I want to send a private message to one single User from my functions.php. This is just a kind of notification. Inside this message, i want to show two links and style it with some html tags like BR and Strong.. simple things…i thought.

    But then i realized that buddypress filters out everything :/

    $message = ‘This is the test<br>more like that.’;
    $args = array( ‘recipients’ => [$user_teacher], ‘sender_id’ => $user_user, ‘subject’ => ‘Anfrage ‘ . mre_get_full_name($user_user), ‘content’ => $message );

    $sending = messages_new_message( $args );

    I tryed to remove the ‘messages_message_content_before_save’ Filter from inside a bp-custom.php file and also inside of my functions.php… but nothing happens.

    Does someone know a solution for this?

    Wp version: 4.9.4
    Bp version: 2.9.3

    #271212
    Florian Bansac
    Participant

    Hi,

    The term “Notifications” is included in the output of the $notif variable, as you can see here:

                            // condition: 0 unread notifications
    			if($bpnotifcount == 0) { 
                    	$notif = '<li><a href=" ' .$url. ' ">Notifications <span class="notifmenucount">'. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) .'</span></a></li>';
    			} else {
                   		$notif = '<li><a href=" ' .$url. ' ">Notifications <span class="notifmenucount countnot0">'. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) .'</span></a></li>';
    			}

    There must be something in your WP theme preventing it to display, which you should modify.

    Alternatively you may surround the “Notifications” mention in the function $notif with <span></span> tags, to which you can add your own css class or style, like this:

                            // condition: 0 unread notifications
    			if($bpnotifcount == 0) { 
                    	$notif = '<li><a href=" ' .$url. ' "><span class="your-notif-style">Notifications</span> <span class="notifmenucount">'. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) .'</span></a></li>';
    			} else {
                   		$notif = '<li><a href=" ' .$url. ' "><span class="your-notif-style">Notifications</span> <span class="notifmenucount countnot0">'. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) .'</span></a></li>';
    			}
    #271158
    orribu
    Participant

    Ah, forgot to answer these:

    • WordPress ver. 4.9.4
    • BuddyPress ver. 2.9.3
    • Installation: Runs in main directory (public_html)
    • Upgraded from WordPress ver. — I’m going to guess 4.9.3?
    • Yep, WP was working fine. It still is, I just recovered it from a pretty bad PHP error. (disclaimer, I have NO idea how to PHP)
    • Upgraded from bbPress 2.9.2
    • Other Plugins: Akismet 4.0.3; bbpress 2.5.14; Blackhole for Bad Bots 1.8; Comment Mention Notifications 1.0.0; Custom Sidebars 3.1.2; Fancybox for WordPress 3.0.13; Jetpack 5.8; MailChimp 4.1.15; Maintenance 3.6.1; SiteOrigin Page Builder 2.6.2; Patreon for WordPress 2.6.2; Responsive Menu 3.1.13; Shortcodes Ultimate 5.0.3; SiteOrigin CSS 1.1.5; SiteOrigin Widgets Bundle 1.11.4; UpdraftPlus – Backup/Restore 1.14.4; User Role Editor 4.4; WooCommerce 3.3.3; WooCommerce Services 1.11.0; WordPoints 2.4.1; WP Super Cache 1.5.9; Yoast SEO 6.3.1
    • Parent Theme: Rose
    • I’ve uploaded the Rose theme and made a child theme. I’ve also altered wp-config.php to allow Multisite functionality.
    • bbp-custom.php– I made one now! There are no functions.
    • Hosted through BlueHost.
    • Server OS: More than likely Linux (Apache).

    Recent errors:

    [03-Mar-2018 00:25:08 UTC] PHP Warning: Missing argument 1 for WP_Widget::__construct(), called in /home1/database/public_html/wp-includes/class-wp-widget-factory.php on line 100 and defined in /home1/database/public_html/wp-includes/class-wp-widget.php on line 162
    [03-Mar-2018 00:25:08 UTC] PHP Warning: Missing argument 2 for WP_Widget::__construct(), called in /home1/database/public_html/wp-includes/class-wp-widget-factory.php on line 100 and defined in /home1/database/public_html/wp-includes/class-wp-widget.php on line 162
    [03-Mar-2018 00:25:08 UTC] PHP Warning: Missing argument 1 for WP_Widget::__construct(), called in /home1/database/public_html/wp-includes/class-wp-widget-factory.php on line 100 and defined in /home1/database/public_html/wp-includes/class-wp-widget.php on line 162
    [03-Mar-2018 00:25:08 UTC] PHP Warning: Missing argument 2 for WP_Widget::__construct(), called in /home1/database/public_html/wp-includes/class-wp-widget-factory.php on line 100 and defined in /home1/database/public_html/wp-includes/class-wp-widget.php on line 162
    [03-Mar-2018 00:25:08 UTC] PHP Warning: Missing argument 1 for WP_Widget::__construct(), called in /home1/database/public_html/wp-includes/class-wp-widget-factory.php on line 100 and defined in /home1/database/public_html/wp-includes/class-wp-widget.php on line 162
    [03-Mar-2018 00:25:08 UTC] PHP Warning: Missing argument 2 for WP_Widget::__construct(), called in /home1/database/public_html/wp-includes/class-wp-widget-factory.php on line 100 and defined in /home1/database/public_html/wp-includes/class-wp-widget.php on line 162
    [03-Mar-2018 00:25:08 UTC] PHP Warning: Missing argument 1 for WP_Widget::__construct(), called in /home1/database/public_html/wp-includes/class-wp-widget-factory.php on line 100 and defined in /home1/database/public_html/wp-includes/class-wp-widget.php on line 162
    [03-Mar-2018 00:25:08 UTC] PHP Warning: Missing argument 2 for WP_Widget::__construct(), called in /home1/database/public_html/wp-includes/class-wp-widget-factory.php on line 100 and defined in /home1/database/public_html/wp-includes/class-wp-widget.php on line 162
    [03-Mar-2018 00:25:08 UTC] PHP Warning: Missing argument 1 for WP_Widget::__construct(), called in /home1/database/public_html/wp-includes/class-wp-widget-factory.php on line 100 and defined in /home1/database/public_html/wp-includes/class-wp-widget.php on line 162
    [03-Mar-2018 00:25:08 UTC] PHP Warning: Missing argument 2 for WP_Widget::__construct(), called in /home1/database/public_html/wp-includes/class-wp-widget-factory.php on line 100 and defined in /home1/database/public_html/wp-includes/class-wp-widget.php on line 162

    Anonymous User 13302461
    Inactive

    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?

    Gomle
    Participant

    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?

    patrick321
    Participant

    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.

    #270680

    In reply to: Problem with hotmail

    JC
    Participant

    Outllook.com are blocking the emails because of this:

    if ( ! empty( $tokens['unsubscribe'] ) && $tokens['unsubscribe'] !== site_url( 'wp-login.php' ) ) {
    	$user = get_user_by( 'email', $tokens['recipient.email'] );
    
    	$headers['List-Unsubscribe'] = sprintf(
    		'<%s>',
    		esc_url_raw( bp_email_get_unsubscribe_link( array(
    			'user_id'           => $user->ID,
    			'notification_type' => $email->get( 'type' ),
    		) ) )
    	);
    }

    If yoy remove this if statement activation mails are sent. This code is located at buddypress/bp-core/bp-core.filters

    It’s a new commit, that’s why it worked in previous versions.

    To sum up, if you are using BuddyPress 2.9.3, users with Microsoft accounts will not receive the activation email.

    #270679
    JC
    Participant

    First sorry for my spelling in the above messages.

    Outllook.com are blocking the emails because of this:

    if ( ! empty( $tokens['unsubscribe'] ) && $tokens['unsubscribe'] !== site_url( 'wp-login.php' ) ) {
    	$user = get_user_by( 'email', $tokens['recipient.email'] );
    
    	$headers['List-Unsubscribe'] = sprintf(
    		'<%s>',
    		esc_url_raw( bp_email_get_unsubscribe_link( array(
    			'user_id'           => $user->ID,
    			'notification_type' => $email->get( 'type' ),
    		) ) )
    	);
    }

    If yoy remove this if statement mails activation mails are sent. This code ir located ad buddypress/bp-core/bp-core.filters

    It’s a new commit, that’s why it worked in previous versions.

    To sum up, if you are using BuddyPress 2.9.3, users with Microsoft accounts will not receive the activation email.

    I hope this get fixed in the next version.

    Carsten Lund
    Participant

    Hi there, thanks for your respond. The reason why I want to see my profile, is more a matter of having BP components like messages and notifications visible at all times, without adding them to the theme menu.

    Another strange ting is BP’s redirection to the activity page, when activity component is active. Why does BP not allow users decide which page should be the landing page, when viewing own, and others profile?
    And why do I need to install a third part plugin to have my profile as landing page after login?

    valerietst
    Participant

    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!

Viewing 25 results - 176 through 200 (of 768 total)
Skip to toolbar