http://phpbb-tw.net/phpbb/viewtopic.php?t=20691
適用管理員不只一個的時候;害人之心不可有,防人之心不可無
※ Part 1
打開 admin/admin_users.php
找到這段 代碼:
代碼: 選擇全部
//
// Now parse and display it as a template
//
代碼: 選擇全部
if ($this_userdata['user_level'] != ADMIN)
{
$template->assign_block_vars('switch_show_delete', array());
}
打開 templates/風格夾/admin/user_edit_body.tpl
找到這段 代碼:
代碼: 選擇全部
<tr>
<td class="row1"><span class="gen">{L_DELETE_USER}?</span></td>
<td class="row2">
<input type="checkbox" name="deleteuser">
{L_DELETE_USER_EXPLAIN}</td>
</tr>
在前面加入 代碼:
代碼: 選擇全部
<!-- BEGIN switch_show_delete -->
代碼: 選擇全部
<!-- END switch_show_delete -->
※ Part 2
如果你有裝Junior-admin,並且也想保護JRA的話,admin/admin_users.php
的修改如下,其餘同Part 1:
找到這段 代碼:
代碼: 選擇全部
//
// Now parse and display it as a template
//
代碼: 選擇全部
include_once($phpbb_root_path . 'includes/functions_jr_admin.' . $phpEx);
$jr_admin_userdata = jr_admin_get_user_info($this_userdata['user_id']);
if ($this_userdata['user_level'] != ADMIN && empty($jr_admin_userdata['user_jr_admin']))
{
$template->assign_block_vars('switch_show_delete', array());
}
如果你有裝admin add users 的話,只要修改admin/admin_users.php
找到這段 代碼:
代碼: 選擇全部
if ($new_user)
{
$this_userdata['username'] = $HTTP_POST_VARS['username'];
$this_userdata['user_email'] = '';
$this_userdata['user_passwd_change'] = 0;
}
else
{
$template->assign_block_vars('switch_show_delete', array());
}
代碼: 選擇全部
if ($new_user)
{
$this_userdata['username'] = $HTTP_POST_VARS['username'];
$this_userdata['user_email'] = '';
$this_userdata['user_passwd_change'] = 0;
}
elseif ($this_userdata['user_level'] != ADMIN)
{
$template->assign_block_vars('switch_show_delete', array());
}
如果你有裝admin add users 和 Junior Admin 的話,只要修改admin/admin_users.php
找到這段 代碼:
代碼: 選擇全部
if ($new_user)
{
$this_userdata['username'] = $HTTP_POST_VARS['username'];
$this_userdata['user_email'] = '';
$this_userdata['user_passwd_change'] = 0;
}
else
{
$template->assign_block_vars('switch_show_delete', array());
}
代碼: 選擇全部
include_once($phpbb_root_path . 'includes/functions_jr_admin.' . $phpEx);
$jr_admin_userdata = jr_admin_get_user_info($this_userdata['user_id']);
if ($new_user)
{
$this_userdata['username'] = $HTTP_POST_VARS['username'];
$this_userdata['user_email'] = '';
$this_userdata['user_passwd_change'] = 0;
}
elseif ($this_userdata['user_level'] != ADMIN && empty($jr_admin_userdata['user_jr_admin']))
{
$template->assign_block_vars('switch_show_delete', array());
}