CAPTCHA in report url

Mr_Alhabash1461

New Member
YetiShare User
Wurlie User
Jan 1, 1970
29
0
0
40
I use this code
Code:
    // check captcha
    if((!isErrors()) && (SITE_CONFIG_SHOW_CAPTCHA_ON_CONTACT_FORM == 'yes'))
    {
        if (!isset($_REQUEST['g-recaptcha-response']))
        {
            setError(t("invalid_captcha", "Captcha confirmation text is invalid."));
        }
        else
        {
            $resp = verifyCaptcha($_REQUEST["g-recaptcha-response"]);
            if ($resp == false)
            {
                setError(t("invalid_captcha", "Captcha confirmation text is invalid."));
            }
        }
    }
and I use this inside the form code

Code:
            <?php if(SITE_CONFIG_SHOW_CAPTCHA_ON_CONTACT_FORM == 'yes'): ?>
            <div class="thirdLast">
                <label for="recaptcha_response_field">
                    <span class="field-name"><?php echo t("confirm_text", "Confirmation Text"); ?></span>
                </label>
                <div>
                    <?php echo outputCaptcha(); ?>
                </div>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
            <?php endif; ?>
but not work
 

ysmods

New Member
Jan 29, 2013
860
1
0
UK
www.ysmods.com
You have to remove the sections containing "SITE_CONFIG_SHOW_CAPTCHA_ON_CONTACT_FORM " Like I've shown below

Code:
    // check captcha
    if(!isErrors())
    {
        if (!isset($_REQUEST['g-recaptcha-response']))
        {
            setError(t("invalid_captcha", "Captcha confirmation text is invalid."));
        }
        else
        {
            $resp = verifyCaptcha($_REQUEST["g-recaptcha-response"]);
            if ($resp == false)
            {
                setError(t("invalid_captcha", "Captcha confirmation text is invalid."));
            }
        }
    }
Code:
            <div class="thirdLast">
                <label for="recaptcha_response_field">
                    <span class="field-name"><?php echo t("confirm_text", "Confirmation Text"); ?></span>
                </label>
                <div>
                    <?php echo outputCaptcha(); ?>
                </div>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
 

Mr_Alhabash1461

New Member
YetiShare User
Wurlie User
Jan 1, 1970
29
0
0
40
still not work
when I add the URL and not add Confirmation Text
and click on submit report
I get "The url has been reported"