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: 25392
    Brajesh Singh on in reply to: [Resolved] homepage activity #43102

    Thank you.

    I see that the change cover is disabled on your site.

    Please visit Dashboard->Settings->BuddyPress->Options and enable “Cover Image Uploads”

    That will make it work.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25392

    Hi Vishal,
    Thank you for using BuddyBlog.

    You are using BuddyBoss and we haven’t tested our free version with BuddyBoss theme.

    Please visit Dashboard->Settings->BuddyBlog and make sure that you have selected a post type. Does that solve it?

    Please let me know if that works or not?

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25392

    Hi Nifty,
    Thank you.

    that will certainly help.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25392
    Brajesh Singh on in reply to: Add Profile Tabs #43093
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25392
    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: 25392
    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: 25392
    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: 25392

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

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

    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