Jump to content
Sign in to follow this  
Druide

NEW: Anti Robot Registration Validation

Recommended Posts

already in the package, did'nt u look!!!

 

If u wish to mod pages not included u will find instructions on how ealier in this thread.

 

Please always read/search b4 asking!! :rolleyes:


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Sorry didn't realise it was there.

 

Got another question, got most of the code required installed just not sure were to put this.

 

// BOF Anti Robotic Registration v3.1

if (ACCOUNT_VALIDATION == 'true' ) {

include(DIR_WS_MODULES . FILENAME_CHECK_VALIDATION);

if ($entry_antirobotreg_error == true) $messageStack->add('contact', $text_antirobotreg_error);

}

// EOF Anti Robotic Registration v3.1

 

Below is the code of my page.

require('includes/application_top.php');

 

// BOF Anti Robot Registration v3.1

if (ACCOUNT_VALIDATION == 'true' ) {

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT_VALIDATION);

include_once('includes/functions/' . FILENAME_ACCOUNT_VALIDATION);

}

// EOF Anti Robot Registration v3.1

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CUSTOMER_TESTIMONIALS);

 

$testimonials_error = false;

if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'insert')) {

$testimonials_id = tep_db_prepare_input($HTTP_POST_VARS['testimonials_id']);

$testimonials_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_title']);

$testimonials_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_name']);

$testimonials_email = tep_db_prepare_input($HTTP_POST_VARS['testimonials_email']);

$testimonials_location = tep_db_prepare_input($HTTP_POST_VARS['testimonials_location']);

$html_text = tep_db_prepare_input($HTTP_POST_VARS['html_text']);

 

 

 

// make sure testimonials directory is existing

if(!is_dir(DIR_WS_IMAGES . 'testimonials'))mkdir(DIR_WS_IMAGES . 'testimonials', '777');

 

$testimonial_image = new upload('testimonial_image');

$testimonial_image->set_destination(DIR_WS_IMAGES . 'testimonials/');

if ($testimonial_image->parse() && $testimonial_image->save()) {

$testimonial_image_name = $testimonial_image->filename;

}

 

 

 

if (empty($testimonials_title)) {

$testimonials_error = true;

$messageStack->add('testimonials', ERROR_TESTIMONIALS_TITLE_REQUIRED);

}

if (empty($testimonials_name)) {

$testimonials_error = true;

$messageStack->add('testimonials', ERROR_TESTIMONIALS_NAME_REQUIRED);

}

if (empty($testimonials_email)) {

$testimonials_error = true;

$messageStack->add('testimonials', ERROR_TESTIMONIALS_EMAIL_REQUIRED);

}

if (!tep_validate_email($testimonials_email)) {

$testimonials_error = true;

$messageStack->add('testimonials', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);

}

if (empty($html_text)) {

$testimonials_error = true;

$messageStack->add('testimonials', ERROR_TESTIMONIALS_DESCRIPTION_REQUIRED);

}

 

if (!$testimonials_error) {

$sql_data_array = array('testimonials_title' => $testimonials_title,

'testimonials_location' => $testimonials_location,

'testimonials_name' => $testimonials_name,

'testimonials_email' => $testimonials_email,

'testimonials_html_text' => $html_text,

'testimonial_image' => $testimonial_image_name);

 

if ($HTTP_GET_VARS['action'] == 'insert') {

$insert_sql_data = array('date_added' => 'now()',

'status' => '0');

$sql_data_array = array_merge($sql_data_array, $insert_sql_data);

tep_db_perform(TABLE_CUSTOMER_TESTIMONIALS, $sql_data_array);

$testimonials_id = tep_db_insert_id();

// email notification added by maestro

$email_text = TESTIMONIAL_NOTIFICATION_TEXT . $testimonials_name . TESTIMONIAL_CONJ . $testimonials_location . '.' . "\n\n" .

TESTIMONIAL_NOTIFICATION_TITLE . $testimonials_title . "\n\n" .

TESTIMONIAL_NOTIFICATION_HTML_TEXT . $html_text . "\n\n" .

TESTIMONIAL_NOTIFICATION_APPROVE;

tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, TESTIMONIAL_NOTIFICATION_SUBJECT, $email_text, $testimonials_name, $testimonials_email);

}

$testimonials_id = '';

$testimonials_title = '';

$testimonials_location = '';

$testimonials_name = '';

$testimonials_email = '';

$html_text = '';

tep_redirect(tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS_WRITE, 'action=success'));

} else {

$testimonials_id = tep_db_prepare_input($HTTP_POST_VARS['testimonials_id']);

$testimonials_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_title']);

$testimonials_location = tep_db_prepare_input($HTTP_POST_VARS['testimonials_location']);

$testimonials_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_name']);

$testimonials_email = tep_db_prepare_input($HTTP_POST_VARS['testimonials_email']);

$html_text = tep_db_prepare_input($HTTP_POST_VARS['html_text']);

}

}

 

// BOF Anti Robotic Registration v3.1

header('cache-control: no-store, no-cache, must-revalidate');

header("Pragma: no-cache");

// EOF Anti Robotic Registration v3.1

 

$breadcrumb->add(NAVBAR_TITLE2, tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS_WRITE));

 

Any help very gratefully received. I think it should be at the point hightlighted just don't want to make a mess

Edited by lmjacques

Share this post


Link to post
Share on other sites

follw the instrunction given in the thread


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
follw the instrunction given in the thread

 

I have read through the instructions and no matter were I place the code

 

// BOF Anti Robotic Registration v3.1

if (ACCOUNT_VALIDATION == 'true' ) {

include(DIR_WS_MODULES . FILENAME_CHECK_VALIDATION);

if ($entry_antirobotreg_error == true) $messageStack->add('contact', $text_antirobotreg_error);

}

// EOF Anti Robotic Registration v3.1

 

It doesn't kick up any errors when the code is not inputted.

Share this post


Link to post
Share on other sites

because u seem to have chosen to ignore some of the instuctions!!


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
because u seem to have chosen to ignore some of the instuctions!!

 

I'll be honest spooks, I don't fully understand the instructions, I am learning as I go and the instructions with the code on this topic I don't understand.

That I know is down to me more than the instructions.

Share this post


Link to post
Share on other sites

hi im a newbie here. I have just installed this program and followed every instructions but i got a blank page. Anyone can help?

Share this post


Link to post
Share on other sites

perhaps u don't speak english??

 

init means initialiusation (code)

 

must be included at start, not ignored!!

 

 

Check Code: (after a return check (action=process etc), this assumes use of $error for check (most do)

 

means what it says so place code after

 

$testimonials_error = false;

if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'insert')) {

 

& put

$testimonials_error = $error;

 

obviuosly u need to alter the message stack id to match your page

 

 

 

If u still cant manage, perhaps time u passed your site development to someone who can!!


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Thank you spooks.

Your help was appreciated all sorted and working.

Truely Thank you

Share this post


Link to post
Share on other sites
Problemo solved!

Got some help from my host.

It was two empty lines in my filenames.php and database_tables.php.

 

I have no clue why that should block the picture. But it sure did.

 

Thanks alot for the beeing one of those who made this contribution spooks!

 

Regards

Morten

 

 

Morten,

 

I am having the same problem. Could you please provide details on the missing lines? Thanks for your help.

 

Last time, I called my host, they deleted deleted my database, oops!

 

Thanks for your help.

 

Steve

Edited by zozopelli

Share this post


Link to post
Share on other sites

I suspect he is talking of whitespace at start/end of file, created when editing file or by some 'bad' editors. The inbuilt editor in filemanager can cause this, edit your files with a proper text editor, such as html-kit. http://www.oscommerce.info/kb/osCommerce/Common_Problems/15


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
Most likely you have SID issues: http://forums.oscommerce.com/index.php?sho...c=330479&hl

 

Its just possible you have an isssue with the 'empty' function, try this:

 

in validation_png.php replace

 

if(empty($HTTP_GET_VARS['rsid']))

 

with:

 

$rsid = $_GET['rsid'];
if (($rsid == '') || (strtolower($rsid) == 'null') || (strlen(trim($rsid)) == 0))

 

 

Hey Spooks,

 

Changed for empty function, now get black square. Changed colors multiple colors ,0x, #, copied & pasted hex dec from png. still no color change in background or anything, but can change size.... so it's generating something.

 

Any suggestions? Any additions to error reporting?

 

thanks.

 

things go zozo

Share this post


Link to post
Share on other sites
Hey Spooks,

 

Changed for empty function, now get black square. Changed colors multiple colors ,0x, #, copied & pasted hex dec from png. still no color change in background or anything, but can change size.... so it's generating something.

 

Any suggestions? Any additions to error reporting?

 

thanks.

 

things go zozo

 

 

Problem resolved!

1. removed above coding for empty function.

2. In Valdiation_png.php added if (PHP_VERSION >= 4.1) $HTTP_GET_VARS =& $_GET;

 

I am using php 5.

 

Thanks, awesome contribution spooks.

Share this post


Link to post
Share on other sites

Hey Sam or Spooks!

 

I love the contribution! Thanks Heaps

 

I think i have a little problem with SID and wondering if you can help.

 

I am testing and constructing our new website on Localhost if that makes any difference.

 

I have the following contributions installed which may effect the installation of Anti-Robot to sure??

 

Ultimate SEO URL's

SID Killer

 

The problem is, on create_account.php, contact_us.php, Account_edit.php, password_forgotten.php and all others the "Invalid Validation Code" error appears.

 

If i go into Ultimate SEO in Admin and set Enable SEO URLs? to FALSE instead of TRUE, the validation codes work as they should, and a Session ID is placed after the path as follows:

 

catalog/create_account.php (with Enable SEO URLs? to TRUE)

catalog/create_account.php?osCsid=gqkgtu9v3e4c6mmeo22s36ese4 (with Enable SEO URLs? to FALSE)

 

I have searched these forums for the last few days trying to sort the problem out, without success.

 

I am let to believe, correct me if i am wrong, that the Session ID when Enable SEO URLs is set to TRUE is placed somewhere else in the site, i just need to direct Anti-Robot to this.

 

Any help would be appreciated.

 

As you would be aware we need Ultimate SEO URL's turned on and no Session ID in the path otherwise google etc will go mad!

 

Thanks Heaps

 

Nick

www.tassiesolar.com.au (currently offline)

Share this post


Link to post
Share on other sites

If u read through this thread u will note there are problems with windows servers, so unless u have a mac it wont work till u place on the server.

 

as a by the way if your seo is removing the sid it is in error, it must not do that, try using the latest (ULTIMATE Seo Urls 5 - by FWR Media http://addons.oscommerce.com/info/6768)

 

 

u should ensure google get no session with use of Prevent Spider Sessions


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
If u read through this thread u will note there are problems with windows servers, so unless u have a mac it wont work till u place on the server.

 

as a by the way if your seo is removing the sid it is in error, it must not do that, try using the latest (ULTIMATE Seo Urls 5 - by FWR Media http://addons.oscommerce.com/info/6768)

 

 

u should ensure google get no session with use of Prevent Spider Sessions

 

Thanks for the quick reply Sam.

 

Ok i have removed SID Killer in application_top.php, and the Session ID's are back, and it seems to work fine now, with Enable SEO Urls to True.

 

I have Prevent Spider Sessions in Admin set to True so i should be right now then, is there anyway i can be sure or just take it as being correct?

 

Thanks Heaps

 

Nick

Share this post


Link to post
Share on other sites
I have Prevent Spider Sessions in Admin set to True so i should be right now then, is there anyway i can be sure or just take it as being correct?

 

U should ensure your spiders.txt is up to date (there is a contrib) if u search the web u will find details on setting your user agent to google etc, and test with that

Edited by spooks

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Curious if anyone has been able to get this to work with reviews page?

 

I have guest reviews mod installed on my site, and can't figure out how to get this integrated. Seems like reviews was the only submit page which wasn't included.

 

Looks very easy to install too.

Share this post


Link to post
Share on other sites

which reviews contrib are u talking of?

 

have u tried the method detailed in this thread


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Hello,

I just installed a fresh copy of osc with anti robot being my first contribute. I have it working great! I first want to say thank you for allowing this to be used publicly. I do have a one concern though and maybe it doesn't have to do with this contribute. When I create an account with this contribution installed, it works great. But, if I was to pretend to be someone bad and wanted to use an e-mail address that was already registered with my osc, I will get a message stating that "the current email address is in use, please enter another to register...etc" BUT the anti robot reg doesn't reload again, it instead states "you are validated." The problem is that from this point, I am free to put in any email address I want. Again maybe this doesn't have to do much with this contrib. I'm just trying to prevent fake or spam emails and from filling up on my osc. Any tips would be great - thanks again!

 

kenz

Share this post


Link to post
Share on other sites

Are u thinking that the bad ones are going to sit there entering e-mail addresses in the hope of finding ones that already exist in you dbase, after all every time they fail to find a match they'll create a new account instead


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
Are u thinking that the bad ones are going to sit there entering e-mail addresses in the hope of finding ones that already exist in you dbase, after all every time they fail to find a match they'll create a new account instead

 

yeah that was my thought process. I guess im just trying learn what I can do to prevent build up of unneeded email accounts. thats all.

 

Thanks for the response

Share this post


Link to post
Share on other sites

Spammers usually use rubbish names etc when they fill in forms, u can do tests for that - Random keystroke blacklist http://addons.oscommerce.com/info/5397


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
which reviews contrib are u talking of?

 

have u tried the method detailed in this thread

 

Spooks, which thread? this very one we're in? i didn't see anything regarding setting it up with reviews. I have "guest reviews" installed, which allows guests to post reviews (since i don't require an account to order my product).

 

Thanks.

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  

×