How can captcha enable after 3 times

hi to all
i have question about Captcha Settings in OJS3
i know that with config.inc we can enable Captcha Settings, but if i enable that , its always enable but i want its off default but after users attemp 3 times to login or register , … captcha will enabled

and i have another question: how can enable Captcha for Login Systems?
please guide me how can solve problem

Are you comfortable with PHP and Smarty code? This will take some custom modifications on your part. You will need to decide whether you want this to be session cookie based, or if you want to try to base the count on some other mechanism, like IP and User Agent. After adding the code to perform the count, you will need to modify the controller to activate the ReCAPTCHA; everything should operate as-is from there.

If you are familiar with coding in general, we can point you toward the right place to activate a “delayed” ReCAPTCHA.

I’m not sure what you mean by “enabling Captcha for Login Systems”.

@ctgraham yes i am familiar with php and smarty :slight_smile:
but i don’t know which files should be edited ?

i mean i want add captcha for users login part for example such url
http://ojs3/index.php/{publication_name}/%20login
when users attemp to login after 3 times , system will enable Captcha for next try :wink: i hope u got my mean :smiley:

There is a similar discussion for adding the CAPTCHA to the login page, but for 2.4.x instead of 3.x here:

The difference between the registration Form and the login Handler appears to continue in OJS 3.1:

In OJS 3.x, you can find the CAPTCHA code for the Registration form here:

See the constructor, fetch(), and 'readInputData()` functions.