AI Assistant
Notifications
Clear all

[Solved] hCaptcha Integration?

9 Posts
3 Users
3 Reactions
3,447 Views
Tutrix
Posts: 1519
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@tutrix)
Noble Member
Joined: 6 years ago

@ktalos

can you describe here what you have customized
that will help other users who also want to use hCaptcha


Posts: 15
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@ktalos)
Eminent Member
Joined: 4 years ago

Below is a description of what I did to get hCaptcha working on my site. These steps are accurate as of wpForo v1.9.9.1 

ALWAYS backup your original files before making any changes. This way if something goes sideways, you can always revert back to the original and try again.

 

REQUIRED TO MAKE IT WORK:

wpforo\wpf-includes\class-api.php
  1. Locate " https://www.google.com/recaptcha/api.js " (found at line 1159)
    Replace it with " https://js.hcaptcha.com/1/api.js "
  2. Locate "g-recaptcha-response"
    (there were two instances: one at line 1247 and the other at 1251)
    Replace them both with "h-captcha-response"
  3. Locate " https://www.google.com/recaptcha/api/siteverify " (found at line 1251)
    Replace it with " https://hcaptcha.com/siteverify "

In wpForo's settings area in the WP dashboard, enter and save your hCaptcha site key and secret key in the same fields as is done with reCAPTCHA.

 

NOT REQUIRED, BUT MAKES IT LOOK CONSISTENT:
Replace ONLY strings. For any search hits you get that are not strings - leave them as is. Do not change them. Look for verbiage such as "Google reCAPTCHA" or "reCAPTCHA" and also change the link from Google's reCAPTCHA site (line: 247 in "antispam.php") to hCaptcha's site. 

wpforo\wpf-admin\tools-tabs\antispam.php
wpforo\wpf-admin\xml\english.xml
wpforo\wpf-includes\class-api.php

I only looked at English language files. If you edited the files locally, then upload them back to your server.

Now go back to your browser and reload your wpForo login/register page. The hCaptcha function should now be visible and active.


Posts: 15
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@ktalos)
Eminent Member
Joined: 4 years ago

Below is a description of what I did to get hCaptcha working on my site. This time, instead of using a separate code editor, I used the WordPress Plugin File Editor. These steps are accurate as of wpForo v1.9.9.2

ALWAYS backup your original files before making any changes. This way if something goes sideways, you can always revert back to the original and try again.

 

REQUIRED TO MAKE IT WORK:

wpforo\wpf-includes\class-api.php
  1. Locate " https://www.google.com/recaptcha/api.js " (found at line 580)
    Replace it with " https://js.hcaptcha.com/1/api.js "
  2. Locate "g-recaptcha-response"
    (there were two instances: one at line 624 and the other at 626)
    Replace them both with "h-captcha-response"
  3. Locate " https://www.google.com/recaptcha/api/siteverify " (found at line 626)
    Replace it with " https://hcaptcha.com/siteverify "

In wpForo's settings area in the WP dashboard, enter and save your hCaptcha site key and secret key in the same fields as is done with reCAPTCHA.

 

NOT REQUIRED, BUT MAKES IT LOOK CONSISTENT:
Replace ONLY strings. For any search hits you get that are not strings - leave them as is. Do not change them. Look for verbiage such as "Google reCAPTCHA" or "reCAPTCHA" and also change the link from Google's reCAPTCHA site (line: 124 in "antispam.php") to hCaptcha's site. 

wpforo\wpf-admin\tools-tabs\antispam.php
wpforo\wpf-admin\xml\english.xml
wpforo\wpf-includes\class-api.php

I only looked at English language files. If you edited the files locally, then upload them back to your server.

Now go back to your browser and reload your wpForo login/register page. The hCaptcha function should now be visible and active.


Page 2 / 2
Share: