早上改了一下有玩社区的标题字数限制,还专门写了篇文章来做笔记,现在想了想,以后要改的东西还有很多,如果每改一次就写一篇,很明显效率不高,也不方便以后查阅。 所以决定用这篇文章来持续记录改过的文件,也方便给有需要的人进行参考。下面所有的修改都是基于 Discuz 3.4 版本,如果是以前的版本,可能代码位置不一样,只能以本文作为参考。 因为仅仅是做个记录,所以不会写得很详细,如果小伙伴看不懂的,欢迎下方留言,我会认真回复你的。 ## 4、在线用户页面样式微调  文件路径 `/template/default/home/space_friend.htm` 205 行 ```html ``` 改成 ```html ``` 2019.07.31 ## 3、取消图片弹出下载附件 文件路径 `/template/default/forum/discuzcode.htm` 258 行 ```html ``` 改成 ```html ``` 260 行 ```html ``` 改成 ```html ``` 注释掉 267 行 ```html ``` 2019.07.31 ## 2、限制发帖标题字数 文件路径 `/static/js/forum_post.js` ```javascript if(($('postsubmit').name != 'replysubmit' && !($('postsubmit').name == 'editsubmit' && !isfirstpost) && theform.subject.value == "") || !sortid && !special && trim(message) == "") { showError('抱歉,您尚未输入标题或内容'); return false; } else if(mb_strlen(theform.subject.value) > 80) { showError('您的标题超过 80 个字符的限制'); return false; } ``` 下面插入 ```javascript else if(mb_strlen(theform.subject.value) < 20 && mb_strlen(theform.subject.value) > 0) { showError('您的标题不足 20 个字符的限制'); return false; } ``` 2019.07.30 ## 1、去除标题 Powered by Discuz! 文件路径 `/template/default/common/header_common.htm` ```html $navtitle - $_G['setting']['bbname'] - Powered by Discuz! ``` 改为 ```html $navtitle - $_G['setting']['bbname'] ``` 2019.07.16 早上改了一下有玩社区的标题字数限制,还专门写了篇文章来做笔记,现在想了想,以后要改的东西还有很多,如果每改一次就写一篇,很明显效率不高,也不方便以后查阅。所以决定用这篇文章来持续记录改过的文件,也方便给有需要的人进行参考。下面所有的修改都是基于 Discuz 3.4 版本,如果是以前的版本,可能代码位置不一样,只能以本文作为参考。因为仅仅是做个记录,所以不会写得很详细,如果小伙伴看不懂的,欢迎下方留言,我会认真回复你的。4、在线用户页面样式微调文件路径 /template/default/home/space_friend.htm205 行<div class="xg1">改成<div class="xg1" style="white-space: nowrap;">2019.07.313、取消图片弹出下载附件文件路径 /template/default/forum/discuzcode.htm258 行<img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} style="cursor:pointer" id="aimg_$attach[aid]" aid="$attach[aid]" src="{STATICURL}image/common/none.gif" onclick="zoom(this, this.getAttribute('zoomfile'), 0, 0, '{$_G[setting][showexif]}')" zoomfile="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes¬humb=yes{else}{$attach[url]}$attach[attachment]{/if}" file="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode{else}{$attach[url]}$attachthumb{/if}" inpost="1"{if $_GET['from'] != 'preview'} onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"{/if} />改成<img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} style="cursor:pointer" id="aimg_$attach[aid]" aid="$attach[aid]" src="{STATICURL}image/common/none.gif" onclick="zoom(this, this.getAttribute('zoomfile'), 0, 0, '{$_G[setting][showexif]}')" zoomfile="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes¬humb=yes{else}{$attach[url]}$attach[attachment]{/if}" file="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode{else}{$attach[url]}$attachthumb{/if}" inpost="1"{if $_GET['from'] != 'preview'} {if $firstpost && $_G['fid'] && $_G['forum']['picstyle'] && ($_G['forum']['ismoderator'] || $_G['uid'] == $attach['uid'])}onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"{/if}{/if} />260 行<img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} id="aimg_$attach[aid]" aid="$attach[aid]" src="{STATICURL}image/common/none.gif" zoomfile="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes¬humb=yes{else}{$attach[url]}$attach[attachment]{/if}" file="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes{else}{$attach[url]}$attach[attachment]{/if}" $widthcode id="aimg_$attach[aid]" inpost="1"{if $_GET['from'] != 'preview'} onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"{/if} />改成<img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} id="aimg_$attach[aid]" aid="$attach[aid]" src="{STATICURL}image/common/none.gif" zoomfile="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes¬humb=yes{else}{$attach[url]}$attach[attachment]{/if}" file="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes{else}{$attach[url]}$attach[attachment]{/if}" $widthcode id="aimg_$attach[aid]" inpost="1"{if $_GET['from'] != 'preview'} {if $firstpost && $_G['fid'] && $_G['forum']['picstyle'] && ($_G['forum']['ismoderator'] || $_G['uid'] == $attach['uid'])}onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"{/if}{/if} />注释掉 267 行<!-- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode¬humb=yes" target="_blank">{lang download}</a> -->2019.07.312、限制发帖标题字数文件路径 /static/js/forum_post.jsif(($('postsubmit').name != 'replysubmit' && !($('postsubmit').name == 'editsubmit' && !isfirstpost) && theform.subject.value == "") || !sortid && !special && trim(message) == "") { showError('抱歉,您尚未输入标题或内容'); return false; } else if(mb_strlen(theform.subject.value) > 80) { showError('您的标题超过 80 个字符的限制'); return false; }下面插入else if(mb_strlen(theform.subject.value) < 20 && mb_strlen(theform.subject.value) > 0) { showError('您的标题不足 20 个字符的限制'); return false; }2019.07.301、去除标题 Powered by Discuz!文件路径 /template/default/common/header_common.htm<title><!--{if !empty($navtitle)}-->$navtitle - <!--{/if}--><!--{if empty($nobbname)}--> $_G['setting']['bbname'] - <!--{/if}--> Powered by Discuz!</title>改为<title><!--{if !empty($navtitle)}-->$navtitle - <!--{/if}--><!--{if empty($nobbname)}--> $_G['setting']['bbname']<!--{/if}--></title>2019.07.16 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 如果觉得我的文章对你有用,请随意赞赏 文章引用 反向引用 Loading... 暂未引用其他文章 暂未被其它文章引用 下一篇 上一篇 发表评论 取消回复 使用cookie技术保留您的个人信息以便您下次快速评论,继续评论表示您已同意该条款 评论 * 私密评论 名称 * 🎲 邮箱 * 地址 发表评论 提交中...