|
04.11.2005, 17:33
Открываем includes/usercp_register.php
Находим (76):
Ниже добавляем:
Находим (157):
PHP код:
$attachsig = ( isset($HTTP_POST_VARS['attachsig']) ) ? ( (intval($HTTP_POST_VARS['attachsig'])) ? TRUE : 0 ) : 0;
Заменяем на:
PHP код:
$attachsig = ( isset($HTTP_POST_VARS['attachsig']) ) ? ( (intval($HTTP_POST_VARS['attachsig'])) ? TRUE : 0 ) : $userdata['user_attachsig'];
Находим (195):
PHP код:
$user_avatar_local = ( isset($HTTP_POST_VARS['avatarselect']) && !empty($HTTP_POST_VARS['submitavatar']) && $board_config['allow_avatar_local'] ) ? htmlspecialchars($HTTP_POST_VARS['avatarselect']) : ( ( isset($HTTP_POST_VARS['avatarlocal']) ) ? htmlspecialchars($HTTP_POST_VARS['avatarlocal']) : '' );
Ниже добавляем:
PHP код:
$user_avatar_category = ( isset($HTTP_POST_VARS['avatarcatname']) && $board_config['allow_avatar_local'] ) ? htmlspecialchars($HTTP_POST_VARS['avatarcatname']) : '' ;
Находим (204):
PHP код:
$user_avatar = ( empty($user_avatar_loc) && $mode == 'editprofile' ) ? $userdata['user_avatar'] : ''; $user_avatar_type = ( empty($user_avatar_loc) && $mode == 'editprofile' ) ? $userdata['user_avatar_type'] : '';
Заменяем на:
PHP код:
$user_avatar = ( empty($user_avatar_local) && $mode == 'editprofile' ) ? $userdata['user_avatar'] : ''; $user_avatar_type = ( empty($user_avatar_local) && $mode == 'editprofile' ) ? $userdata['user_avatar_type'] : '';
Находим (224):
PHP код:
$signature = stripslashes($signature); $user_lang = stripslashes($user_lang); $user_dateformat = stripslashes($user_dateformat); if ( !isset($HTTP_POST_VARS['cancelavatar'])) { $user_avatar = $user_avatar_local; $user_avatar_type = USER_AVATAR_GALLERY; }
Заменяем на:
PHP код:
$signature = htmlspecialchars(stripslashes($signature)); $user_lang = stripslashes($user_lang); $user_dateformat = stripslashes($user_dateformat); if ( !isset($HTTP_POST_VARS['cancelavatar'])) { $user_avatar = $user_avatar_category . '/' . $user_avatar_local; $user_avatar_type = USER_AVATAR_GALLERY; }
Находим (441):
PHP код:
if ( $signature_bbcode_uid == '' )
Заменяешь на:
PHP код:
if ( !isset($signature_bbcode_uid) || $signature_bbcode_uid == '' )
Находим (478):
PHP код:
if ( @file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'])) && $userdata['user_avatar_type'] == USER_AVATAR_UPLOAD ) { @unlink(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'])); }
Заменяем на:
PHP код:
user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']);
Находим (483):
PHP код:
if ( @file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'])) && $userdata['user_avatar_type'] == USER_AVATAR_UPLOAD ) { @unlink(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'])); }
Заменяем на:
PHP код:
user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']);
[/PHP]
Находим (536):
PHP код:
$emailer->from($board_config['board_email']); $emailer->replyto($board_config['board_email']); $emailer->use_template('user_activate', stripslashes($user_lang)); $emailer->email_address($email); $emailer->set_subject($lang['Reactivate']); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)), 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '', 'U_ACTIVATE' => $server_url . '&mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey) ); $emailer->send(); $emailer->reset();
Заменяем на:
PHP код:
if ( $board_config['require_activation'] != USER_ACTIVATION_ADMIN ) { $emailer->from($board_config['board_email']); $emailer->replyto($board_config['board_email']); $emailer->use_template('user_activate', stripslashes($user_lang)); $emailer->email_address($email); $emailer->set_subject($lang['Reactivate']); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)), 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '', 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey) ); $emailer->send(); $emailer->reset(); } else if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN ) { $sql = 'SELECT user_email, user_lang FROM ' . USERS_TABLE . ' WHERE user_level = ' . ADMIN; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not select Administrators', '', __LINE__, __FILE__, $sql); } while ($row = $db->sql_fetchrow($result)) { $emailer->from($board_config['board_email']); $emailer->replyto($board_config['board_email']); $emailer->email_address(trim($row['user_email'])); $emailer->use_template("admin_activate", $row['user_lang']); $emailer->set_subject($lang['Reactivate']); $emailer->assign_vars(array( 'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)), 'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']), 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey) ); $emailer->send(); $emailer->reset(); } $db->sql_freeresult($result); }
Находим (874):
PHP код:
display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, &$new_password, &$cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popup_pm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']);
Заменяем на:
PHP код:
display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, $new_password, $cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popup_pm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']);
Находим (885):
PHP код:
if ( !isset($user_template) ) { $selected_template = $board_config['system_template']; }
Заменяем на:
PHP код:
if ( !isset($user_style) ) { $user_style = $board_config['default_style']; }
Находим (920):
PHP код:
$s_hidden_fields .= '<input type="hidden" name="avatarlocal" value="' . $user_avatar_local . '" />';
Заменяем на:
PHP код:
$s_hidden_fields .= '<input type="hidden" name="avatarlocal" value="' . $user_avatar_local . '" /><input type="hidden" name="avatarcatname" value="' . $user_avatar_category . '" />';
|
|