|
25.02.2005, 05:04
Устанавливаемформу Форму Быстрого ответа для форума phpBB 2.0.12 встроенного в phpNuke.
Приступимс
Скачайте фаил, распакуйте и скопируйте файлы в:
viewtopic_quickreply.php --> includes/viewtopic_quickreply.php
viewtopic_quickreply.tpl --> themes/DeepBlue/forums/viewtopic_quickreply.tpl
Откройте modules/Forums/admin/admin_board.php
Найдите:
PHP код:
$avatars_local_yes = ( $new['allow_avatar_local'] ) ? "checked=\"checked\"" : "";
Перед этим добавьте:
PHP код:
$quickreply_yes = ( $new['allow_quickreply'] ) ? "checked=\"checked\"" : "";$quickreply_no = ( !$new['allow_quickreply'] ) ? "checked=\"checked\"" : "";
Найдите:
PHP код:
"L_ALLOW_NAME_CHANGE" => $lang['Allow_name_change'],
После добавьте:
PHP код:
"L_ALLOW_QUICK_REPLY" => $lang['Allow_quick_reply'],
Найдите:
PHP код:
"NAMECHANGE_NO" => $namechange_no,
После добавьте:
PHP код:
"QUICKREPLY_YES" => $quickreply_yes, "QUICKREPLY_NO" => $quickreply_no,
Откройте modules/Forums/admin/admin_users.php
Найдите:
PHP код:
$user_dateformat = ( $HTTP_POST_VARS['dateformat'] ) ? trim( $HTTP_POST_VARS['dateformat'] ) : $board_config['default_dateformat'];
После добавьте:
PHP код:
$user_show_quickreply = ( isset( $HTTP_POST_VARS['show_quickreply'] ) ) ? intval( $HTTP_POST_VARS['show_quickreply'] ) : 1; $user_quickreply_mode = ( isset( $HTTP_POST_VARS['quickreply_mode'] ) ) ? ( ( $HTTP_POST_VARS['quickreply_mode'] ) ? TRUE : 0 ) : TRUE;
Найдите:
PHP код:
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank" . $avatar_sql . "
В этой строке найдите:
PHP код:
user_active = $user_status,
Добавьте перед ней:
PHP код:
user_show_quickreply = $user_show_quickreply, user_quickreply_mode = $user_quickreply_mode,
Найдите:
PHP код:
$user_dateformat = htmlspecialchars($this_userdata['user_dateformat']);
После добавьте:
PHP код:
$user_show_quickreply = $userdata['user_show_quickreply']; $user_quickreply_mode = $userdata['user_quickreply_mode'];
Найдите:
PHP код:
$s_hidden_fields .= '<input type="hidden" name="dateformat" value="' . str_replace("\"", """, $user_dateformat) . '" />';
После добавьте:
PHP код:
$s_hidden_fields .= '<input type="hidden" name="show_quickreply" value="' . $user_show_quickreply . '" />'; $s_hidden_fields .= '<input type="hidden" name="quickreply_mode" value="' . $user_quickreply_mode . '" />';
Найдите:
PHP код:
'DATE_FORMAT' => $user_dateformat,
После добавьте:
PHP код:
'QUICK_REPLY_SELECT' => quick_reply_select($user_show_quickreply, 'show_quickreply'), 'QUICK_REPLY_MODE_BASIC' => ( $user_quickreply_mode==0 ) ? 'checked="checked"' : '', 'QUICK_REPLY_MODE_ADVANCED' => ( $user_quickreply_mode!=0 ) ? 'checked="checked"' : '',
Найдите:
PHP код:
'L_DATE_FORMAT_EXPLAIN' => $lang['Date_format_explain'],
После добавьте:
PHP код:
'L_QUICK_REPLY_PANEL' => $lang['Quick_reply_panel'], 'L_SHOW_QUICK_REPLY' => $lang['Show_quick_reply'], 'L_QUICK_REPLY_MODE' => $lang['Quick_reply_mode'], 'L_QUICK_REPLY_MODE_BASIC' => $lang['Quick_reply_mode_basic'], 'L_QUICK_REPLY_MODE_ADVANCED' => $lang['Quick_reply_mode_advanced'],
Откройте includes/functions_selects.php
Найдите:
Перед этим всавьте:
PHP код:
function quick_reply_select($default, $select_name = "show_quickreply") { global $lang; $sqr_select = '<select name="' . $select_name . '">'; while( list($value, $mode) = @each($lang['sqr']) ) { $selected = ( $value == $default ) ? ' selected="selected"' : ''; $sqr_select .= '<option value="' . $value . '"' . $selected . '>' . $mode . '</option>'; } $sqr_select .= '</select>'; return $sqr_select; }
Откройте includes/usercp_register.php
Найдите:
PHP код:
$user_dateformat = ( !empty($HTTP_POST_VARS['dateformat']) ) ? trim(htmlspecialchars($HTTP_POST_VARS['dateformat'])) : $board_config['default_dateformat'];
Ниже добавьте:
PHP код:
$user_show_quickreply = ( isset( $HTTP_POST_VARS['show_quickreply'] ) ) ? intval( $HTTP_POST_VARS['show_quickreply'] ) : 1; $user_quickreply_mode = ( isset( $HTTP_POST_VARS['quickreply_mode'] ) ) ? ( ( $HTTP_POST_VARS['quickreply_mode'] ) ? TRUE : 0 ) : TRUE;
Найдите:
PHP код:
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popup_pm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "
В этой строке найдите:
PHP код:
user_lang = '" . str_replace("\'", "''", $user_lang)
Перед этим добавьте:
PHP код:
user_show_quickreply = $user_show_quickreply, user_quickreply_mode = $user_quickreply_mode,
Найдите:
PHP код:
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
В этой строке найдите:
Перед этим добавьте:
PHP код:
user_show_quickreply, user_quickreply_mode,
|
|