discuz:删除快速回复中的附件上传按钮
二呆 发布 | 5个月前 (09-17) | 阅读数:747 | 评论数:0 | 来源:同乐儿
百度来的教程,记录一下,以备以后有需要删除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, ”);}–>
备注:viewthread_fastpost.htm是帖子列表页面模板,forumdisplay_fastpost.htm是帖子内容页面模板。
» 转载请注明来源:同乐儿 » 《discuz:删除快速回复中的附件上传按钮》
继续浏览有关 discuz教程 的文章