discuz 删除系统自带的附件上传

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

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

switchAttachbutton('<!--{if $_G['setting']['swfupload'] != 0}-->swfupload<!--{else}-->upload<!--{/if}-->');
或者如下屏蔽
/*
switchAttachbutton('<!--{if $_G['setting']['swfupload'] != 0}-->swfupload<!--{else}-->upload<!--{/if}-->');
*/

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

<li class="current" id="{$editorid}_btn_attachlist"><a href="javascript:;" hidefocus="true" onclick="switchAttachbutton('attachlist');">{lang attachment_list}</a></li>

<!--{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}-->

<!--{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中

<!--{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>' : '');}-->

修改为 

<!--{eval $seditor = array('fastpost', array('bold', 'color', 'img', 'link', 'quote', 'code', 'smilies'), !$_G['uid'] ? 1 : 0, '');}-->
posted @ 2011-12-06 18:17  likebeta  阅读(1082)  评论(0编辑  收藏  举报