forum plugin captcha forum plugin captcha
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

forum plugin captcha

Started by mam, November 15, 2013, 12:47:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mam

Hi there, anybody knows how to disable captcha for logged in users in forum plugin, in case of making new topics or ...?

mam

Finally I myself found the solution   ;)
It might need some more coding, but firstly just delete this thread in the following files (attachment):

  if ($CONFIG['comment_captcha'] == 1 || $CONFIG['comment_captcha'] == 2 && !USER_ID) {
                if (!captcha_plugin_enabled()) {
                    global $lang_errors;
                    $superCage = Inspekt::makeSuperCage();
                    require("include/captcha.inc.php");
                    $matches = $superCage->post->getMatched('confirmCode', '/^[a-zA-Z0-9]+$/');

                    if (!$matches[0] || !PhpCaptcha::Validate($matches[0])) {
                        $errors[] = $lang_errors['captcha_error'];
                    }

ΑndrĂ©

The forum captcha depends on the setting for comment captcha. That means if you disable the comment captcha in the config, the forum captcha will also be disabled.

If you want to enable/disable the forum captcha independently from the comment captcha, I suggest to change the line
  if ($CONFIG['comment_captcha'] == 1 || $CONFIG['comment_captcha'] == 2 && !USER_ID) {
to a statement that's always true or false
if (true) {
if (false) {

Removing the code mam suggested will probably result in a parsing error.