修改成200javascript
第一步、執行SQL語句php
SQL代碼:
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;html
第二步、修改JS文件
打開 /static/js/forum_post.js 文件
查找
else if(mb_strlen(theform.subject.value) > 80) {
s = '您的標題超過 80 個字符的限制';
theform.subject.focus();
}java
修改成ide
else if(mb_strlen(theform.subject.value) > 200) {
s = '您的標題超過 200 個字符的限制';
theform.subject.focus();
}
打開 /static/js/forum.js 文件
查找
else if(mb_strlen(theform.subject.value) > 80) {
showError('您的標題超過 80 個字符的限制');
return false;
}函數
修改成post
else if(mb_strlen(theform.subject.value) > 200) {
showError('您的標題超過 200 個字符的限制');
return false;
}
this
第三步、修改模板文件
打開 /template/default/forum/post_editor_extra.htm 文件
查找
<span><input type="text" name="subject" id="subject" class="px" value="$postinfo[subject]" {if $_GET[action] == 'newthread'}onblur="if($('tags')){relatekw('-1','-1'{if $_G['group']['allowposttag']},function(){extraCheck(4)}{/if});doane();}"{/if} onkeyup="strLenCalc(this, 'checklen', 80);" style="width: 25em" tabindex="1" /></span>
<!--{else}-->
<span id="subjecthide" class="z">RE: $thread[subject] [<a href="javascript:;" onclick="display('subjecthide');display('subjectbox');$('subject').value='RE: {echo dhtmlspecialchars(str_replace('\'', '\\\'', $thread[subject]))}';display('subjectchk');strLenCalc($('subject'), 'checklen', 80);return false;">{lang modify}</a>]</span>
<span id="subjectbox" style="display:none"><input type="text" name="subject" id="subject" class="px" value="" onkeyup="strLenCalc(this, 'checklen', 80);" style="width: 25em" /></span>
<!--{/if}-->
<span id="subjectchk"{if $_GET[action] == 'reply'} style="display:none"{/if}>{lang comment_message1} <strong id="checklen">80</strong> {lang comment_message2}</span>
<script type="text/javascript">strLenCalc($('subject'), 'checklen', 80)</script>
修改成spa
<span><input type="text" name="subject" id="subject" class="px" value="$postinfo[subject]" {if $_GET[action] == 'newthread'}onblur="if($('tags')){relatekw('-1','-1'{if $_G['group']['allowposttag']},function(){extraCheck(4)}{/if});doane();}"{/if} onkeyup="strLenCalc(this, 'checklen', 200);" style="width: 25em" tabindex="1" /></span>
<!--{else}-->
<span id="subjecthide" class="z">RE: $thread[subject] [<a href="javascript:;" onclick="display('subjecthide');display('subjectbox');$('subject').value='RE: {echo dhtmlspecialchars(str_replace('\'', '\\\'', $thread[subject]))}';display('subjectchk');strLenCalc($('subject'), 'checklen', 200);return false;">{lang modify}</a>]</span>
<span id="subjectbox" style="display:none"><input type="text" name="subject" id="subject" class="px" value="" onkeyup="strLenCalc(this, 'checklen', 200);" style="width: 25em" /></span>
<!--{/if}-->
<span id="subjectchk"{if $_GET[action] == 'reply'} style="display:none"{/if}>{lang comment_message1} <strong id="checklen">200</strong> {lang comment_message2}</span>
<script type="text/javascript">strLenCalc($('subject'), 'checklen', 200)</script>orm
打開 /template/default/forum/forumdisplay_fastpost.htm 文件
查找
<input type="text" id="subject" name="subject" class="px" value="" onkeyup="strLenCalc(this, 'checklen', 80);" tabindex="11" style="width: 25em" />
<span>{lang comment_message1} <strong id="checklen">80</strong> {lang comment_message2}</span>
修改成
<input type="text" id="subject" name="subject" class="px" value="" onkeyup="strLenCalc(this, 'checklen', 200);" tabindex="11" style="width: 25em" />
<span>{lang comment_message1} <strong id="checklen">200</strong> {lang comment_message2}</span>
第四步、修改函數
打開 /source/function/function_post.php 文件
找到:
if(dstrlen($subject) > 80) {
return 'post_subject_toolong';
}
修改成:
if(dstrlen($subject) > 200) {
return 'post_subject_toolong';
}
第五步、語言包修改
打開 /source/language/lang_messege.php 文件
找到
'post_subject_toolong' => '抱歉,您的標題超過 80 個字符修改標題長度',
修改成
'post_subject_toolong' => '抱歉,您的標題超過 200 個字符修改標題長度'