BuddyDev

Search

Replies

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] Privacy issue in comments #11340

    Hello Tiziano,

    I am glad that code works. To replace the IP address replace the old code with the following code.

    
    function buddydev_strip_commenter_email( $message, $comment_id ) {
    
    	$comment = get_comment( $comment_id );
    
    	$email_info = sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n";
    
    	$comment_author_domain = @gethostbyaddr($comment->comment_author_IP);
    	$author_ip = sprintf( __( 'Author: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    
    	$message = str_replace( $email_info, '', $message );
    	$message = str_replace( $author_ip, 'Author: ' . $comment->comment_author . "\r\n", $message );
    
    	return $message;
    }
    
    add_filter( 'comment_notification_text', 'buddydev_strip_commenter_email', 10, 2 );
    

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] Privacy issue in comments #11334

    Hello Tiziano,

    I Have tested the code from theme functions file and it is working. As no email info is going to post author notifying email. Please try to test this code from the default WordPress theme functions file and make sure all plugins are deactivated. Let me know if the code works or not.

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello Alexandre,

    Thank you for this acknowledgment. Just test this code after switching to other WordPress default theme. There might be chances that salient theme playing with admin bar thing. Please and let me know if the issue still persists or not.

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello Alexandre,

    Sorry for the inconvenience. But i have tested the code on local and it is working fine. Can you point me to the site sothat I can check.

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Display Member Type Label in Directory #11057

    Hello Darrin,

    Thank you for posting here. I have question what type of member type you are using.
    1. Is it single member type per user?.
    2. Is it multiple member types to single user?.

    Please let me know.

    Thank you
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: minimum word count #10896

    Hello Rishabh,

    I have checked the BuddyBlog pagination as it seems working fine as expected behaviour i.e. New post comes first and so on.

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: minimum word count #10818

    Hello Rishabh,

    Sorry but didn’t get your question. Are you talking about pagination. Please make me more clear on this.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: minimum word count #10799

    Hello Rishabh,

    It is just a filter provided by “BP Simple Frontend Post” to validated the form before saving the post.

    Just replace 100 with 200 in the condition and message string as well. It will work

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: minimum word count #10797

    Hello Rishabh,

    Have you download the updated code of “BP Simple Frontend Post” from the following url.
    https://github.com/sbrajesh/bp-simple-front-end-post

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: minimum word count #10795

    Hello Rishabh,

    You are validating post content on wrong action. Please download the latest plugin code for ‘bp-simple-front-end-post’ for the following url.
    https://github.com/sbrajesh/bp-simple-front-end-post

    and try use the following code and let me know if it works or not

    
    function buddydev_validate_post( $error, $post ) {
    
    	if ( str_word_count( $post['bp_simple_post_text'] ) < 100 ) {
    		$error['error'] = true;
    		$error['message'] = __( "Please provide more than 100 words" );
    	}
    
    	return $error;
    }
    
    add_filter( 'bsfep_validate_post', 'buddydev_validate_post', 10, 2 );
    

    Thank You
    Ravi