Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Limitting Thread Subject
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
Limitting Thread Subject
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.
  • 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>

Modify it as your needs.

Now each time users try to post a thread with subject more than 50 characters, there is a nice error messages for them Biggrin
If we want different length for each forum, just create other similar custom thread fields.

(This post was last modified: 02-17-2018 10:37 PM by RateU.)
02-09-2018 03:48 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Limitting Thread Subject - RateU - 02-09-2018 03:48 AM

 Standard Tools
Forum Jump: