document.writeln('');
廢話少說,如題,效果圖如下(版本4.04):
改代碼有風險,修改需謹慎,如果不懂,勿輕易修改!建議修改前備份代碼!!!

操作步驟:
1. 修改/admin/view/htm/plugin_list.htm,在90行后新增下面的代碼
1 | <?php if(!$plugin[installed]) { ?><a role="button" class="btn btn-danger btn-sm delete confirm" data-confirm-text="<?php echo lang(plugin_delete_confirm_tips, array(name=>$plugin[name]));?>" href="<?php echo url("plugin-delete-$dir"); ?>"><?php echo lang(delete);?></a><?php } ?> |
2. 修改/lang/zh-cn/bbs_admin.php,在數組最后面新增下面的代碼(這里只修改了簡體語言,如果其他語言,參考這個在對應文件里修改)
1 2 3 | plugin_delete_confirm_tips=>刪除后可以在插件列表重新下載,確定刪除 ( {name} ) 嗎?,plugin_delete_sucessfully=>刪除插件 ( {name} ) 成功,plugin_delete_failed=>插件 ( {name} ) 刪除失敗, |
3. 修改bbs/plugin/show_all_plugins/overwrite/admin/route/plugin.php,在315行后增加下面的代碼
1 2 3 4 5 6 7 8 9 10 11 12 13 | } elseif($action == delete) { plugin_lock_start(); $dir = param_word(2); plugin_check_exists($dir); $name = $plugins[$dir][name]; if(!rmdir_recusive(../plugin/ . $dir, 0)){ plugin_lock_end(); $msg = lang(plugin_delete_failed, array(name=>$name)); message(0, jump($msg, http_referer(), 3)); } plugin_lock_end(); $msg = lang(plugin_delete_sucessfully, array(name=>$name)); message(0, jump($msg, http_referer(), 3)); |
4. 后臺管理=>其他=>清除緩存 刷新插件列表,按鈕就出來了
5. 改代碼有風險,修改需謹慎,如果不懂,勿輕易修改!建議修改前備份代碼!