XF 1.2 How to change character limit for thread titles?

a.tushkanov

Active member
Unlike this and this questions about how to change thread title length, i need to reduced it to 70/75 characters.
How can i do this with no problems in HTML or while editing thread titles?
Thank you.
 

Jake Bunce

XenForo moderator
Staff member
It should be sufficient to change the maxlength of the form field:

Admin CP -> Appearance -> Templates -> thread_create

In red:

Rich (BB code):
		<dl class="ctrlUnit fullWidth surplusLabel">
			<dt><label for="ctrl_title_thread_create">{xen:phrase title}:</label></dt>
			<dd><input type="text" name="title" class="textCtrl titleCtrl" id="ctrl_title_thread_create" maxlength="100" autofocus="true"
				placeholder="{xen:phrase thread_title}..."
				data-liveTitleTemplate="{xen:phrase create_thread}: <em>%s</em>" /></dd>
		</dl>
 

Nusaint

Member
It should be sufficient to change the maxlength of the form field:

Admin CP -> Appearance -> Templates -> thread_create

In red:

Rich (BB code):
        <dl class="ctrlUnit fullWidth surplusLabel">
            <dt><label for="ctrl_title_thread_create">{xen:phrase title}:</label></dt>
            <dd><input type="text" name="title" class="textCtrl titleCtrl" id="ctrl_title_thread_create" maxlength="100" autofocus="true"
                placeholder="{xen:phrase thread_title}..."
                data-liveTitleTemplate="{xen:phrase create_thread}: <em>%s</em>" /></dd>
        </dl>
Hello,

Sorry to dig up an old thread but this is the closest I could find to my question. What if I want to increase the minimum lenght. I am getting people starting threads with one words and I want to change it.

Thanks in advance
 

Jake Bunce

XenForo moderator
Staff member
Hello,

Sorry to dig up an old thread but this is the closest I could find to my question. What if I want to increase the minimum lenght. I am getting people starting threads with one words and I want to change it.

Thanks in advance
You should probably have a proper addon for this so you can extend the datawriter, do word checking, and give appropriate error messages to the user. You can post a request here:

https://xenforo.com/community/forums/resource-and-add-on-requests.68/
 

pankaj2345

Member
After making changes in "library/XenForo/DataWriter/Node.php" and "Admin CP -> Appearance -> Templates -> thread_create" with the same value I am still getting error as "please enter a value using 100 characters or fewer after increasing title". Can you tell me why I am getting this error even after making changes in both.

error.jpg

(Seeking for reply on urgent bases)
 
Top