WordPress.org

Ready to get started?Download WordPress

Forums

Captcha
[resolved] How to add captcha in buddy press reply form? (3 posts)

  1. VolumeWatchers
    Member
    Posted 1 year ago #

    Hello!
    I am using captcha plugin in my wordpress site and recently added just buddypress forum plugin. But, anonymous users can open topic and reply to any topic. Can someone help me how to add captcha code in the open topic & reply form? I like to know the file names (like form-reply.php) and where to insert the codes both to display and validate?

    Any help here is greatly appreciated.

    Thanks!

    http://wordpress.org/extend/plugins/captcha/

  2. VolumeWatchers
    Member
    Posted 1 year ago #

    Sorry…! Side tracked by other issues. Here is quick and dirty fix. Added the following code.

    In : wp-content/plugins/bbpress/bbp-theme-compat/bbpress/form-reply.php

    <div class="bbp-submit-wrapper">
    <?php if( function_exists( 'cptch_display_captcha_custom' ) )
    { echo "<input type='hidden' name='cntctfrm_contact_action'
    value='true' />";
    echo "<b> Solve this: </b>". cptch_display_captcha_custom()."
    <b>   Then click  => </b>";
    } ?>

    In :/wp-content/plugins/bbpress/bbp-includes/ bbp-reply-functions.php

    /** Capcha Check *******************************************************/

    if( function_exists( 'cptch_check_custom_form' ) &&
    cptch_check_custom_form() !== true )
    bbp_add_error( 'bbp_reply_content', __(
    'ERROR: Please complete the CAPTCHA.',
    'bbpress' ) );

    Did the same in form-topic.php and bbp-topic-functions.php files.

    Worked as expected and solves the need for now.

  3. VolumeWatchers
    Member
    Posted 1 year ago #

    Looks like the changed the location of the files now.

    /wp-content/plugins/bbpress/templates/default/bbpress/form-reply.php
    /wp-content/plugins/bbpress/includes/replies/functions.php

    /wp-content/plugins/bbpress/templates/default/bbpressform-topic.php
    /wp-content/plugins/bbpress/includes/topics/functions.php

    Enjoy.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.