JTC Anti-Spam|Anti-Hacker – Read Me First

Home Forums BulletProof Security Pro JTC Anti-Spam|Anti-Hacker – Read Me First

This topic contains 65 replies, has 15 voices, and was last updated by  Paul 1 year, 4 months ago.

Viewing 6 posts - 61 through 66 (of 66 total)
  • Author
    Posts
  • #31199

    AITpro Admin
    Keymaster

    @ Krzysztof – Great! 😉

    #35548

    Mohamad Hegazy
    Participant

    hello,

    how can i force bps pro jtc captcha to show in different php templates

    or in specific woocommerce place under password text area directly as it’s by default uses hooks which put it under the total form before submitting button

    what’s the code to use <P class=*> * </p> etc

    thank you

    #35549

    AITpro Admin
    Keymaster

    @ Mohamad Hegazy – Yes, you are correct that JTC uses Hooks – Actions and Filters to hook into these Forms:  WordPress Forms (Login, Registration, Lost Password, Comments), BuddyPress, bbPress (Login, Registration and Activation) and WooCommerce Forms (Login and Registration).

    To load JTC in other Forms you would either need to hook into other Hooks in other php templates or hard code JTC into those other php templates.  See example hard coded JTC code below.

    To change CSS you would need to do something like the CSS changes for the Comments Form > See “Comment Form CSS Styling” at the beginning of this Forum topic.

    Important Notes: 
    I can only give you general examples and cannot actually assist you with building a new plugin or form, etc.  😉
    If you use the WordPress setting that requires users to be registered and logged into your website then spammers and hackers would be stopped at Registrations and Logins and you would not really need to create custom JTC CAPTCHA’s anywhere else.

    Example hard coded JTC code:
    Notes: You would need to manually copy the parts of JTC code from the login-security.php file that are used in Form Processing (note this example code below uses code from another plugin and some of the BPS JTC code modified and combined together):

    if ( isset( $_POST['doRegister'] ) ) {
    
    if ( $_POST['reference'] != $BPSoptionsJTC['bps_tooltip_captcha_key'] || $_POST['captcha'] != '' ) {
    //$err = urlencode("ERROR: Incorrect CAPTCHA Entered. Click your Browser back button and enter the captcha.");
    $err = "ERROR: Incorrect CAPTCHA Entered. Click your Browser back button and enter the captcha.";
    header("Location: register.php?msg=$err");
    
    echo '<div class="error">';
    echo $err;
    echo '</div>';

    Other code manually added into another plugin’s form page/template:

    		// This is the CAPTCHA Form Field
    		$reference = ( isset( $_POST['reference'] ) ) ? $_POST['reference'] : '';
    		// SpamBot Trap/Decoy Form Field 
    		$captcha = ( isset( $_POST['captcha'] ) ) ? $_POST['captcha'] : '';
    

    Other Code used in the Form code for another plugin:

    <tr>
    <td><label for="reference"><?php echo 'Enter CAPTCHA: <strong><font color="blue">xcode555</font></strong>'; ?></td>
    <td><input type="text" name="reference" id="reference" class="input" size="33" title="<?php echo $BPSoptionsJTC['bps_tooltip_captcha_hover_text']; ?>" value="<?php echo esc_attr(stripslashes($reference)); ?>" /></label>
    <input type="text" name="captcha" id="captcha" class="input" value="<?php echo esc_attr(stripslashes($captcha)); ?>" style="display: none;" /></td>
    </tr>
    #36141

    Paul
    Participant

    changed jtc anti spam code but now get incorrect captcha entered

    #36142

    AITpro Admin
    Keymaster

    Are your JTC CAPTCHA and JTC ToolTip plugin option settings the same as the CAPTCHA you are entering.  Those things need to match of course.

    #36144

    Paul
    Participant

    I renamed plugin logged in and put another jtc captcha now works, but yes both were the same

Viewing 6 posts - 61 through 66 (of 66 total)

You must be logged in to reply to this topic.