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

Cryptaline

Active member
Hi!

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!
 
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

PHP:
		return array('xf_captcha_question' => array(
			'captcha_question_id'
				=> array('type' => self::TYPE_UINT, 'autoIncrement' => true),
			'question'
				=> array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 250),
			'answers'
				=> array('type' => self::TYPE_SERIALIZED, 'required' => true, 'verification' => array('$this', '_verifyAnswers')),
			'active'
				=> array('type' => self::TYPE_BOOLEAN, 'default' => 1),
		));

Change "maxLength" to something more appropriate.
 
Back
Top Bottom