Jump to content
JcMagpie

Spam, Fake accounts and how to stop them.

Recommended Posts

We have a big problem with spam and fake accounts on Phoenix sites, so what can we do? Well found some time to hook Google reCAPTCHA V2 for Phoenix 1.0.3.0 so everyone can make use of it.

I have installed and tested on Phoenix 1.0.3.0 but as this is critical to comunincation with your customers I'm not going to post in the app's untill it's been tested by a few others. So here we go.

JcM Google reCAPTCHA V2 Phoenix V1.0

A simple add-on to let add the Google reCAPTCHA V2 to any form in Phoenix 1.0.3.0 that has the hooks added to it.

It is a no core change add-on and uses site-wide hooks. Simply copy all the files over. You will need your Google reCAPTCHA so you can add them to the following file

includes/languages/english/google_recaptcha.php

Just open it in your editor and add the comment and keys into it

//google

define('MODULE_CONTENT_RECAPTCHA_ERROR','Sorry you need to prove you are human first please complete the google captcha');

define('MODULE_CONTENT_RECAPTCHA_SITEKEY','Place your site key here');

define('MODULE_CONTENT_RECAPTCHA_SECRETKEY','Place your Secret key here');

That’s it it should just work. When you go to your contact_us page you should see the Google reCAPTCHA

Enjoy.

Can be see working on this site

Thank's to @Gyakutsuki for helping to debug this.

image.png.4b0598bc9bd71bd73ff4137fa700a4ea.png

 

 

JcM Google reCAPTCHA V2 Phoenix V1.0.zip


 

Share this post


Link to post
Share on other sites

Nice work, it will help some people on this forum to fight again that.



Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

 

Share this post


Link to post
Share on other sites

Thank you very much Zahid @JcMagpie and @Gyakutsuki for improving OSC !!
This addon is very necessary and should come as part of the basic OSC package. Thank you both for completing it !!!


Please do not falsify my words. Are you interested in knowing who does it? Send me a PM.

The Phoenix Club won't allow me to join - why not?

Setting up a new Frozen site with so many nice addons available on the market. 

:heart: Community Oscommerce fan :heart:

 

Share this post


Link to post
Share on other sites

Hi @JcMagpie

Does this addon work in Frozen? I know that Frozen has site-wide hooks, I guess it should work too, what do you think?
 I still don't have Phoenix installed due to the big changes it is having, so  I can not test on it.

I will await for your response before test.

Thank you

Valqui


Please do not falsify my words. Are you interested in knowing who does it? Send me a PM.

The Phoenix Club won't allow me to join - why not?

Setting up a new Frozen site with so many nice addons available on the market. 

:heart: Community Oscommerce fan :heart:

 

Share this post


Link to post
Share on other sites

Hi Zahid.
I tried it on Frozen and it didn't work. I guess Frozen doesn't have hooks in the form installed, how can I check it?

BR

Valqui


Please do not falsify my words. Are you interested in knowing who does it? Send me a PM.

The Phoenix Club won't allow me to join - why not?

Setting up a new Frozen site with so many nice addons available on the market. 

:heart: Community Oscommerce fan :heart:

 

Share this post


Link to post
Share on other sites

I'm no expert on hook's but from what i can see any form using them should have them within it.......

$OSCOM_Hooks->call('siteWide', 'injectFormVerify');

and

$OSCOM_Hooks->call('siteWide', 'injectFormDisplay');


 

Share this post


Link to post
Share on other sites

Frozen contact_us.php definitely doesn't contain that code. Conclusion is not compatible with frozen (Only if someone knows how to include that code in Frozen contact_us.php).

I'm going to install next week last Phoenix and I will try it.

Best Regards and great weekend.

Valqui


Please do not falsify my words. Are you interested in knowing who does it? Send me a PM.

The Phoenix Club won't allow me to join - why not?

Setting up a new Frozen site with so many nice addons available on the market. 

:heart: Community Oscommerce fan :heart:

 

Share this post


Link to post
Share on other sites
13 minutes ago, valquiria23 said:

Conclusion is not compatible with frozen

Yes I did not think it was. You would also need to make changes to the template_top and application-top also I would think. You would have to check on github to see changes from Frozen to Phoenix for the hooks.


 

Share this post


Link to post
Share on other sites

Very good day Zahid @JcMagpie

Tested in Phoenix 1.0.4.0 and its works flawlessly !!! Thank you very much for your contribution to the community!!

Cheers

Valqui


Please do not falsify my words. Are you interested in knowing who does it? Send me a PM.

The Phoenix Club won't allow me to join - why not?

Setting up a new Frozen site with so many nice addons available on the market. 

:heart: Community Oscommerce fan :heart:

 

Share this post


Link to post
Share on other sites

Thakyou for testing. Have made a small update so that you can now add a accept terms hook as well if required. Customer can click and read short or full privacy statment and must toggle slider to proceed.The Privacy hook is optional as many site have just a simple text statment that by proceeding and using the form you agree to terms.

image.thumb.png.e7b4a22c844881211990d1d4a476504b.png

Agian feel free to down load and test and if it's stable will upload to app's at some point.

JcM Google reCAPTCHA V2 with Terms Phoenix V1.3.zip


 

Share this post


Link to post
Share on other sites

Well meant advice;

You have multiple hook files performing the catcha routine ... this can be done from one hook file.   

Take a look at the core bootstrap example where it is placing "stuff" in two different locations;
https://github.com/gburton/CE-Phoenix/blob/master/includes/hooks/shop/siteWide/bootStrap.php#L23 
&
https://github.com/gburton/CE-Phoenix/blob/master/includes/hooks/shop/siteWide/bootStrap.php#L30

Having just one File with all the hooks (for a given "XYZ" [in this case captcha]) in it, is;

  • simpler for you in terms of support
  • simpler for user in terms of having to upload/delete etc
    let us say that the user wanted to not use your captcha anymore, and deleted the file that displays the form...the other files gets missed somehow...they have a broken site.  Not good for them [loss of potential sales], not good for you [support issues], etc etc

Hooks are a big part of Phoenix' future, so well done on being one of the pioneers of them.

 

 


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites
48 minutes ago, burt said:

this can be done from one hook file.   

Yep thank's.. good point just my scater brain approch to doing things in bits and bobs. Will tidy things up before posting in app store.


 

Share this post


Link to post
Share on other sites

I'm going to try it tomorrow and I'll let you know. Thank you for your contributions to the community Zahid!


Please do not falsify my words. Are you interested in knowing who does it? Send me a PM.

The Phoenix Club won't allow me to join - why not?

Setting up a new Frozen site with so many nice addons available on the market. 

:heart: Community Oscommerce fan :heart:

 

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

×