02-09-2018, 03:48 AM
Note that the max length of thread subject is hard coded in MyBB (by default, it is 85).
We can use Custom Modify Error feature of XThreads to set a lower limit.
Create Custom Thread Fields.
Now each time users try to post a thread with subject more than 50 characters, there is a nice error messages for them
If we want different length for each forum, just create other similar custom thread fields.
We can use Custom Modify Error feature of XThreads to set a lower limit.
Create Custom Thread Fields.
- Title: Maximum Subject
- Key: max_subj
- Applicable Forums: select in which forum(s) we need a lower thread subject length.
- Hide input field on New/edit thread: check
- Hide on Show thread: check
- Editable by / Required Field?: Everyone. Please do not make it required.
- Custom Modify Error
Code:<if my_strlen($mybb->input['subject']) > 50 then>Your subject is too long. The maximum characters allowed is 50</if>
Now each time users try to post a thread with subject more than 50 characters, there is a nice error messages for them

If we want different length for each forum, just create other similar custom thread fields.