Skip to main content
Topic: How to add a verification control (Read 2110 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to add a verification control

I've created an addon for reCaptcha, but I'm having trouble figuring out how to add the controls to the admin "Anti-Spam" section. All the other controls are added here: https://github.com/elkarte/Elkarte/blob/development/sources/admin/ManageSecurity.controller.php#L504 However, this doesn't account for addon classes. What would be the best way to go about this?

Re: How to add a verification control

Reply #1

I wrote this addon I wrote a while ago to demonstrate how to add new verifications:
https://github.com/emanuele45/Honey-Captcha

It's more or less a two steps process [1]: you have to attach a function to integrate_control_verification in order to let Elk know about your new verification method:
https://github.com/emanuele45/Honey-Captcha/blob/master/HoneyCaptcha.class.php#L3
and there you either require the file with the class, or add the class to the same file the way I did in my demo addon.

Does what I wrote make sense? :-[
and yes, now that I re-read it it's somehow redundant, it should be simplified, probably I didn't have a clear idea of where I wanted to go... /me adds to the todo list
Bugs creator.
Features destroyer.
Template killer.

Re: How to add a verification control

Reply #2

Of course, include the class in the integration function. I'm having a slow week haha -_-

Thanks for the example plugin, that makes it much easier to understand :)

Re: How to add a verification control

Reply #3

Glad it helped! :D
Bugs creator.
Features destroyer.
Template killer.