- Jan 28, 2020
- 838
- 7
- 272
- Language
- English
Max character limit for thread titles | Thread title limitation
There is an option for the max character limit in posts in the ACP, but you can't seem to find an option in the ACP that lets you specify the number of allowed characters in thread titles. I know that it isn't unlimited, so where is the setting?Check it here:
library/XenForo/DataWriter/Discussion.php
Operation logs:
protected function _getCommonFields()
{
$structure = $this->_discussionDefinition->getDiscussionStructure();
return array(
$structure['table'] => array(
$structure['key'] => array('type' => self::TYPE_UINT, 'autoIncrement' => true),
$structure['container'] => array('type' => self::TYPE_UINT, 'required' => true),
'title' => array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 100,
'verification' => array('$this', '_verifyTitle'), 'requiredError' => 'please_enter_valid_title'
),
'reply_count' => array('type' => self::TYPE_UINT_FORCED, 'default' => 0),
'view_count' => array('type' => self::TYPE_UINT_FORCED, 'default' => 0),
And you also need to change the table definition for xf_thread in the database. You need to extend the length of the title column.