hCaptcha by Intuition Machines
Add a hCAPTCHA on forms, a modified ReCaptcha v2 component by Jonathan Goncalves
Requires:
✓OSSN Version 5.6 or higher (tested up to 7.0)
✓OSSN Components Captcha, ReCaptcha and ReCaptcha3 disabled
Where the hCaptcha will be added?
✓Reset Password Page
✓Signup/Register Page
How to use this component?
1.) https://dashboard.hcaptcha.com/login and make sure to make your account and find your Account Secret Key on your Account Settings page link by clicking your profile picture and save the generated Account Secret Key.
2.) Click the sites link and add your domain, make sure to also save the Site Key.
3.) Go to /administrator of your site and click the Configure dropdown menu and click "hcaptcha".
4.) Fill in the proper Account Secret Key and Site Key
Alternative Download Link:
https://github.com/thedoggybrad/hcaptcha-ossn/releases/download/1.3/hcaptcha.zip
Currently Translated Languages
✓English (en) by TheDoggyBrad
✓German (de) by Dominik L
Just post your customized translation file here and I will push it into a release if I had time.
Development Status: STABLE
What's wrong here:
•Line 4 (Error 1)
<input type="text" name="hcaptcha_site_key" value="<?php echo $params['hcaptcha']->hcaptcha_site_key;?>" />
•Line 8 (Error 2)
<input type="text" name="hcaptcha_secret_key" value="<?php echo $params['hcaptcha']->hcaptcha_secret_key;?>" />
What's wrong here?
Full Code (because the OSSN's typing box brokes the code):
https://github.com/thedoggybrad/hcaptcha-ossn/blob/main/plugins/default/forms/hcaptcha/admin.php
I do not have a proper knowledge regarding on the PHP Error Logs, and does know what is the meaning of that. I can confirm that my OSSN site has PHP Error Logs intentionally disabled by me. It may take a long time for me to figure about this problem.
I will investigate it. I do not actually record the error logs. I will see what is going on there. But its working, just with problems reported by the error log.
I installed on fresh OSSN went to Hcatpcha admin page and I get (in error log)
PHP WARNING: 2023-06-11 (UTC): "Attempt to read property "hcaptcha_site_key" on bool" in file \www\components\hcaptcha\plugins\default\forms\hcaptcha\admin.php (line 4)
PHP WARNING: 2023-06-11 (UTC): "Attempt to read property "hcaptcha_secret_key" on bool" in file \www\components\hcaptcha\plugins\default\forms\hcaptcha\admin.php (line 8)
Version 1.1
Fixes credits on the component this component has been based on.
From this:
Add a hCAPTCHA on forms, a modified ReCaptcha v3 component by Jonathan Goncalves
to this one:
Add a hCAPTCHA on forms, a modified ReCaptcha v2 component by Jonathan Goncalves
Important: If you are an "Enterprise Plan User" of hCaptcha you will have 3 options for the hCaptcha Behavior. They are:
✓Mode: Always Challenge
✓Mode: Passive
✓Mode: 99.9% Passive
But if you are in a free plan, the only available option is "Mode: Always Challenge". Changing this options may affect how hCaptcha will work on your OSSN site.
Note: Changing the Passing Threshold will not affect anything other than the captchas will be easier or harder to solve.