revise discuz X3.2 the length limit of 80 characters for the forum title
about discuz the forum title is limited to 80 characters. i have modified it many times, but i always look for it randomly and read it online because there are many modified files. this time, in order not to have trouble in the future, i might as well record it myself.
1:modify the database, it needs to be executed sql statement
the data table prefix should be consistent with yours, and some people will modify this when installing the forum.
ALTER
TABLE `pre_forum_post` CHANGE `subject` `subject` VARCHAR(200) NOT
NULL;ALTER TABLE `pre_forum_rsscache` CHANGE `subject` `subject`
char(200) NOT NULL;ALTER TABLE `pre_forum_thread` CHANGE `subject`
`subject` char(200) NOT NULL;
2:revise js verify the file and find it static/js/forum_post.js find the following paragraph in the file.
if(($('postsubmit').name
!= 'replysubmit' && !($('postsubmit').name ==
'editsubmit' && !isfirstpost) &&
theform.subject.value == "") || !sortid && !special
&& trim(message) == "")
{showError('sorry, you have not entered the title or content yet' );return false;} else
if(mb_strlen(theform.subject.value) > 80) {showError('your title is over 80
limitation of characters' );return false;}
modified to
if(($('postsubmit').name !=
'replysubmit' && !($('postsubmit').name == 'editsubmit'
&& !isfirstpost) &&
theform.subject.value == "") || !sortid && !special
&& trim(message) == "")
{showError('sorry, you have not entered the title or content yet' );return false;} else
if(mb_strlen(theform.subject.value) > 200) {showError('your title is over 200
limitation of characters' );return false;}
3:or modify js file, find sitatic/js/forum.js there is a similar paragraph in the file
if(theform.message.value
== '' || theform.subject.value == '') {s =
'sorry, you have not entered the title or content yet'; theform.message.focus();} else
if(mb_strlen(theform.subject.value) > 80) {s = 'your title is over 80
limit of characters'; theform.subject.focus();}
modified to
if(theform.message.value
== '' || theform.subject.value == '') {s =
'sorry, you have not entered the title or content yet'; theform.message.focus();} else
if(mb_strlen(theform.subject.value) > 200) {s = 'your title is over 200
limit of characters'; theform.subject.focus();}
4:modify the template file and find it template\default\forum\post_editor_extra.htm document,
except for the first 80, all the others are replaced with 200.
5:or modify the program file and find it template\default\forum\forumdisplay_fastpost.htm it also needs to be modified
except for the first and last ones, 80, all the others are replaced with 200.
6:modify the verification function file and find source/function/function_post.php document
if(dstrlen($subject) > 80) {return 'post_subject_toolong';}
modified to
if(dstrlen($subject) > 200) {return 'post_subject_toolong';}
7:the language pack is still modified, source/language/lang_messege.php in
'post_subject_toolong' => ' sorry, your title has more than 80 characters to modify the title length',
modified to
'post_subject_toolong' => ' sorry, your title has more than 200 characters modified title length',
8:finally, just update the cache. the following files all cache the number 80 and 200. you can change it directly, or batch code replacement.

the above is the "modification" shared by suyou network and everyone discuz X3.2 the length limit of 80 characters for the forum title is ", thank you very much for your patience to read this article, we will provide you with more information on reference or learning communication. we can also provide you with:enterprise website construction, website imitation, website copying, imitation site, foreign trade website construction, foreign trade website construction, company official website productionfor services, our company serves customers with the service concept of "integrity, professionalism, pragmatism and innovation". if you need cooperation, please scan the code to consult, and we will serve you sincerely.
TAG label: