Folgende Warnungen sind aufgetreten:
Warning [2] Undefined array key 0 - Line: 1640 - File: showthread.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 1640 errorHandler->error_callback
/showthread.php 915 buildtree




Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Einstellungen Mathematik-Captcha
#2
Das kann man einstellen. Allerdings momentan nur im PHP Code. Öffne die "includes/functions.inc.php" und ändere
Code:
    $captcha_rnd_1 = rand(1, 10);
    $captcha_rnd_2 = rand(1, 20);
    $captcha_rnd_3 = rand(1, 30);

    $captcha_rnd_method = rand(1, 2);
    if ($captcha_rnd_method == 1)
        {
        $captcha_sum = $captcha_rnd_1 + $captcha_rnd_2;
        $captcha_math_symbol_1 = "+";
        }
    else
        {
        $captcha_sum = $captcha_rnd_1 - $captcha_rnd_2;
        $captcha_math_symbol_1 = "-";
        }
    $captcha_sum2 = $captcha_sum; // debug

    $captcha_rnd_method = rand(1, 2);
    if ($captcha_rnd_method == 1)
        {
        $captcha_sum = $captcha_sum + $captcha_rnd_3;
        $captcha_math_symbol_2 = "+";
        }
    else
        {
        $captcha_sum = $captcha_sum - $captcha_rnd_3;
        $captcha_math_symbol_2 = "-";
        }

    // generate formula for user
    $captcha_math = $captcha_rnd_1.$captcha_math_symbol_1.$captcha_rnd_2.$captcha_math_symbol_2.$captcha_rnd_3;
in
Code:
    $captcha_rnd_1 = rand(1, 10);
    $captcha_rnd_2 = rand(1, 20);

    $captcha_rnd_method = rand(1, 2);
    if ($captcha_rnd_method == 1)
        {
        $captcha_sum = $captcha_rnd_1 + $captcha_rnd_2;
        $captcha_math_symbol_1 = "+";
        }
    else
        {
        $captcha_sum = $captcha_rnd_1 - $captcha_rnd_2;
        $captcha_math_symbol_1 = "-";
        }

    // generate formula for user
    $captcha_math = $captcha_rnd_1.$captcha_math_symbol_1.$captcha_rnd_2;
Mit
Code:
$captcha_rnd_1 = rand(1, 10);
$captcha_rnd_2 = rand(1, 20);
kannst Du übrigens den Raum der Zahlen einstellen. "1, 10" bedeutet eine Zahl von 1 bis 10. "1, 50" würde dann also eine Zahl im Bereich von 1 - 50 sein. Wenn Du nur eine bestimmte Rechenart (Addition / Subtraktion) zulassen möchtest, dann ändere den Code so:
Code:
    $captcha_rnd_1 = rand(1, 10);
    $captcha_rnd_2 = rand(1, 20);

    $captcha_sum = $captcha_rnd_1 + $captcha_rnd_2;
    $captcha_math_symbol_1 = "+";
    
    // generate formula for user
    $captcha_math = $captcha_rnd_1.$captcha_math_symbol_1.$captcha_rnd_2;
wobei Du dann die beiden "+" eben durch ein "-" ersetzen musst. Je nach Rechenart.

Danke für Deine Frage. Ich werde die Möglichkeit dies in der Administration zu ändern noch einbauen.
Zitieren


Nachrichten in diesem Thema

Möglicherweise verwandte Themen…
Thema Verfasser Antworten Ansichten Letzter Beitrag
  Spam trotz Captcha edevomberg 5 11.703 20.08.2012, 21:15:15
Letzter Beitrag: mopzz
  Captcha wird nicht angezeigt Industriemeister 5 7.165 26.04.2012, 19:05:00
Letzter Beitrag: Industriemeister
  SPAM-Einträge trotz Captcha, Einträge verschwunden chschubert 2 4.840 25.04.2012, 15:18:24
Letzter Beitrag: Industriemeister
  Captcha mathematisch harrygrey 1 3.635 16.09.2011, 12:11:32
Letzter Beitrag: mopzz
  Captcha wird nicht angezeigt kolle13 0 4.388 26.07.2011, 12:22:12
Letzter Beitrag: kolle13
  Captcha wird nicht mehr angezeigt (rotes Kästchen) svdh 4 4.888 14.09.2010, 10:07:16
Letzter Beitrag: svdh
  Captcha lesbarkeit verbessern? axasbraxas 4 6.819 03.06.2010, 11:02:10
Letzter Beitrag: reza
  Captcha Forell 2 3.361 25.11.2008, 21:36:55
Letzter Beitrag: tschipeto
  Captcha-Eingaben werden nicht akzeptiert teogt 2 3.563 30.06.2008, 22:50:29
Letzter Beitrag: teogt
  Sicherheitscode (Captcha) wird nicht angezeigt! Witch 15 12.437 13.03.2008, 23:02:31
Letzter Beitrag: mopzz

Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste