Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25358
    Brajesh Singh on in reply to: [Resolved] Unable to upload Cover Pic #31661

    Hi Daniel,
    Thank you for the reply.

    Since you have it disabled, I will assume that theme is the cause of it.

    For custom services int troubleshooting, Please use this form

    https://buddydev.com/buddypress-plugin-customization-service/

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25358
    Brajesh Singh on in reply to: How can I echo this code in header #31660

    Please share your original code. You have copied from your previous post and shared it. It is unusable since the quotes are encoded and I ca not use them.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25358
  • Keymaster
    (BuddyDev Team)
    Posts: 25358

    Thank you. The problem is theme overriding the background position for button.

    Please add this to css

    
    .mejs-pause>button {
        background-position: -20px 0 !important;
    }
    

    should fix it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25358
    Brajesh Singh on in reply to: No Video / Photo Upload to Activity Feed #31657

    Hi Alexander,
    Please link me to the site.

    There are 2 possible reasons and the most probable reason is encoding of videos. Please link me to the site and I can quickly check.

    PS:- In future, please open your own topic. If needed, you can use private replies and my private replies will be visible to you in that case.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25358

    You are welcome 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 25358

    Hi Mikel,
    Yes.

    That will make it only visible to the owner of the profile.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25358

    Hi Mikel,
    You need to dset the visibility to “Profile Owner”

    When you use wc4Bp, they already decide the visibility for you. With Custom profile tabs, we do not decide the visibility as there are chances some of the dynamic tabs might be visible to logged out visitor etc.

    That’s why, you need to use the Visibility control and set it to profile owner to make it only visible to the profile owner. Your selection of roles for availability is correct and you do not need to change that.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25358

    Hi Chris,
    Thank you for the patience.

    Here is the code to add all users from same domain as friend. It adds them as friend when a user account is activated.

    
    
    /**
     * Add users from same domain as friend on account activation.
     *
     * @param int $user_id user id.
     */
    function buddydev_add_friends_on_activation_by_email_domain( $user_id ) {
    
    	$user = get_user_by( 'id', $user_id );
    	if ( ! $user ) {
    		return;
    	}
    
    	$email_parts = explode( '@', $user->user_email );
    
    	if ( count( $email_parts ) !== 2 ) {
    		return;
    	}
    
    	$domain = $email_parts[1];
    
    	$potential_friend_ids = buddydev_get_users_with_email_domain( $domain );
    
    	if ( empty( $potential_friend_ids ) ) {
    		return;
    	}
    
    	foreach ( $potential_friend_ids as $potential_friend_id ) {
    
    		if ( $potential_friend_id == $user_id || friends_check_friendship( $user_id, $potential_friend_id ) ) {
    			continue;
    		}
    
    		friends_add_friend( $potential_friend_id, $user_id, true );
    	}
    
    }
    
    add_action( 'bp_core_activated_user', 'buddydev_add_friends_on_activation_by_email_domain' );
    
    /**
     * Get all users who have given email domain.
     *
     * @param string $domain domain name.
     *
     * @return array
     */
    function buddydev_get_users_with_email_domain( $domain ) {
    	global $wpdb;
    
    	$pattern       = '%@' . trim( $domain );
    	$sql_statement = $wpdb->prepare( "SELECT ID FROM {$wpdb->users} WHERE user_email LIKE %s", esc_sql( $pattern ) );
    
    	return $wpdb->get_col( $sql_statement );
    }
    
    

    I am not sharing the code for the member type since BuddyPress does not set member type on activation and BuddyBoss does set it but that is not straight forward(or guaranteed and depends on settings).

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25358
    Brajesh Singh on in reply to: bp group activities notifier notification bug #31641

    Hi Jay,
    Thank you for using the plugin.

    We do delete when a user visits single activity screen
    https://github.com/sbrajesh/bp-group-activities-notifier/blob/master/bp-group-activities-notifier.php#L63

    If it is not deleting, most probably the user is not visiting individual activity. Please check.

    Regards
    Brajesh