Jump to content
Sign in to follow this  
Druide

NEW: Anti Robot Registration Validation

Recommended Posts

Faiz, which version are you using? v2.5 or v2.6?

 

Lee, in each page you applied this contribution, the code below actually do the input checking.

// BOF Anti Robotic Registration v2.5
if (ACCOUNT_VALIDATION == 'true' && ACCOUNT_CREATE_VALIDATION == 'true') {
  $sql = "SELECT * FROM " . TABLE_ANTI_ROBOT_REGISTRATION . " WHERE session_id = '" . tep_session_id() . "' LIMIT 1";
  if( !$result = tep_db_query($sql) ) {
	$error = true;
	$entry_antirobotreg_error = true;
	$text_antirobotreg_error = ERROR_VALIDATION_1;
  } else {
	$entry_antirobotreg_error = false;
	$anti_robot_row = tep_db_fetch_array($result);
	if (( strtoupper($HTTP_POST_VARS['antirobotreg']) != $anti_robot_row['reg_key'] ) || ($anti_robot_row['reg_key'] == '') || (strlen($antirobotreg) != ENTRY_VALIDATION_LENGTH)) {
	  $error = true;
	  $entry_antirobotreg_error = true;
	  $text_antirobotreg_error = ERROR_VALIDATION_2;
	} else {
	  $sql = "DELETE FROM " . TABLE_ANTI_ROBOT_REGISTRATION . " WHERE session_id = '" . tep_session_id() . "'";
	  if( !$result = tep_db_query($sql) ) {
		$error = true;
		$entry_antirobotreg_error = true;
		$text_antirobotreg_error = ERROR_VALIDATION_3;
	  } else {
		$sql = "OPTIMIZE TABLE " . TABLE_ANTI_ROBOT_REGISTRATION . "";
		if( !$result = tep_db_query($sql) ) {
		  $error = true;
		  $entry_antirobotreg_error = true;
		  $text_antirobotreg_error = ERROR_VALIDATION_4;
		} else {
		  $entry_antirobotreg_error = false;
		}
	  }
	}
  }
  if ($entry_antirobotreg_error == true) $messageStack->add('create_account', $text_antirobotreg_error);
}
// EOF Anti Robotic Registration v2.5


Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Share this post


Link to post
Share on other sites

hmmm I seem to be having some trouble. I've not changed anything from what the contrib files say yet.. just thought I'd checkthe validation first and it works fine on create new account, but for some reason on change password it never validates and the same on the contact page...

I've not got it set on editing the profile so I don't know if it works there or not....

Share this post


Link to post
Share on other sites

hmmm I seem to be having some trouble. I've not changed anything from what the contrib files say yet.. just thought I'd checkthe validation first and it works fine on create new account, but for some reason on change password it never validates and the same on the contact page...

I've not got it set on editing the profile so I don't know if it works there or not....

Share this post


Link to post
Share on other sites
Faiz, which version are you using? v2.5 or v2.6?

 

I'm using OsCommerce 2.2 MS2 and the mod 2.6 version. How can i solve this AlexStudio? :-" :rolleyes:

 

Thanks.


"I am not a Newbie but I am not an Expert either..."
"Lets learn about osCommerce together!..."

Share this post


Link to post
Share on other sites

Here is a screenshot of my robot validation form...

robotvalidationna6.th.jpg


"I am not a Newbie but I am not an Expert either..."
"Lets learn about osCommerce together!..."

Share this post


Link to post
Share on other sites
There are settings in admin need to be turn on to enable the validation in additional pages.

 

Here is a suggestion for v2.6 to use truetype font. It's the answer to your problem too.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Share this post


Link to post
Share on other sites
There are settings in admin need to be turn on to enable the validation in additional pages.

Yeah I've got it set to show and it does display the validation image captcha. Just every time I type in the code I get the incorrect code message...

When I know that it's right.

It works fine on the account creation page though.

Share this post


Link to post
Share on other sites

I installed osCommerce 2.2 Milestone 2 Update 060817

 

and

 

Anti-Robot Registration Validation v2.6 - Updated Admin. Image and Text Control

 

but the Anti-Robot Registration Validation picture appeared so small that I cannot read.

 

The screen shot of the validation is as follows

 

http://www.mypic.us.to/out.php/i149_valid.GIF

 

i149_valid.GIF

 

Please help me

 

Thanks,

Bhaskar

Share this post


Link to post
Share on other sites
I installed osCommerce 2.2 Milestone 2 Update 060817

 

and

 

Anti-Robot Registration Validation v2.6 - Updated Admin. Image and Text Control

 

but the Anti-Robot Registration Validation picture appeared so small that I cannot read.

 

The screen shot of the validation is as follows

 

http://www.mypic.us.to/out.php/i149_valid.GIF

 

i149_valid.GIF

 

Please help me

 

Thanks,

Bhaskar

 

take a look at this topic.

http://forums.oscommerce.com/index.php?sho...4205&st=288

Share this post


Link to post
Share on other sites
There are settings in admin for adjusting the image/font size. If you can't find them, probably the v2.6 sql script has not been executed.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Share this post


Link to post
Share on other sites

Thanks you AlexStudio for fast and usefull reply.

 

I have to run both 2.5 and 2.6 sql to get the total options.

 

Thanks again.

Share this post


Link to post
Share on other sites
Excellent. Thanks for all your help here.

For those that are using imagemagic just point the code to your existing fonts folder:

putenv('GDFONTPATH=' . DIR_FS_CATALOG . 'includes/imagemagic/fonts/');

 

Works like a champ.

 

Please note that fonts should be uploaded in binary mode


Rose

The strong survive BUT the best succeed !!

1064 - You have an error in your SQL syntax

Share this post


Link to post
Share on other sites
Please note that fonts should be uploaded in binary mode

Thanks so much, this solved my issue as well!!!!

Share this post


Link to post
Share on other sites

first of all ,,, thnx for this contri .... is had a lot of different types of this kind of contri but this one is perfect.

BUT, when i install this one the confirmation code doesnt appear, there are no error messages. So i dont know where to find it.

 

thnx for youre help anyways

Share this post


Link to post
Share on other sites

The confirmation code should be on the contact_us page. The actual page which is used to generate the code is the validation_png.php file which is in catalog/validation_png.php . You also need to make sure that in the admin section the "Activate Validation" is set to true.

and you need to set it to true for the setting which says 'activate for contact_us'.

 

If you still have problems we can do this the long way round - you can email me and I'll try my best to help you.

 

 

rgds

rose


Rose

The strong survive BUT the best succeed !!

1064 - You have an error in your SQL syntax

Share this post


Link to post
Share on other sites

I have the CONFIG_CALCULATE_IMAGE_SIZE=='true' issue but I must have it set true... has anyone found any knock-on effect problems after installing the posted fix for this, there has not been anything more said about this yet and was wondering whats other thought ?


if at first it doesn't work... use a bigger hammer

Share this post


Link to post
Share on other sites

Tried installing the anti-robot for the review system but all I get is an empty box in the review page.

 

Has anyone been able to install this mod to the anti-robot contrib?

 

 

-Thomp

Share this post


Link to post
Share on other sites

after playing about I found a quick fix for my CONFIG_CALCULATE_IMAGE_SIZE=='true' issue

 

Changed:

$validation_images = tep_image('validation_png.php?rsid=' . $new_guery_anti_robotreg['session_id']);

 

To:

$validation_images = tep_image('validation_png.php?rsid=' . $new_guery_anti_robotreg['session_id'], '', '260', '50');

 

I saw sizes in the admin so i'm quite sure the height and width could be extracted from there (it should be!)

but I will leave that up to the better PHP coders :blush:

Edited by PerlSOL

if at first it doesn't work... use a bigger hammer

Share this post


Link to post
Share on other sites
Yeah I've got it set to show and it does display the validation image captcha. Just every time I type in the code I get the incorrect code message...

When I know that it's right.

It works fine on the account creation page though.

 

 

did you find out why after? it might help me...

I had mine working at one stage then I went and sorted out the register globals issue (which I left till last) and now I have this problem where I enter the correct code but it keeps saying Invalid Validation Code. I am close to removing this MOD as it is taking far too much time to try and solve, I cant revert and undo what I have done as I need the register globals off.

Im sure is was to do with sessions.php but i'm only learning!!!

 

 

PLEASE, PLEASE, PLEASE, can anyone help me


if at first it doesn't work... use a bigger hammer

Share this post


Link to post
Share on other sites

|| (strlen($antirobotreg) != ENTRY_VALIDATION_LENGTH) :angry:

 

after much time I found that if I removed the above it worked, from what I can work out it is pointless anyhow with the compare check.

TFFT!

 

I hope this helps others from banging one's head :blink:


if at first it doesn't work... use a bigger hammer

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×