Module

Developer
Supported

AJAX Captcha

ExpressionEngine 1.x, ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Laisvunas

     

You must be logged in to post.

an example needed

Feature Request

romanovsky2007
romanovsky2007

can you post also an example for registration form ?

Laisvunas
# 1
Developer
Laisvunas

Hi Dmitry,

Did you create new member registration form in template? 

Or do you by “registration form” mean login form?

In any case, what is your current registration form code? I will add to it AJAX Captcha code or debug AJAX Captcha code if it is already added.

romanovsky2007
# 2
romanovsky2007

hi Laisvunas,

here’s my code, do you need also an access to my CP install?

Dmitry

{exp:zoo_visitor:registration_form return="register/success" error_handling="inline"}


<div class="reg-box">
<
span id="reg"><a href="{homepage}">Вход</a></span>
  <
h2>Регистрация</h2>
    <
label class="login_label"for="member_firstname">Имя:</label>
    <
input class="login_input" type="text" name="member_firstname" id="member_firstname" value="{if member_firstname}{member_firstname}{/if}" />
    <
label class="login_label"for="member_lastname">Фамилия:</label>
    <
input class="login_input" type="text" name="member_lastname" id="member_lastname" value="{if member_lastname}{member_lastname}{/if}" />
    <
label class="login_label" for="email">Электронный адрес:</label>
    <
input class="login_input" type="text" name="email" id="email" value="{if email}{email}{/if}" />
    <
label class="login_label"for="password">Пароль*:</label>
    <
input class="login_input"type="password" name="password" id="password" value="{if password}{password}{/if}" />
   
    <
label class="login_label"for="password_confirm">Подтвердить пароль*:</label>
  <
input class="login_input" type="password" name="password_confirm" id="password_confirm" value="{if password_confirm}{password_confirm}{/if}" />    


{exp:ajaxcaptcha entry_id="none" form_id="zoo_visitor_form" submit_button_id="submit_button" captcha_image_id="captcha_image_of_comment_form" captcha_input_name="captcha" captcha_refresh_button_id="captcha_refresh_button_of_comment_form" captcha_refresh_indicator_id="captcha_refresh_indicator_of_comment_form" captcha_refresh_indicator_class="captcha_refresh" submission_valid_indicator_id="captcha_for_comment_form" submission_valid_class="validated" submission_invalid_indicator_id="captcha_for_comment_form" submission_invalid_class="invalidated" validation_start_on="keyup" validation_show_result_on="keyup|click" alert_text="ERROR!\\\\\\nYou did not enter the word exactly as it appears in the image" javascript_alert="no"}

{if ajaxcaptcha_url}

<p>Enter the characters as seen on the image below; if you can&#39;t decipher the text 
on the imageclick it to dynamically generate a new one.</p>

<
div><div id="captcha_refresh_indicator_of_comment_form" class="captchaimage_div">
<
a id="captcha_refresh_button_of_comment_form" href="{homepage}/{if segment_1}{segment_1}/{/if}{if segment_2}{segment_2}/{/if}{if segment_3}{segment_3}/{/if}" 
title="Click to refresh image"><img id="captcha_image_of_comment_form" src="{ajaxcaptcha_url}" alt="Captcha image" /></a></div></div>

<
class="commentp"><input type="text" maxlength="6" name="captcha" id="captcha_for_comment_form" /></p>

{/if}

{
/exp:ajaxcaptcha}

<input id="submit_button" class="login_button" type="submit" value="Отправить" class="form-submit"  />

 
{/exp:zoo_visitor:registration_form} 
Laisvunas
# 3
Developer
Laisvunas

Hi Dmitry,

I don’t own the license of Zoo Visitor, so I cannot reproduce your code on my server.

Post here a link to the page containing this form and I will try to find what’s going wrong by analyzing the output.

romanovsky2007
# 4
romanovsky2007

Thank you Laisvunas, here’s the link.

Laisvunas
# 5
Developer
Laisvunas

Hi Dmitry,

Here is what I found: loading the link

http://lseg.info/system/expressionengine/third_party/ajaxcaptcha/libraries/ajaxcaptcha/index.php?sess_array_member=none97665_captcha_1323415091486

which should output captcha image for some reason results into

NetworkError: 500 Internal Server Error

The error 500 can mean just anything - server encountered some unexpected condition that prevented it from fulfilling the request.

To investigate the issue further I need FTP access to the folder /system/expressionengine/third_party/ajaxcaptcha on your dev server. Can you create such FTP access for me? If yes, send me login details to this email: saugos [at] gmail [dot] com

 

romanovsky2007
# 6
romanovsky2007

Thanks a lot, i just emailed you.

Laisvunas
# 7
Developer
Laisvunas

Hi Dmitry,

I found the culprit.

The captcha isn’t outputted because on your server PHP does not have GD2 library enabled. Your PHP version is 5.2.17 and it is unusual for the version 5.2 to be without GD2 library. After it is installed AJAX Captcha should begin to work.

So,  ask your hosting provider to istall GD2. After it will be installed phpinfo() function should output the table as this:

gd
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.2.1
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XPM Support enabled
XBM Support enabled

romanovsky2007
# 8
romanovsky2007

Yes it works now, thanks a lot!

Dmitry