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: 25472

    Hi Nifty,
    Thank you.

    that will certainly help.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: Add Profile Tabs #43093
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: Validating xprofile field #43092

    You are welcome.
    You can use both of them if you want to.

    In case you used the 2nd code, the message on update profile page will be “There was a problem updating some of your profile information. Please try again.” That’s a bit misleading.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: Can somebody help me with this snippet code? #43091

    Hi,
    Welcome to BuddyDev.

    Thank you for the question. It’s an interesting question.

    In order to achieve the delayed message, we need to maintain a queue of message and replay it after 5 mins of registration.

    WordPress does not offer native queue ability, so we will need to manage a custom queue and use the cron functionality of WordPress to achieve it.

    To be honest, It changes from couple of lines to a bit more.

    I am asking one my colleagues to put the code as a simple one page plugin for you. we will link you to the plugin in next couple of days.

    PS:- I and my team sincerely appreciate your feeling. Thank you for joining BuddyDev. We will appreciate if you change the display name as it may confuse people.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: Validating xprofile field #43089

    Hi Olandir,
    Thank you for the question.
    Here is the code to do that

    
    add_action( 'bp_signup_validate', function () {
    
    	$disallowde_names = array( "admin", "me" );
    
    	if ( ! isset( $_POST['field_1'] ) ) {
    		return;
    	}
    
    	if ( in_array( $_POST['field_1'], $disallowde_names ) ) {
    		buddypress()->signup->errors['field_1'] = __( 'Sorry, this name is not allowed!' );
    	}
    
    } );
    

    Please update the disallowed list with the names.

    Please do understand that it does not prevent the users form changing the name after registration to one of the disallowed ones.

    PS:- My colleague @ravisharma proposed another alternative code which works for update as well as registration(Here is his code)

    
    add_filter( 'bp_xprofile_set_field_data_pre_save', function ( $save, $field_args ) {
        $field = $field_args['field'];
        $value = $field_args['value'];
    
        // Not name field.
        if ( $field->id != 1 ) {
            return $save;
        }
    
        $restricted_names = array( 'admin', 'moderator' );
    
        if ( in_array( $value, $restricted_names ) ) {
            $error_message = __( 'Name is restricted. Please try different name' );
    
            add_action(
                'bp_field_' . $field->id . '_errors',
                function () use ( $error_message ) {
                    echo esc_html( $error_message );
                }
            );
    
            return new WP_Error( $error_message );
        }
    
        return $save;
    },10, 3 );
    
    

    The problem is it does not show the error to the user.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472

    Hi David,
    Yes, template overrides can cause it.

    Please try disabling on your current theme and switching to a different theme to check it that makes the BuddyPress comments load properly.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472

    Hi Debbie,
    I am sorry. That would be 1.4.7 not 1.4.8.

    Please try 1.4.7

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472

    Hi Anthony,
    Welcome to BuddyDev.

    Theplugin does not notify via mail. It notifies users via BuddyPress notification system.
    https://github.com/buddydev/bp-notify-post-author-on-blog-comment/blob/master/bp-blog-comment-notifier.php#L345

    You can add wp_mail() there to notify to the author if needed using mail.

    https://developer.wordpress.org/reference/functions/wp_mail/

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: [Resolved] homepage activity #43084

    1. You have 2 forms on registration as you are using the login form/some filters in the righ sidebar. You can make the registre page single column(Dashboard->Pages->register, edit and set the layout to single column) and only registration form will be visible.

    2. It is not possible to change the cover photo of the profile:-
    Please share a guest account to test it. Are you getting some error?

    3. You can use a plugin to rename wp-login.php to login ro anything. There are many plguins available for the same.
    Here are some exmaples.
    https://wordpress.org/plugins/wps-hide-login/
    https://wordpress.org/plugins/rename-wp-login/

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: Buddy User Circle “Follow Button” #43083

    Hi James,
    Thank you for reporting.

    The problem is BuddyBoss uses javascript for buttons and injects the buttons if you use their loop. But they do not activate the js bindings for message/follow outside the default components. That breaks it. We had similar issue for messages button using BuddyBoss.

    I am requesting my team to look into it and see if there is a way to override this behaviour and update the plugin or add css to hide the button.

    Regards
    Brajesh