Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author leewells

    (@leewells)

    It is very simple to use the pre-included functions of this plugin to integrate into your plugin.

    Before you start, you always want to check to make sure that Super Captcha is installed before your plugin starts requiring functions:

    if(function_exists(array( &$newsupercaptcha, 'getCaptchaImage' )) : SUPER_CAPTCHA_CODE endif;

    Simply call the following function to display the captcha image:

    $newSuperCaptcha->getCaptchaImage()

    You will then need to validate the input from the user. Depending upon the form field you use, you will need to validate that input against:

    $newSuperCaptcha->validateCode( THE_INPUTTED_CODE )

    This will return a true or false value. True is a successful verification, false means the user either failed the captcha or are listed as a spammer.

    Plugin Author leewells

    (@leewells)

    Checking user input.

    Like above, always make sure the plugin is installed and active:

    if ( $newSuperCaptcha->validateCode( $_POST['verificationfield'] ) == true && $newSuperCaptcha->pro_spam_check(  ) != true ) :
    // do something
    else:
    // throw error code
    $newSuperCaptcha->report_spam(  ); // this will let us know this is a spammer
    endif;

    This example code will use both the pro features if available and standard features by both checking the black list and reporting to the black lists as a user fails the CAPTCHA.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘IMPORTANT: Developers’ is closed to new replies.