1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 XenForo Q/A (Captcha Question Field - "250 characters or fewer") How to extend?

Discussion in 'Troubleshooting and Problems' started by Cryptaline, Nov 28, 2012.

  1. Cryptaline

    Cryptaline Active Member


    Guys how to extend this Captcha Question Field limit? From 250 to 1000 or even more.
    Probably I ve found very easy solution 2 block all spammers. However, this limit wont let to implement it/test it. Will apreciate any idea :coffee:

    Thank you!
  2. Chris D

    Chris D XenForo Developer Staff Member

    The limit is set on the database field.

    You would need to go to your database, find the xf_captcha_question table and change the question field from varchar(250) to something more appropriate.

    Also, you will need to alter the field definition in the DataWriter.

    Edit: library/XenForo/DataWriter/CaptchaQuestion.php

            return array('xf_captcha_question' => array(
    => array('type' => self::TYPE_UINT'autoIncrement' => true),
    => array('type' => self::TYPE_STRING'required' => true'maxLength' => 250),
    => array('type' => self::TYPE_SERIALIZED'required' => true'verification' => array('$this''_verifyAnswers')),
    => array('type' => self::TYPE_BOOLEAN'default' => 1),
    Change "maxLength" to something more appropriate.
    Jake Bunce and Cryptaline like this.
  3. Cryptaline

    Cryptaline Active Member

    Thank you Chris!

Share This Page