discuz:删除快速回复中的附件上传按钮

百度来的教程,记录一下,以备以后有需要删除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是帖子内容页面模板。

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注