Limit custom title?

x4rl

Well-known member
Is there a custom title length limit? i can't seem to find it if there is
Thank's
 
You would have to edit the field in the database to change it to varchar(18)

xf_user: custom_title

However, there are probably other changes required in the core files to accompany this so I wouldn't recommend doing that or it will throw an error.
 
Yes, just checked in library/XenForo/DataWriter/User.php and it's set to 50 so you would need to edit line 97:

Code:
=> array('type' => self::TYPE_STRING, 'maxLength' => 50, 'default' => '', 'verification' => array('$this', '_verifyCustomTitle'))
 
Yes, just checked in library/XenForo/DataWriter/User.php and it's set to 50 so you would need to edit line 97:

Code:
=> array('type' => self::TYPE_STRING, 'maxLength' => 50, 'default' => '', 'verification' => array('$this', '_verifyCustomTitle'))
Ahh nice find thank's ive changed both anyway^_^
 
Another option would be to modify the account_personal_details template.

Find the line:
<input type="text" name="custom_title" value="{$visitor.custom_title}" id="ctrl_custom_title" class="textCtrl" />
and change to:
<input type="text" name="custom_title" value="{$visitor.custom_title}" id="ctrl_custom_title" class="textCtrl" maxlength="18"/>

Then you're just preventing someone from entering more than 18 characters and you don't have to worry about any of the code changes being overwritten when you install your next upgrade. Hard core programmers might know how to get past this but your average user community probably will not.

--Ed
Well sure, if you want to do it the easy way :D
Sod it ive done it all three way's rofl :D
no one will ever hit 19 char's lol
 
Top Bottom