Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: forum plugin captcha  (Read 3628 times)

0 Members and 1 Guest are viewing this topic.

mam

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
forum plugin captcha
« on: November 15, 2013, 12:47:49 pm »

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

mam

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: forum plugin captcha
« Reply #1 on: November 15, 2013, 04:55:18 pm »

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

Code: [Select]
  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'];
                    }
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: forum plugin captcha
« Reply #2 on: November 20, 2013, 11:30:33 am »

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
Code: [Select]
  if ($CONFIG['comment_captcha'] == 1 || $CONFIG['comment_captcha'] == 2 && !USER_ID) {to a statement that's always true or false
Code: [Select]
if (true) {
Code: [Select]
if (false) {
Removing the code mam suggested will probably result in a parsing error.
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 21 queries.