XF 2.0 Best way to extend new captcha class

mcatze

Well-known member
I would like to integrate hCaptcha similar to reCaptcha, but i don't know which is the best way to extends the new class hCaptcha.

I am not so familiar with the XF2 Code so it is difficult to figure out whats the best way. Maybe someone give me a hint.. ;)

1. Create new class like reCaptcha:
PHP:
<?php

namespace ITM\hCpatchaIntegration\XF\Captcha;

use XF\Captcha\AbstractCaptcha;
use XF\Template\Templater;

class hCaptcha extends XFCP_AbstractCaptcha

2. Create Class extension:
Screenshot 2018-10-16 21.09.58.webp

3. Create templates..

4. Get error:
Screenshot 2018-10-16 21.10.51.webp
 
You don't have to extend anything.

Template TMS "option_template_captcha" with add option value == Class
Create class with desired code - done and don't forget the JS
 
Back
Top Bottom