Advanced search  

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

Pages: [1]   Go Down

Author Topic: [Solved]: captcha under optional in the registration  (Read 4345 times)

0 Members and 1 Guest are viewing this topic.

Laicodc

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
[Solved]: captcha under optional in the registration
« on: March 30, 2009, 10:10:45 pm »

I just installed the captcha plugin and noticed that the captcha is under "OPTIONAL" section in the registration page.  Is there a way to put the captcha in the required section instead of the optional section?
« Last Edit: April 03, 2009, 04:13:03 am by Fabricio Ferrero »
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: captcha under optional in the registration
« Reply #1 on: March 30, 2009, 11:00:58 pm »

Please, post a link to your gallery as requested by board rules. And give a link to the Captcha mod you have installed, there are already a couple of them.
Logged
Read Docs and Search the Forum before posting. - Soporte en espaņol
--*--
Fabricio Ferrero's Website

Catching up! :)

Laicodc

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: captcha under optional in the registration
« Reply #3 on: March 31, 2009, 08:14:42 pm »

Open codebase.php of the plugin with a text editor.

Find this:
Code: [Select]
        case 'register.php':
            $valid_groups = explode(',', $CAPTCHA_DISABLE['register']);
            if (!in_array(USER_GROUP, $valid_groups) OR $CAPTCHA_DISABLE['register'] == '') {
                $exper = '(<td colspan="2" align="center" class="tablef">.*
                 .*<input type="submit" name="submit" value="' . $lang_register_php['submit'] . '" class="button" />.*
             .*</td>)';
                if (preg_match($exper, $html)) {
                    $newcpch = '<!-- CAPTCH PLUGIN 3 --><tr><td class="tableb" height="25" width="40%">' . $lang_plugin_captcha_conf . '</td><td class="tableb_compact" colspan="2"><input type="text" name="confirmCode" id="confirmCode" size="5" class="textinput"><img src="captcha.php" align="middle"></tr><tr><td colspan="2" align="center" class="tablef">
                    <input type="submit" name="submit" value="' . $lang_register_php['submit'] . '" class="button" />
            </td></tr>';
                    $html = preg_replace($exper, $newcpch, $html);
                }
            }
            break;


and replace with
Code: [Select]
        case 'register.php':
            $valid_groups = explode(',', $CAPTCHA_DISABLE['register']);
            if (!in_array(USER_GROUP, $valid_groups) OR $CAPTCHA_DISABLE['register'] == '') {
                $exper = '(<input type="text" style="width: 100%" name="email" maxlength="255" value="" class="textinput" />)';
                if (preg_match($exper, $html)) {
                    $newcpch = '<input type="text" style="width: 100%" name="email" maxlength="255" value="" class="textinput" /></td></tr><!-- CAPTCH PLUGIN 3 --><tr><td class="tableb" height="25" width="40%">' . $lang_plugin_captcha_conf . '</td><td class="tableb_compact" colspan="2"><input type="text" name="confirmCode" id="confirmCode" size="5" class="textinput"><img src="captcha.php" align="middle">';
                    $html = preg_replace($exper, $newcpch, $html);
                }
            }
            break;
Logged

Laicodc

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: captcha under optional in the registration
« Reply #4 on: April 03, 2009, 02:22:02 am »

Thanks!  that worked great!!!  I really appreciate your help
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: captcha under optional in the registration
« Reply #5 on: April 03, 2009, 04:11:56 am »

Thanks for coming back and give the topic as solved.
Logged
Read Docs and Search the Forum before posting. - Soporte en espaņol
--*--
Fabricio Ferrero's Website

Catching up! :)
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 20 queries.