f
discuz:删除快速回复中的附件上传按钮
discuz:删除快速回复中的附件上传按钮
二呆 6年前 (2018-09-17) discuz教程  #discuz教程# 
浏览:4982

百度来的教程,记录一下,以备以后有需要删除discuz论坛中快速回复中的附件上传按钮的不时之需。

由于使用了DBank的论坛附件程序,所以想去掉系统自带的附件上传程序,后台不能设置,研究了下,找到一下方法:

1. template\default\forum\editor_menu_forum.htm删除以下代码

  1. switchAttachbutton('<!--{if $_G['setting']['swfupload'] != 0}-->swfupload<!--{else}-->upload<!--{/if}-->');

或者如下屏蔽

  1. /*
  2. switchAttachbutton('<!--{if $_G['setting']['swfupload'] != 0}-->swfupload<!--{else}-->upload<!--{/if}-->');
  3. */

2. template\default\forum\editor_menu_forum.htm删除以下代码

  1. <li class="current" id="{$editorid}_btn_attachlist"><a href="javascript:;" hidefocus="true" onclick="switchAttachbutton('attachlist');">{lang attachment_list}</a></li>
  2.             <!--{if $_G['setting']['swfupload'] != 1 && $allowuploadtoday}--><li id="{$editorid}_btn_upload"><a href="javascript:;" hidefocus="true" onclick="switchAttachbutton('upload');">{lang common_upload}</a></li><!--{/if}-->
  3.             <!--{if $_G['setting']['swfupload'] != 0 && $allowuploadtoday}--><li id="{$editorid}_btn_swfupload"><a href="javascript:;" hidefocus="true" onclick="switchAttachbutton('swfupload');">{lang batch_upload}</a></li><!--{/if}-->

后者在这三个<li>标签加 style="display:none" 进行隐藏

好像可以了, 仔细看不对, 快速发帖和回复还是可以上传的

3. template\default\forum\viewthread_fastpost.htm和forumdisplay_fastpost.htm中

  1. <!--{eval $seditor = array('fastpost', array('bold', 'color', 'img', 'link', 'quote', 'code', 'smilies'), !$_G['uid'] ? 1 : 0, $allowpostattach ? '<span class="pipe z">|</span><span onclick="fastUload()" class="cur1 z">{lang e_attach_title}</span>' : ”);}-->

修改为

  1. <!--{eval $seditor = array('fastpost', array('bold', 'color', 'img', 'link', 'quote', 'code', 'smilies'), !$_G['uid'] ? 1 : 0, ”);}-->

备注:viewthread_fastpost.htm是帖子列表页面模板,forumdisplay_fastpost.htm是帖子内容页面模板。

推荐阅读
  • 引言:此文由子域名转移而来,因为细微强迫症和放弃子域名而不舍得完全丢弃,所以将会逐步第二次转移文章到主域名上来,二者主题(阿里白秀和D8)均来自大前端,追求完美的同时有一丝小懒,主题就不换了,D8主题用起来挺好。discuz论坛北京康盛新创科技有限责任公司的产品,现已被腾讯收购...

o p
Ú
>