Forums / All Other Contributions/Addons / User Verification (Anti-Robot / CAPTCHA)

User Verification (Anti-Robot / CAPTCHA)

Results 1 to 20 of 192
07 Aug 2006, 08:20
#1
funkey avatar

funkey

New Zenner

Join Date:
Jul 2005
Posts:
85
Plugin Contributions:
0

User Verification (Anti-Robot / CAPTCHA)

Hi Everyone,

To start with, i'd really appreciate it if some people familiar with the ZC 1.3.x codebase could have a look at this and let me know if i've got everything right -- this is my first attempt at porting anything of significance to 1.3.x, so bear with me -- please.

So, this is basically a straight port of the echazen Anti-Robot Registration System to ZC 1.3.x -- it's been improved a bit to use the message stack system for errors (so people not using Javascript can see that they need to enter the validation code), but is otherwise pretty straight forward.

I've only ported the bits for the 'create_account' page over, if I get time and there's any interest (and I get pointers on how to cosmetically fix it up to look snazzy) -- i'll do the 'login' pages and post an update.

With this code, I can make a new account -- so i'd like the think what i've done works so far.

There's a README in the archive that explains how to install it.

Cheers,

Paul
12 Aug 2006, 18:14
#2
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: User Verification (Anti-Robot / CAPTCHA)

Very nice, I have been searching for something like this for some time now. I will try it and see if I can get this to work... Thanx,

/Typhoon
12 Aug 2006, 18:41
#3
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: User Verification (Anti-Robot / CAPTCHA)

Glad to know it's done. :wink2:
13 Aug 2006, 09:09
#4
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: User Verification (Anti-Robot / CAPTCHA)

I seem to have some problem to install it... I did everything like written in the Read_me-file but...

It seems to be something wrong with the sql-file. the db don't accept all file, seems to stop in the middle. I tried to upload it throu the admin interface and it shows only like the first 2 rows...

When I go to the registration screen, nothing is shown here from CAPTCHA, it looks just the same as usual.

I found in admin under Configuration the Anti-Reg 2.0-menu but it's all blank, no options here. Are there suppose to be ? Is there somewhere else that I should change something ? Nothing under Customer Details also...

What am I doing wrong ?

Regards,

/Typhoon
13 Aug 2006, 09:38
#5
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: User Verification (Anti-Robot / CAPTCHA)

Tried again on a clean sql:

The second INSERT INTO from CAPTCHA.sql:

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Activate Anti-Reg V2.0 Registration', 'ACCOUNT_VALIDATION', 'true', 'Enables Anti-Reg V2.0 Verification Code . This is used to verify that the customer is an actual HUMAN. No more "ROBOTS!".', 35, 10, '2006-08-07 17:00:00', '2006-08-07 17:00:00', NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),');

gives the message:
Out of range value adjusted for column 'configuration_id' at row 1.

Same for the rest where it starts with INSERT INTO configuration...

My tables are called configuration, not zen_configuration...

Need help...

/Typhoon
13 Aug 2006, 09:50
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: User Verification (Anti-Robot / CAPTCHA)

VALUES ('',
should be
VALUES (NULL,
in order to be compatible with MySQL5
13 Aug 2006, 11:34
#7
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: User Verification (Anti-Robot / CAPTCHA)

Super, thanx, it took care of that problem. Now I have four options in Configuration/Anti-Reg V2.0. Does it suppose to be more options somewhere else ?

Next: Still nothing is shown on the registration page, it looks like normal, no user verification, even if everything is set to ON (true) in admin. Anyone got any clues ?

Regards,
/Typhoon
13 Aug 2006, 13:20
#8
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: User Verification (Anti-Robot / CAPTCHA)

If the above is the case, I could always post my version but, since it would seem that manual instructions are not allowed to be posted, I don't how I could give my inputs on this one, since it requires manual insertions into the overrides files (even a README instruction file wouldn't do it, since it requires precision but 'colors' would do it). :D

Anyway, if anyone would be willing to have my version of this, perhaps it could be arranged.
13 Aug 2006, 17:15
#9
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: User Verification (Anti-Robot / CAPTCHA)

I would like to try to get this one to work first, it feels like I'm close.. Just need a little more help...

But if noone can help me, I would like to try your version, Oracle..

Why not to prepere it, do a readme.txt, zip all files needed and put it here also ?

Regards,
/Typhoon
13 Aug 2006, 17:26
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: User Verification (Anti-Robot / CAPTCHA)

I'd suggest not using the same thread for two different add-ons whether for the similar code or different code as the problems are not related and will only cause confusion ...
13 Aug 2006, 17:38
#11
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: User Verification (Anti-Robot / CAPTCHA)

Ofcourse, by here I ment www.zen-cart.com... So if you do this, Oracle, please let me know...

/Typhoon
13 Aug 2006, 22:39
#12
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: User Verification (Anti-Robot / CAPTCHA)


So if you do this, Oracle, please let me know...


Ok, so, first - did this MOD worked the way you wanted ? Since, I do not wish to interfer with this topic if it does. :wink2:

Please advise.
14 Aug 2006, 01:04
#13
funkey avatar

funkey

New Zenner

Join Date:
Jul 2005
Posts:
85
Plugin Contributions:
0

Re: User Verification (Anti-Robot / CAPTCHA)

DrByte:

VALUES ('',
should be
VALUES (NULL,
in order to be compatible with MySQL5


Which version of MySQL5? I'd originally ported the code on a MySQL 5.0 box and it applied OK locally?

(Although, all the changes were done on a Linux box -- so Win32 users might run into issues with CR/LF's)

Paul
14 Aug 2006, 01:08
#14
funkey avatar

funkey

New Zenner

Join Date:
Jul 2005
Posts:
85
Plugin Contributions:
0

Re: User Verification (Anti-Robot / CAPTCHA)

TheOracle:

If the above is the case, I could always post my version but, since it would seem that manual instructions are not allowed to be posted, I don't how I could give my inputs on this one, since it requires manual insertions into the overrides files (even a README instruction file wouldn't do it, since it requires precision but 'colors' would do it). :D

Anyway, if anyone would be willing to have my version of this, perhaps it could be arranged.


I'd be quite happy to fold in any changes into a new release of the code -- reply or PM me with the changes you have and we can arrange something.

Paul
14 Aug 2006, 02:47
#15
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: User Verification (Anti-Robot / CAPTCHA)

Very well, since this feature seem to be on demand, let's do a try-out.

First, I will post sectionized codings of the MOD called: Sicherheit. So - one section at the time for everybody, (as I have did several ones already - so it's all working), but - to make sure everybody is following me here - let's do this step-by-step.

// Clarification:

Make sure NOT to install the current Captcha MOD (nothing personal to the author of this topic. It is simply to instruct users by avoiding any confrontation with my modifications in order to install a clean copy of Sicherheit MOD).

// Preparation of steps:

Make a full backup of your uploaded Zen-Cart files (or test this on a test folder of Zen-Cart).

// Step 1:

From the attachment link, upload sicherheit.php file to your store's root path (yes, store-front where index.php file is, first, located).

// Step 2:

In your includes/languages/<your_language>/extra_definitions/sicherheit.php file (create the file first - of course),

Create the following:

[php]
<?php
define('ENTRY_SICHERHEIT', 'Verification number:');
define('ENTRY_SICHERHEIT_CODE', 'Code:');
define('ENTRY_SICHERHEIT_VALIDATION_CODE_ERROR', 'You did not entered the validation code correctly. Please, try again.');
?>
[/php]

// Step 3:

In your includes/templates/<your_template>/templates/tpl_contact_us_default.php file,

find:

[php]
<label for="enquiry"><?php echo ENTRY_ENQUIRY . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<?php echo zen_draw_textarea_field('enquiry', '30', '7', '', 'id="enquiry"'); ?>
<br class="clearBoth" />
[/php]

add below:

[php]
<label class="inputLabel"><br class="clearBoth" /><?php echo ENTRY_SICHERHEIT_CODE . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<?php echo zen_draw_hidden_field('sicherheit_dec', $comment_sicherheit); ?>
<?php echo zen_draw_input_field('sicherheit_code', $sicherheit_code, ' size="30" id="sicherheit_code"'); ?>
<img src="sicherheit.php?z=<?php echo $comment_sicherheit; ?>">
[/php]

(Note: Please excuse the 'original filename from the <img src tag. I tried setting the definition name from includes/extra_datafiles but doesn't show up without it's source. It's probably due to the encryption / decryption handling method or something).

// Step 4:

In your includes/modules/pages/contact_us/header_php.php file,

find:

[php]
$enquiry = strip_tags(zen_db_prepare_input($_POST['enquiry']));
[/php]

add below:

[php]
$sicherheit_dec = zen_db_prepare_input($_POST['sicherheit_dec']);
$sicherheit_code = zen_db_prepare_input($_POST['sicherheit_code']);

if (!isset($sicherheit_dec)) {
$messageStack->add('contact', ENTRY_SICHERHEIT_VALIDATION_CODE_ERROR);
} ###### End of if statement.
[/php]

Then, find:

[php]
if ($zc_validate_email and !empty($enquiry) and !empty($name)) {
[/php]

replace with:

[php]
if ($zc_validate_email and !empty($enquiry) and !empty($name) && $sicherheit_code != "" && ($sicherheit_code == str_replace('=', '´|´', base64_decode(base64_decode($sicherheit_dec))))) {
[/php]

Then, find:

[php]
if (empty($enquiry)) {
$messageStack->add('contact', ENTRY_EMAIL_CONTENT_CHECK_ERROR);
}
[/php]

add below:

[php]
if (($sicherheit_code == "") || ($sicherheit_code != str_replace('´|´', '=', base64_decode(base64_decode($sicherheit_dec))))) {
$messageStack->add('contact', ENTRY_SICHERHEIT_VALIDATION_CODE_ERROR);
}
[/php]

// End of steps:

So, as you can see, this is just for the contact us page. Of course, I coded it for the rest of offered features from the DEV team (such as: login, registration, tell-a-friend ect ...) but I just wish to make sure that it works for everybody first.

Try this on and let me know how it works for you. :thumbsup:

Security note: This feature has been totally & entirely tested before posting these results. It took me hours of work just to figure how something like this could be implemented.

If you require assistance, based on these modifications, please - do NOT hesitate to ask them. :wink2:

Good luck !
14 Aug 2006, 03:18
#16
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: User Verification (Anti-Robot / CAPTCHA)

Damn. One step I forgot to post.

Still, from your includes/templates/<your_template>/templates/tpl_contact_us_default.php file,

find:

[php]
<div class="centerColumn" id="contactUsDefault">
[/php]

add below:

[php]
<?php
/* Safety Script */
mt_srand((double) microtime() * 1000000);
$comment_sicherheit = mt_rand(000001,999999);
$comment_sicherheit = str_replace('=', '´|´', base64_encode(base64_encode($comment_sicherheit)));
/* Safety Script */
?>
[/php]

This should complete the installation of this part of MOD. :wink2:
14 Aug 2006, 07:33
#17
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: User Verification (Anti-Robot / CAPTCHA)

TheOracle:

Ok, so, first - did this MOD worked the way you wanted ? Since, I do not wish to interfer with this topic if it does. :wink2:


Well, no, still I have the same problem as before:
Next: Still nothing is shown on the registration page, it looks like normal, no user verification, even if everything is set to ON (true) in admin. Anyone got any clues ?

Anyone know how to solve this ?

/Typhoon
15 Aug 2006, 00:51
#18
funkey avatar

funkey

New Zenner

Join Date:
Jul 2005
Posts:
85
Plugin Contributions:
0

Re: User Verification (Anti-Robot / CAPTCHA)

Typhoon:

Well, no, still I have the same problem as before:
Next: Still nothing is shown on the registration page, it looks like normal, no user verification, even if everything is set to ON (true) in admin. Anyone got any clues ?

Anyone know how to solve this ?

/Typhoon


First of all, are you on the "Login" page or the "Create Account" one? Because my code only applies to the latter.

* index.php?main_page=create_account (should have the CAPTCHA code)

* index.php?main_page=login (won't have)

Secondly, did you upload the contents of the images/ directory to your server -- and do they have the correct permissions? (directory is 0777, files are 0644)
15 Aug 2006, 06:33
#19
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: User Verification (Anti-Robot / CAPTCHA)

funkey:

First of all, are you on the "Login" page or the "Create Account" one? Because my code only applies to the latter.

* index.php?main_page=create_account (should have the CAPTCHA code)

* index.php?main_page=login (won't have)

Secondly, did you upload the contents of the images/ directory to your server -- and do they have the correct permissions? (directory is 0777, files are 0644)


Ah... I don't have index.php?main_page=create_account, only login, and if I click on "Create Account" on my shop, I get to login page, and from here, I create the account. :down:

If I use your link, index.php?main_page=create_account, I see the validation letters, very nice ... But my customers can't get to it. I could change one link (create account link) to this page, but if the customer instead click on "Log In" link, he don't have to enter the validation code.

Do you have any plans to make this available for the login page also ? But only for the "create account"-part, the customer don't have to enter validation code to login to the shop, right ?

Is it possible to take away all "create account" posibilities from "login page" and only use the "create account" page ? Maybe that's a solution ?

Regards,
/Typhoon
15 Aug 2006, 06:33
#20
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: User Verification (Anti-Robot / CAPTCHA)

funkey:

First of all, are you on the "Login" page or the "Create Account" one? Because my code only applies to the latter.

* index.php?main_page=create_account (should have the CAPTCHA code)

* index.php?main_page=login (won't have)

Secondly, did you upload the contents of the images/ directory to your server -- and do they have the correct permissions? (directory is 0777, files are 0644)


Ah... I don't have index.php?main_page=create_account, only login, and if I click on "Create Account" on my shop, I get to login page, and from here, I create the account. :down:

If I use your link, index.php?main_page=create_account, I see the validation letters, very nice ... But my customers can't get to it. I could change one link (create account link) to this page, but if the customer instead click on "Log In" link, he don't have to enter the validation code.

Do you have any plans to make this available for the login page also ? But only for the "create account"-part, the customer don't have to enter validation code to login to the shop, right ?

Is it possible to take away all "create account" posibilities from "login page" and only use the "create account" page ? Maybe that's a solution ?

Regards,
/Typhoon