OJS: Adding a custom captcha in user registration form

Hi all,

I wish to change the captcha used for our OJS instance to Google’s “I am not a robot” style within the users registration form. (I’m a developer & have server access ect).

I was hoping someone could give me a few pointers on the process flow and where to begin with regards to making these adjustments.

Thank you very much!

Hi @aidana ,

ReCaptcha is already available without needing any modifications; see config.inc.php for options.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

Sorry, I should have specified.

Unfortunately I’m modifying an older (heavily modded) version of OJS which doesn’t have that setting in the config (Release date: Dec 21, 2009 - OJS 2.3.1).

Where could I start off to get this in place? Is the recaptcha code in the newer versions I could quite simply attach to the modded verison I’m currently working on?

Thank you,
Aidan

Hi @aidana,

I’d suggest by grepping the source code for a more recent release for recaptcha:

fgrep -l recaptcha `find . -type f`
 ./docs/release-notes/ChangeLog-2.4.4
./config.inc.php
./classes/user/form/RegistrationForm.inc.php
./classes/comment/form/CommentForm.inc.php
./config.TEMPLATE.inc.php
./lib/pkp/classes/notification/form/NotificationMailingListForm.inc.php
./lib/pkp/classes/form/validation/FormValidatorReCaptcha.inc.php
./lib/pkp/lib/recaptcha/recaptchalib.inc.php
./lib/pkp/lib/recaptcha/LICENSE
./templates/user/register.tpl
./templates/notification/maillist.tpl
./templates/comment/comment.tpl

But if it’s at all possible, I’d recommend spending the time getting your installation upgraded rather than back-porting features. I presume you’ll need to upgrade eventually.

Regards,
Alec Smecher
Public Knowledge Project Team