代码discuz! x2.5论坛标题字数突破80的限制(Discuz! X2.5 forum title, word break 80 limit)

discuz!x2.5  时间:2021-03-20  阅读:()

discuz! x2.5论坛标题字数突破80的限制Discuz! X2. 5 forumtitle, word break 80 limit

This post, "Discuz, "when you wrote "upgrade Discuz, X" on X,was revised on the basis of that post

When some users post title if more than the rest of thecharacters were cut especially when some users send someEnglish or other language of the title of the article said thateven more than a character encoding and special forum is theUTF format because a word for a byte so long as the title ofa Chinese characters many users want to modify the characterlimit

Want to get rid of this word limit, from the following five partsto modify

I. database modification

Two modify the number of JS verification characters

Three modify the number of dead characters written in thet emp lat e

Four modify the function validation file

Five modify the language package file

Now, modify the title character restriction to describe themodification method for the example

A database modify, modify the database title, the length of thefield for characters, run the following SQL statement(pay attention to modifying the prefix of your table)ALTER, TABLE, `pre_forum_pos t` , CHANGE, `sub j ec t` , `s ubj ect` ,VARCHAR () , NOT, NULL;

ALTER, TABLE, `pre_forum_rs s cache` , CHANGE, `sub j ec t` ,`sub jec t` , char () , NOT, NULL;

ALTER, TABLE, `pre_forum_thr ead` , CHANGE, `subj e ct` ,

`subject` , char () , NOT, NULL;

Copy code

Two modify the number of JS verification characters to find theline of file static/js/forum_postjs

If (($(postsubmit) name! =replysubmit&&! ($(postsubmit) name==editsubmit&&&&isfirstpost!) =="theformsubjectvalue")| | ! Sortid & &amp special ; & & trim! (message) = = "{"); showError (sorry, you have not entered the title orcontent) ;

; return; false;

} else, if (mb_strlen (theformsubjectvalue) >) {showError; (your title is more than a character limit) ;

; return; false;

}

Copy code

Modify to

If (($(postsubmit) name! =replysubmit&&! ($(postsubmit) name==editsubmit&&&&isfirstpost!) =="theformsubjectvalue")| | ! Sortid & &amp special ; & & trim! (message) = = "{"); showError (sorry, you have not entered the title orcontent) ;

; return; false;

} else, if (mb_strlen (theformsubjectvalue) >) {showError; (your title is more than a character limit) ;; return; false;

}

Copy code

Find the file to line code for file sitatic/js/forumjs:If (theformmessagevalue = = && theformsubjectvalue = = {)

s; &nbsp = sorry, you have not entered the title or content;theformmes sagefocus; () ;

} else, if (mb_strlen (theformsubjectvalue) >) {s; = your title is more than a character limit;

               & nbsp; theformsubjectfocus () ;

& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; }

复制代码

修改为

I f (theformmessagevalue ==& & theformsubj ectvalue= =) {

               & nb sp; & nbsp; s =抱歉您尚未输入标题或内容;

               & nbsp; & nbsp; theformmessagefocus () ;

& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; } else if (MB_ strlen (theformsubjectvalue) >) {

               

& nb sp; & nbsp; s =您的标题超过个字符的限制;

               & nbsp; & nbsp; theformsubjectfocus () ;

& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; }

复制代码

三修改模板中写死的字符限制数

找到文件templatedefaultforumpost _ editor_ extrahtm的到行& nbsp;

<! {if $_ G [GP _action] . = reply}

< span > < input type= "text" name = "subject" id = "subject"class = "PX" value = "$postinfo [sucapabiwww. 199ge.comlitiesthe long bit mask of driver capabilities.bject] {if $_G [GP_action] ==newthread} onblur=" if ($(tags relatekw)) { ({if$_G [group] [allowposttag] } function () {extracheck () } {/if}) ; Doane () ; } {if} / style = "width:" tabIndex = "/ > < /span >

<! {else}

< span id = "subjecthide" class = "Z" > re: $thread [subject][< a href = "javascript: ;" > {Lang} < / a >Modify] < / span >Id= "< span style=" subjectbox"display: None" > < input type

= "text" name = "subject" id = "subject" class = "PX" value ="" style = "width:" / > < / span >

<! {if} /

< span id= "subjectchk" {if$_G [GP_action] ==reply} style= "display: None" {if} > {Lang / comment _message} < strongid="checklen" > </strong> {Lang comment_message} </span>& nbsp;

复制代码

修改为下面代码

& nbsp;

<! {if $_ G [GP _action] . = reply}

< span > < input type= "text" name = "subject" id = "subject"class="PX"value="$postinfo [subject]" {if$_G [GP_action]==newthread} onb lur="if ($(tags) ) {relatekw ({if$_G[group][allowposttag] } function () {extracheck () } {/ if} ) ; Doane () ; }{if} / style =" width: "tabIndex =" / > < / span >

<! {else}

< span id = "subjecthide" class = "Z" > re: $thread [subject][< a href = "javascript: ;" > {Lang} < / a >Modify] < / span >Id= "< span style=" subjectbox"display: None" > < input type

= "text" name = "subject" id = "subject" class = "PX" value ="" style = "width:" / > < / span >

<! {if} /

< span id= "subjectchk" {if$_G [GP_action] ==reply} style= "display: None" {if} > {Lang / comment _message} < strongid = "checklen" > < / strongprivate const Max _ ide _driveswww.mnmm8. comas long =4 "max number of drives assumingprimary / secondary, master / slave topology > {Lang comment_ message} < / span >

复制代码

找到文件templatedefaultforumforumdi splay _ fastposthtm行< input type = "text" id = "subject" name = "subject" class ="PX" value = "" tabIndex = "" style = "width:" / >

< span > {Lang comment _ message} < strong id = "checklen" >< / strong > {Lang comment _ message} < / span >

复制代码

修改为

<输入类型“文本” id= “主体” name= “主体” c lass= “PX”值= “=” “=”风格的Tab Index宽度 EM” />

<span> {郎comment_message }组ID= “checklen” > </strong> {郎comment_message } < /跨度>

复制代码

四修改函数验证提示

找到文件源/功能/ funct ion_postphp的行

如果dstrlen $ > {

返回post_subject_toolong

}

复制代码

修改为

如果dstrlen $ > {

返回post_subject_toolong

}

复制代码

五找到语言包提示文字打开源/语言/ lang_messegephp并找到行改为

&nbsp &nbsp post_subject_toolong= >抱歉您的标题超过个字符修改标题长度

复制代码

好的你再发表帖子标题就可以是个字符数了  

Spinservers美国圣何塞服务器$111/月流量10TB

Spinservers是Majestic Hosting Solutions,LLC旗下站点,主营美国独立服务器租用和Hybrid Dedicated等,数据中心位于美国德克萨斯州达拉斯和加利福尼亚圣何塞机房。TheServerStore.com,自 1994 年以来,它是一家成熟的企业 IT 设备供应商,专门从事二手服务器和工作站业务,在德克萨斯州拥有 40,000 平方英尺的仓库,库存中始终有...

提速啦香港独立物理服务器E3 16G 20M 5IP 299元

提速啦(www.tisula.com)是赣州王成璟网络科技有限公司旗下云服务器品牌,目前拥有在籍员工40人左右,社保在籍员工30人+,是正规的国内拥有IDC ICP ISP CDN 云牌照资质商家,2018-2021年连续4年获得CTG机房顶级金牌代理商荣誉 2021年赣州市于都县创业大赛三等奖,2020年于都电子商务示范企业,2021年于都县电子商务融合推广大使。资源优势介绍:Ceranetwo...

易速互联月付299元,美国独立服务器促销,加州地区,BGP直连线路,10G防御

易速互联怎么样?易速互联是国人老牌主机商家,至今已经成立9年,商家销售虚拟主机、VPS及独立服务器,目前商家针对美国加州萨克拉门托RH数据中心进行促销,线路采用BGP直连线路,自带10G防御,美国加州地区,100M带宽不限流量,月付299元起,有需要美国不限流量独立服务器的朋友可以看看。点击进入:易速互联官方网站美国独立服务器优惠套餐:RH数据中心位于美国加州、配置丰富性价比高、10G DDOS免...

discuz!x2.5为你推荐
magentomagento是哪年开发出来的,伴随着什么系统,整体运行效果,同类型的系统?http404未找到打开网页提示HTTP 404未找到文件企业电子邮局求:什么是企业邮箱?(企业邮箱与普通个人邮箱的区别是什么?)支付宝账户是什么好评返现 要支付宝帐号 支付宝帐号是什么啊结点cuteftp客服电话各银行的客服电话是多少?科创板首批名单首批公布的24个历史文化明城是那些12306.com12306身份信息待核验要多久?审核要多久缤纷网缤纷的意思是什么爱买网超爱买网的特点
虚拟主机管理软件 老域名全部失效请记好新域名 互联网域名管理办法 inmotionhosting 外贸主机 美国仿牌空间 2017年黑色星期五 骨干网络 dd444 帽子云 idc查询 个人免费主页 测速电信 卡巴斯基试用版下载 hdchina 空间排行榜 美国主机 alexa世界排名 tko 性能测试工具 更多