Skip to:
Content
Pages
Categories
Search
Top
Bottom

how to set minimum reply length.


  • JosephTersoo
    Participant

    @nforumnaija

    Please is there any plugin or code i can use to set minimum reply length on my forum, i want reply’s to not be less than 60 character. so when any body reply’s with 60 character it tells to person to type not less than 60 character words.
    Please i need this urgently.
    thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

  • Robin W
    Moderator

    @robin-w

    add this to your functions file

    
    function rew_min_length ($reply_content) {
    	if (strlen($reply_content)<61) {
    		bbp_add_error( 'bbp_reply_content', __( '<strong>ERROR</strong>: Your reply must be at least 60 characters.', 'bbpress' ) );
    	}
    return $reply_content ;
    }
    
    add_filter( 'bbp_new_reply_pre_content', 'rew_min_length' );

    JosephTersoo
    Participant

    @nforumnaija

    Thank alot it worked fine,
    first when i put the code in functions file, it break my site and it was off, i deleted it from cpanel.
    i later created a plugin added to code to it and activate and it worked fine. thanks.


    Robin W
    Moderator

    @robin-w

    great – glad you are fixed

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar