♥JcMagpie Posted November 22, 2019 Share Posted November 22, 2019 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. JcM Google reCAPTCHA V2 Phoenix V1.0.zip valquiria23 1 Quote Link to comment Share on other sites More sharing options...
♥Gyakutsuki Posted November 22, 2019 Share Posted November 22, 2019 Nice work, it will help some people on this forum to fight again that. valquiria23 1 Quote Regards ----------------------------------------- Loïc Contact me by skype for business Contact me @gyakutsuki for an answer on the forum Link to comment Share on other sites More sharing options...
valquiria23 Posted November 22, 2019 Share Posted November 22, 2019 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 !!! Quote Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
valquiria23 Posted November 22, 2019 Share Posted November 22, 2019 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 Quote Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 22, 2019 Author Share Posted November 22, 2019 (edited) I don't know if Frozen has the hooks in the form for this best thing to do is try it and see. Edited November 22, 2019 by JcMagpie valquiria23 1 Quote Link to comment Share on other sites More sharing options...
valquiria23 Posted November 22, 2019 Share Posted November 22, 2019 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 Quote Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 22, 2019 Author Share Posted November 22, 2019 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'); Quote Link to comment Share on other sites More sharing options...
valquiria23 Posted November 22, 2019 Share Posted November 22, 2019 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 Quote Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 22, 2019 Author Share Posted November 22, 2019 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. valquiria23 1 Quote Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 26, 2019 Author Share Posted November 26, 2019 (edited) Look's like I forgot to add the Google recapatch script hook to the first zip. Sorry here is the updated zip. JcM Google reCAPTCHA V2 Phoenix V1.2.zip Edited November 26, 2019 by JcMagpie valquiria23 1 Quote Link to comment Share on other sites More sharing options...
valquiria23 Posted November 26, 2019 Share Posted November 26, 2019 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 JcMagpie 1 Quote Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 26, 2019 Author Share Posted November 26, 2019 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. 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 Quote Link to comment Share on other sites More sharing options...
burt Posted November 26, 2019 Share Posted November 26, 2019 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. valquiria23, JcMagpie and ArtcoInc 2 1 Quote Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 26, 2019 Author Share Posted November 26, 2019 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. valquiria23 1 Quote Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 26, 2019 Author Share Posted November 26, 2019 JcM Google reCAPTCHA V2 Phoenix V1.4 Updated to put all reCapatcha hooks into one file as advised by Gary. Also place language files in correct path. Terms is still stand alone so add if required. JcM Google reCAPTCHA V2 with Terms Phoenix V1.4.zip valquiria23 1 Quote Link to comment Share on other sites More sharing options...
valquiria23 Posted November 26, 2019 Share Posted November 26, 2019 I'm going to try it tomorrow and I'll let you know. Thank you for your contributions to the community Zahid! Quote Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 28, 2019 Author Share Posted November 28, 2019 Has now been added to the app's store. Please use the support thread for any further discussions on this. JcM Google reCAPTCHA V2 & Terms Phoenix Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.