พัฒนาโดย : KillBill.
Version : 1.0.2
ดาวน์โหลดได้ที่ : https://www.mindphp.com/download/files/1 ... n-zip.html
ไฟล์ที่ใช้ในการติดตั้ง
>>includes/ucp/info/ucp_profile.php,
>>includes/ucp/ucp_profile.php,
>>language/en/acp/common.php,
>>language/en/acp/permissions_phpbb.php,
>>language/en/ucp.php
วิธีติดตั้ง
เปิดไฟล์ : includes/ucp/info/ucp_profile.php
ค้นหา
โค้ด: เลือกทั้งหมด
'reg_details' => array('title' => 'UCP_PROFILE_REG_DETAILS', 'auth' => '', 'cat' => array('UCP_PROFILE')),
โค้ด: เลือกทั้งหมด
// Start delete my registration
'my_acc_delete' => array('title' => 'UCP_PROFILE_MY_ACC_DELETE', 'auth' => '', 'cat' => array('UCP_PROFILE')),
// End delete my registration
ค้นหา
โค้ด: เลือกทั้งหมด
case 'profile_info':
โค้ด: เลือกทั้งหมด
// Start delete my registration
case 'my_acc_delete':
$delete_acc = (!empty($_POST['delete_acc'])) ? true : false;
$delete_post = (!empty($_POST['delete_post']) && $auth->acl_get('u_my_acc_post_delete')) ? true : false;
$user_password = request_var('user_password', '', true);
add_form_key('my_acc_delete');
if ($submit)
{
if (!check_form_key('my_acc_delete'))
{
$error[] = 'FORM_INVALID';
}
if (!$delete_acc)
{
$error[] = 'MY_ACC_DELETE_CONFIRM_ERROR';
}
if ($user->data['user_type'] == USER_FOUNDER)
{
$error[] = 'MY_ACC_DELETE_FOUNDER_ERROR';
}
if (!phpbb_check_hash($user_password, $user->data['user_password']))
{
$error[] = 'CUR_PASSWORD_ERROR';
}
if (!sizeof($error) && $submit)
{
$delete_type = ($delete_post) ? 'remove' : 'retain';
$log_type = ($delete_post) ? 'LOG_MY_ACC_POST_DELETE' : 'LOG_MY_ACC_DELETE';
add_log('user', ANONYMOUS, $log_type, $user->data['username']);
user_delete($delete_type, $user->data['user_id'], $user->data['username']);
meta_refresh(5, append_sid($phpbb_root_path . 'index.' . $phpEx));
trigger_error('MY_ACC_DELETE_SUCCESS');
}
$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
}
$template->assign_vars(array(
'S_ERROR' => (sizeof($error)) ? true : false,
'S_DELETE_MY_POST' => ($auth->acl_get('u_my_acc_post_delete')) ? true : false,
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'CONFIRM_CHECKED' => ($delete_acc) ? ' checked="checked"' : '',
'POST_CHECKED' => ($delete_post) ? ' checked="checked"' : ''
));
break;
// End delete my registration
ค้นหา
โค้ด: เลือกทั้งหมด
?>
โค้ด: เลือกทั้งหมด
// Start delete my registration
$lang = array_merge($lang, array(
'LOG_MY_ACC_DELETE' => '<strong>Delete my registration</strong><br />» %s',
'LOG_MY_ACC_POST_DELETE' => '<strong>Delete my registration along with the posts.</strong><br />» %s',
));
// End delete my registration
ค้นหา
โค้ด: เลือกทั้งหมด
'acl_u_chggrp' => array('lang' => 'Can change default usergroup', 'cat' => 'profile'),
โค้ด: เลือกทั้งหมด
// Start delete my registration
'acl_u_my_acc_post_delete'=> array('lang' => 'Can delete posts when deleting registration', 'cat' => 'profile'),
// End delete my registration
ค้นหา
โค้ด: เลือกทั้งหมด
?>
โค้ด: เลือกทั้งหมด
// Start delete my registration
$lang = array_merge($lang, array(
'MY_ACC_DELETE_CONFIRM' => 'Delete my registration confirmation',
'MY_ACC_DELETE_CONFIRM_ERROR' => 'Deletion of registration has not been confirmed!',
'MY_ACC_DELETE_EXPLAIN' => 'Delete my registration<br /><em>Please note, if you do then there is no way to restore your data!</em>',
'MY_ACC_DELETE_FOUNDER_ERROR' => 'Board founders can not delete their registration!',
'MY_ACC_DELETE_SUCCESS' => 'Registration is successfully deleted',
'MY_ACC_POST_DELETE' => 'Post delete',
'MY_ACC_POST_DELETE_EXPLAIN' => 'your posts will be deleted on the board',
'UCP_PROFILE_MY_ACC_DELETE' => 'Delete my registration',
));
// End delete my registration
และทำการรันในหน้า install/index.php เพื่อทำการ install