操作步骤:
1. 修改/admin/view/htm/plugin_list.htm,在90行后新增下面的代码
<?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,在数组最后面新增下面的代码(这里只修改了简体语言,如果其他语言,参考这个在对应文件里修改)
'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行后增加下面的代码
}
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. 改代码有风险,修改需谨慎,如果不懂,勿轻易修改!建议修改前备份代码!