diff --git a/other/converter/TBDevYSE_pre6/for_tbdev/pass.php b/other/converter/TBDevYSE_pre6/for_tbdev/pass.php index 2c387e46c..67c6ffed3 100644 --- a/other/converter/TBDevYSE_pre6/for_tbdev/pass.php +++ b/other/converter/TBDevYSE_pre6/for_tbdev/pass.php @@ -6,7 +6,7 @@ dbconn(); loggedinorreturn(); -$new_tr_url = "http://pushchino.tv/forum/"; // with ending slash +$new_tr_url = "http://torrentpier.me/"; // with ending slash $subject = "Переезд на новый движок"; $msg = '[b]Внимание![/b] Наш трекер переехал на новый движок! Адрес трекера - [url='.$new_tr_url.']'.$new_tr_url.'[/url] Вся база перенесена на новый движок, регистрироваться заново не надо. diff --git a/upload/admin/pagestart.php b/upload/admin/pagestart.php index 8d97483ee..8f4f04180 100644 --- a/upload/admin/pagestart.php +++ b/upload/admin/pagestart.php @@ -13,7 +13,7 @@ $user->session_start(); if (IS_GUEST) { - redirect("login.php?redirect=admin/index.php"); + redirect(LOGIN_URL . "?redirect=admin/index.php"); } if (!IS_ADMIN) diff --git a/upload/ajax/posts.php b/upload/ajax/posts.php index 449d358ce..34a227495 100644 --- a/upload/ajax/posts.php +++ b/upload/ajax/posts.php @@ -95,7 +95,7 @@ switch($this->request['type']) } if (mb_strlen($message, 'UTF-8') > 1000) { - $this->response['redirect'] = make_url('posting.php?mode=quote&p='. $post_id); + $this->response['redirect'] = make_url(POSTING_URL.'?mode=quote&p='. $post_id); } $this->response['quote'] = true; @@ -119,7 +119,7 @@ switch($this->request['type']) } if ((mb_strlen($post['post_text'], 'UTF-8') > 1000) || $post['post_attachment'] || ($post['topic_first_post_id'] == $post_id)) { - $this->response['redirect'] = make_url('posting.php?mode=editpost&p='. $post_id); + $this->response['redirect'] = make_url(POSTING_URL.'?mode=editpost&p='. $post_id); } elseif ($this->request['type'] == 'editor') { @@ -173,7 +173,7 @@ switch($this->request['type']) $hidden_form .= ''; $this->response['text'] = ' -
+ '. $hidden_form .'
diff --git a/upload/config.php b/upload/config.php index d9e0602da..d0ec02912 100644 --- a/upload/config.php +++ b/upload/config.php @@ -56,7 +56,7 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do // Increase number of revision after update $bb_cfg['tp_version'] = '2.5 (unstable)'; $bb_cfg['tp_release_date'] = '23-01-2014'; -$bb_cfg['tp_release_state'] = 'R565'; +$bb_cfg['tp_release_state'] = 'R566'; // Database $charset = 'utf8'; @@ -222,6 +222,12 @@ define('LOG_DIR', BB_PATH .'/log/' ); define('TEMPLATES_DIR', BB_PATH .'/templates/'); define('TRIGGERS_DIR', BB_PATH .'/triggers/' ); +// URLs +$bb_cfg['ajax_url'] = 'ajax.php'; # "http://{$_SERVER['SERVER_NAME']}/ajax.php" +$bb_cfg['login_url'] = 'login.php'; # "http://{$domain_name}/login.php" +$bb_cfg['pm_url'] = 'privmsg.php'; # "http://{$domain_name}/privmsg.php" +$bb_cfg['posting_url'] = 'posting.php'; # "http://{$domain_name}/posting.php" + // Language setlocale(LC_ALL, 'ru_RU.UTF-8'); setlocale(LC_NUMERIC, 'C'); diff --git a/upload/dl_list.php b/upload/dl_list.php index cf9c3619c..8062c8736 100644 --- a/upload/dl_list.php +++ b/upload/dl_list.php @@ -60,7 +60,7 @@ $user->session_start(); // Check if user logged in if (!$userdata['session_logged_in']) { - redirect("login.php?redirect=$redirect_type&$redirect"); + redirect(LOGIN_URL . "?redirect=$redirect_type&$redirect"); } if ($bb_cfg['bt_min_ratio_dl_button'] && $btu = get_bt_userdata($user->id)) diff --git a/upload/groupcp.php b/upload/groupcp.php index ed6a55fb9..8eacbd238 100644 --- a/upload/groupcp.php +++ b/upload/groupcp.php @@ -19,7 +19,7 @@ function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$ $joined = bb_date($row['user_regdate']); $user_time = ( !empty($row['user_time']) ) ? bb_date($row['user_time']) : $lang['NONE']; $posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0; - $pm = ($bb_cfg['text_buttons']) ? ''. $lang['SEND_PM_TXTB'] .'' : '' . $lang['SEND_PRIVATE_MESSAGE'] . ''; + $pm = ($bb_cfg['text_buttons']) ? ''. $lang['SEND_PM_TXTB'] .'' : '' . $lang['SEND_PRIVATE_MESSAGE'] . ''; if (bf($row['user_opt'], 'user_opt', 'viewemail') || $group_mod) { diff --git a/upload/includes/functions.php b/upload/includes/functions.php index df5aa8f67..263380d79 100644 --- a/upload/includes/functions.php +++ b/upload/includes/functions.php @@ -1974,7 +1974,7 @@ function phpbb_realpath($path) function login_redirect ($url = '') { - redirect('login.php?redirect='. (($url) ? $url : $_SERVER['REQUEST_URI'])); + redirect(LOGIN_URL . '?redirect='. (($url) ? $url : $_SERVER['REQUEST_URI'])); } function meta_refresh($url, $time = 5) diff --git a/upload/includes/init_bb.php b/upload/includes/init_bb.php index c0adabd3f..595ede8ee 100644 --- a/upload/includes/init_bb.php +++ b/upload/includes/init_bb.php @@ -401,10 +401,11 @@ define('CAT_URL', "index.php?" .'c='); define('DOWNLOAD_URL', "download.php?" .'id='); define('FORUM_URL', "viewforum.php?" .'f='); define('GROUP_URL', "groupcp.php?" .'g='); -define('LOGIN_URL', "login.php?" .'redirect='); +define('LOGIN_URL', $bb_cfg['login_url']); define('MODCP_URL', "modcp.php?" .'f='); -define('PM_URL', "privmsg.php?" .'mode=post&u='); +define('PM_URL', $bb_cfg['pm_url']); define('POST_URL', "viewtopic.php?" .'p='); +define('POSTING_URL', $bb_cfg['posting_url']); define('PROFILE_URL', "profile.php?" .'mode=viewprofile&u='); define('BONUS_URL', "profile.php?" .'mode=bonus'); define('TOPIC_URL', "viewtopic.php?" .'t='); diff --git a/upload/includes/page_header.php b/upload/includes/page_header.php index 8a9e69bc9..145b9af9e 100644 --- a/upload/includes/page_header.php +++ b/upload/includes/page_header.php @@ -14,11 +14,11 @@ $is_mod = ($logged_in && IS_MOD); // Generate logged in/logged out status if ($logged_in) { - $u_login_logout = BB_ROOT ."login.php?logout=1"; + $u_login_logout = BB_ROOT . LOGIN_URL . "?logout=1"; } else { - $u_login_logout = BB_ROOT ."login.php"; + $u_login_logout = BB_ROOT . LOGIN_URL; } // Online userlist @@ -224,7 +224,7 @@ $template->assign_vars(array( 'THIS_AVATAR' => get_avatar($userdata['user_avatar'], $userdata['user_avatar_type'], !bf($userdata['user_opt'], 'user_opt', 'allow_avatar')), 'SHOW_LOGIN_LINK' => !defined('IN_LOGIN'), 'AUTOLOGIN_DISABLED' => !$bb_cfg['allow_autologin'], - 'S_LOGIN_ACTION' => BB_ROOT ."login.php", + 'S_LOGIN_ACTION' => BB_ROOT . LOGIN_URL, 'U_CUR_DOWNLOADS' => PROFILE_URL . $userdata['user_id'], 'U_FAQ' => $bb_cfg['faq_url'], @@ -234,9 +234,9 @@ $template->assign_vars(array( 'U_MEMBERLIST' => "memberlist.php", 'U_MODCP' => "modcp.php", 'U_OPTIONS' => "profile.php?mode=editprofile", - 'U_PRIVATEMSGS' => "privmsg.php?folder=inbox", + 'U_PRIVATEMSGS' => PM_URL . "?folder=inbox", 'U_PROFILE' => PROFILE_URL . $userdata['user_id'], - 'U_READ_PM' => "privmsg.php?folder=inbox". (($userdata['user_newest_pm_id'] && $userdata['user_new_privmsg'] == 1) ? "&mode=read&p={$userdata['user_newest_pm_id']}" : ''), + 'U_READ_PM' => PM_URL . "?folder=inbox". (($userdata['user_newest_pm_id'] && $userdata['user_new_privmsg'] == 1) ? "&mode=read&p={$userdata['user_newest_pm_id']}" : ''), 'U_REGISTER' => "profile.php?mode=register", 'U_SEARCH' => "search.php", 'U_SEND_PASSWORD' => "profile.php?mode=sendpassword", @@ -251,8 +251,11 @@ $template->assign_vars(array( 'DOWNLOAD_URL' => BB_ROOT . DOWNLOAD_URL, 'FORUM_URL' => BB_ROOT . FORUM_URL, 'GROUP_URL' => BB_ROOT . GROUP_URL, + 'LOGIN_URL' => $bb_cfg['login_url'], 'NEWEST_URL' => '&view=newest#newest', + 'PM_URL' => $bb_cfg['pm_url'], 'POST_URL' => BB_ROOT . POST_URL, + 'POSTING_URL' => $bb_cfg['posting_url'], 'PROFILE_URL' => BB_ROOT . PROFILE_URL, 'TOPIC_URL' => BB_ROOT . TOPIC_URL, diff --git a/upload/includes/posting_tpl.php b/upload/includes/posting_tpl.php index 8e7edf320..97ef78102 100644 --- a/upload/includes/posting_tpl.php +++ b/upload/includes/posting_tpl.php @@ -20,7 +20,7 @@ if (!$f_data['forum_tpl_id'] OR !$tpl_data = DB()->fetch_row($sql)) { if (!$edit_tpl_mode) { - redirect("posting.php?mode=newtopic&f=$forum_id&tpl=1"); + redirect(POSTING_URL . "?mode=newtopic&f=$forum_id&tpl=1"); } } @@ -28,12 +28,12 @@ $template->assign_vars(array( 'PAGE_TITLE' => 'Новый релиз', 'FORUM_NAME' => $f_data['forum_name'], 'FORUM_ID' => $forum_id, - 'TPL_FORM_ACTION' => "posting.php?mode=newtopic&f=$forum_id", - 'REGULAR_TOPIC_HREF' => "posting.php?mode=newtopic&f=$forum_id", + 'TPL_FORM_ACTION' => POSTING_URL . "?mode=newtopic&f=$forum_id", + 'REGULAR_TOPIC_HREF' => POSTING_URL . "?mode=newtopic&f=$forum_id", 'TOR_REQUIRED' => $f_data['allow_reg_tracker'], 'EDIT_TPL' => $edit_tpl_mode, 'CAN_EDIT_TPL' => $can_edit_tpl, - 'EDIT_TPL_URL' => "posting.php?mode=new_rel&f=$forum_id&edit_tpl=1", + 'EDIT_TPL_URL' => POSTING_URL . "?mode=new_rel&f=$forum_id&edit_tpl=1", )); if ($tpl_data) diff --git a/upload/includes/report_hack/report_privmsg.php b/upload/includes/report_hack/report_privmsg.php index 405c1fb5d..78eca2840 100644 --- a/upload/includes/report_hack/report_privmsg.php +++ b/upload/includes/report_hack/report_privmsg.php @@ -163,7 +163,7 @@ class report_privmsg extends report_module function subject_url($report_subject, $non_html_amp = false) { $sep = ($non_html_amp) ? '&' : '&'; - return 'privmsg.php?mode=read'.$sep . POST_POST_URL . '=' . (int) $report_subject; + return PM_URL . '?mode=read'.$sep . POST_POST_URL . '=' . (int) $report_subject; } // diff --git a/upload/includes/topic_templates.php b/upload/includes/topic_templates.php index f235639e9..2b8e689b8 100644 --- a/upload/includes/topic_templates.php +++ b/upload/includes/topic_templates.php @@ -82,14 +82,14 @@ if ($topic_tpl = DB()->fetch_row($sql)) $template->assign_vars(array( 'PAGE_TITLE' => $lang['NEW_RELEASE'], 'FORUM_NAME' => htmlCHR($post_info['forum_name']), - 'S_ACTION' => "posting.php?mode=newtopic&tpl=1&". POST_FORUM_URL .'='. $post_info['forum_id'], + 'S_ACTION' => POSTING_URL . "?mode=newtopic&tpl=1&". POST_FORUM_URL .'='. $post_info['forum_id'], 'S_CANCEL_ACTION' => FORUM_URL . $post_info['forum_id'], 'TORRENT_EXT' => TORRENT_EXT, 'TORRENT_EXT_LEN' => strlen(TORRENT_EXT) + 1, 'U_VIEW_FORUM' => FORUM_URL . $post_info['forum_id'], 'REGULAR_TOPIC_BUTTON' => true, # (IS_AM), - 'REGULAR_TOPIC_HREF' => "posting.php?mode=newtopic&". POST_FORUM_URL .'='. $post_info['forum_id'], + 'REGULAR_TOPIC_HREF' => POSTING_URL . "?mode=newtopic&". POST_FORUM_URL .'='. $post_info['forum_id'], 'L_TITLE' => $lang['TPL']['RELEASE_NAME'], 'L_TITLE_DESC' => $lang['TPL']['RELEASE_NAME_DESC'], diff --git a/upload/includes/ucp/usercp_activate.php b/upload/includes/ucp/usercp_activate.php index 3389c3da5..c2aaa5138 100644 --- a/upload/includes/ucp/usercp_activate.php +++ b/upload/includes/ucp/usercp_activate.php @@ -27,7 +27,7 @@ if ( $row = DB()->sql_fetchrow($result) ) { if (!$userdata['session_logged_in']) { - redirect('login.php?redirect=profile.php&mode=activate&' . POST_USERS_URL . '=' . $row['user_id'] . '&act_key=' . trim($_GET['act_key'])); + redirect(LOGIN_URL . '?redirect=profile.php&mode=activate&' . POST_USERS_URL . '=' . $row['user_id'] . '&act_key=' . trim($_GET['act_key'])); } else if (!IS_ADMIN) { diff --git a/upload/includes/ucp/usercp_attachcp.php b/upload/includes/ucp/usercp_attachcp.php index 0e9aa9a51..2a7eacbee 100644 --- a/upload/includes/ucp/usercp_attachcp.php +++ b/upload/includes/ucp/usercp_attachcp.php @@ -6,7 +6,7 @@ require(BB_ROOT .'attach_mod/attachment_mod.php'); if (!$userdata['session_logged_in']) { - redirect("login.php?redirect={$_SERVER['REQUEST_URI']}"); + redirect(LOGIN_URL . "?redirect={$_SERVER['REQUEST_URI']}"); } // Page config diff --git a/upload/includes/ucp/usercp_email.php b/upload/includes/ucp/usercp_email.php index 7cdb3c3c7..05ffb6f01 100644 --- a/upload/includes/ucp/usercp_email.php +++ b/upload/includes/ucp/usercp_email.php @@ -19,7 +19,7 @@ else if ( !$userdata['session_logged_in'] ) { - redirect("login.php?redirect=profile.php&mode=email&" . POST_USERS_URL . "=$user_id"); + redirect(LOGIN_URL . "?redirect=profile.php&mode=email&" . POST_USERS_URL . "=$user_id"); } $sql = "SELECT username, user_email, user_lang FROM " . BB_USERS . " WHERE user_id = $user_id"; diff --git a/upload/includes/ucp/usercp_register.php b/upload/includes/ucp/usercp_register.php index 73ab707c9..c6fe1567c 100644 --- a/upload/includes/ucp/usercp_register.php +++ b/upload/includes/ucp/usercp_register.php @@ -1004,7 +1004,7 @@ $template->assign_vars(array( 'SIG_DISALLOWED' => bf($pr_data['user_opt'], 'user_opt', 'allow_sig'), 'PR_USER_ID' => $pr_data['user_id'], - 'U_RESET_AUTOLOGIN' => "login.php?logout=1&reset_autologin=1&sid={$userdata['session_id']}", + 'U_RESET_AUTOLOGIN' => LOGIN_URL . "?logout=1&reset_autologin=1&sid={$userdata['session_id']}", )); diff --git a/upload/includes/ucp/usercp_viewprofile.php b/upload/includes/ucp/usercp_viewprofile.php index 5303829b1..ab60815c1 100644 --- a/upload/includes/ucp/usercp_viewprofile.php +++ b/upload/includes/ucp/usercp_viewprofile.php @@ -19,7 +19,7 @@ if (!$profiledata = get_userdata($_GET[POST_USERS_URL])) if (!$userdata['session_logged_in']) { - redirect("login.php?redirect={$_SERVER['REQUEST_URI']}"); + redirect(LOGIN_URL . "?redirect={$_SERVER['REQUEST_URI']}"); } if (!$ranks = $datastore->get('ranks')) @@ -106,7 +106,7 @@ $template->assign_vars(array( 'RANK_IMAGE' => $rank_image, 'RANK_SELECT' => $rank_select, 'POSTS' => $profiledata['user_posts'], - 'PM' => ''. $lang['SEND_PRIVATE_MESSAGE'] .'', + 'PM' => ''. $lang['SEND_PRIVATE_MESSAGE'] .'', 'EMAIL' => $email, 'WWW' => $profiledata['user_website'], 'ICQ' => $profiledata['user_icq'], diff --git a/upload/login.php b/upload/login.php index 331b41b5a..599c78112 100644 --- a/upload/login.php +++ b/upload/login.php @@ -97,7 +97,7 @@ if (isset($_POST['login'])) // Обнуление при введении правильно комбинации логин/пароль CACHE('bb_login_err')->set('l_err_'. USER_IP, 0, 3600); - if ($redirect_url == '/login.php' || $redirect_url == 'login.php') $redirect_url = 'index.php'; + if ($redirect_url == '/' . LOGIN_URL || $redirect_url == LOGIN_URL) $redirect_url = 'index.php'; redirect($redirect_url); } @@ -128,7 +128,7 @@ if (IS_GUEST || $mod_admin_login) 'REDIRECT_URL' => htmlCHR($redirect_url), 'CAPTCHA_HTML' => ($need_captcha) ? CAPTCHA()->get_html() : '', 'PAGE_TITLE' => $lang['LOGIN'], - 'S_LOGIN_ACTION' => "login.php", + 'S_LOGIN_ACTION' => LOGIN_URL, )); print_page('login.tpl'); diff --git a/upload/memberlist.php b/upload/memberlist.php index 6509d1277..317b5aa8c 100644 --- a/upload/memberlist.php +++ b/upload/memberlist.php @@ -171,7 +171,7 @@ if ($result = DB()->fetch_rowset($sql)) $from = $row['user_from']; $joined = bb_date($row['user_regdate'], $lang['DATE_FORMAT']); $posts = $row['user_posts']; - $pm = ($bb_cfg['text_buttons']) ? ''. $lang['SEND_PM_TXTB'] .'' : '' . $lang['SEND_PRIVATE_MESSAGE'] . ''; + $pm = ($bb_cfg['text_buttons']) ? ''. $lang['SEND_PM_TXTB'] .'' : '' . $lang['SEND_PRIVATE_MESSAGE'] . ''; if (bf($row['user_opt'], 'user_opt', 'viewemail') || IS_AM) { diff --git a/upload/modcp.php b/upload/modcp.php index a25182f5d..05a3f980c 100644 --- a/upload/modcp.php +++ b/upload/modcp.php @@ -186,7 +186,7 @@ if (!$is_auth['auth_mod']) if ($is_moderator && !$userdata['session_admin']) { $redirect = isset($_POST['redirect']) ? $_POST['redirect'] : $_SERVER['REQUEST_URI']; - redirect("login.php?redirect=$redirect&admin=1"); + redirect(LOGIN_URL . "?redirect=$redirect&admin=1"); } // diff --git a/upload/posting.php b/upload/posting.php index 10327aeed..6bcd5c32b 100644 --- a/upload/posting.php +++ b/upload/posting.php @@ -298,7 +298,7 @@ if (!$is_auth[$is_auth_type]) default: $redirect = ''; } - redirect("login.php?redirect=/posting.php?$redirect"); + redirect(LOGIN_URL . "?redirect=/posting.php?$redirect"); } if ($mode == 'newtopic' && $topic_tpl && $post_info['topic_tpl_id']) @@ -406,7 +406,7 @@ if ( ( $delete || $poll_delete || $mode == 'delete' ) && !$confirm ) print_confirmation(array( 'QUESTION' => ($delete || $mode == 'delete') ? $lang['CONFIRM_DELETE'] : $lang['CONFIRM_DELETE_POLL'], - 'FORM_ACTION' => "posting.php", + 'FORM_ACTION' => POSTING_URL, 'HIDDEN_FIELDS' => build_hidden_fields($hidden_fields), )); } @@ -854,7 +854,7 @@ $template->assign_vars(array( 'S_NOTIFY_CHECKED' => ( $notify_user ) ? 'checked="checked"' : '', 'S_TYPE_TOGGLE' => $topic_type_toggle, 'S_TOPIC_ID' => $topic_id, - 'S_POST_ACTION' => "posting.php", + 'S_POST_ACTION' => POSTING_URL, 'S_HIDDEN_FORM_FIELDS' => $hidden_form_fields) ); diff --git a/upload/privmsg.php b/upload/privmsg.php index 27115a6b6..efc586367 100644 --- a/upload/privmsg.php +++ b/upload/privmsg.php @@ -77,7 +77,7 @@ $template->assign_vars(array( // if ( $cancel ) { - redirect("privmsg.php?folder=$folder"); + redirect(PM_URL . "?folder=$folder"); } // @@ -99,13 +99,10 @@ $error = FALSE; // // Define the box image links // -$inbox_url = ( $folder != 'inbox' || $mode != '' ) ? ''. $lang['INBOX'] .'' : $lang['INBOX']; - -$outbox_url = ( $folder != 'outbox' || $mode != '' ) ? ''. $lang['OUTBOX'] .'' : $lang['OUTBOX']; - -$sentbox_url = ( $folder != 'sentbox' || $mode != '' ) ? ''. $lang['SENTBOX'] .'' : $lang['SENTBOX']; - -$savebox_url = ( $folder != 'savebox' || $mode != '' ) ? ''. $lang['SAVEBOX'] .'' : $lang['SAVEBOX']; +$inbox_url = ( $folder != 'inbox' || $mode != '' ) ? ''. $lang['INBOX'] .'' : $lang['INBOX']; +$outbox_url = ( $folder != 'outbox' || $mode != '' ) ? ''. $lang['OUTBOX'] .'' : $lang['OUTBOX']; +$sentbox_url = ( $folder != 'sentbox' || $mode != '' ) ? ''. $lang['SENTBOX'] .'' : $lang['SENTBOX']; +$savebox_url = ( $folder != 'savebox' || $mode != '' ) ? ''. $lang['SAVEBOX'] .'' : $lang['SAVEBOX']; // ---------- // Start main @@ -183,7 +180,7 @@ if ( $mode == 'read' ) // if ( !($privmsg = DB()->sql_fetchrow($result)) ) { - redirect("privmsg.php?folder=$folder"); + redirect(PM_URL . "?folder=$folder"); } $privmsg_id = $privmsg['privmsgs_id']; @@ -292,10 +289,10 @@ if ( $mode == 'read' ) // Pick a folder, any folder, so long as it's one below ... // $post_urls = array( - 'post' => "privmsg.php?mode=post", - 'reply' => "privmsg.php?mode=reply&" . POST_POST_URL . "=$privmsg_id", - 'quote' => "privmsg.php?mode=quote&" . POST_POST_URL . "=$privmsg_id", - 'edit' => "privmsg.php?mode=edit&" . POST_POST_URL . "=$privmsg_id" + 'post' => PM_URL . "?mode=post", + 'reply' => PM_URL . "?mode=reply&" . POST_POST_URL . "=$privmsg_id", + 'quote' => PM_URL . "?mode=quote&" . POST_POST_URL . "=$privmsg_id", + 'edit' => PM_URL . "?mode=edit&" . POST_POST_URL . "=$privmsg_id" ); $post_icons = array( 'post_img' => '' . $lang['POST_NEW_PM'] . '', @@ -430,7 +427,7 @@ if ( $mode == 'read' ) 'SAVEBOX' => $savebox_url, 'BOX_NAME' => $l_box_name, - 'S_PRIVMSGS_ACTION' => "privmsg.php?folder=$folder", + 'S_PRIVMSGS_ACTION' => PM_URL . "?folder=$folder", 'S_HIDDEN_FIELDS' => $s_hidden_fields) ); @@ -445,7 +442,7 @@ if ( $mode == 'read' ) $profile_img = '' . $lang['READ_PROFILE'] . ''; $profile = '' . $lang['READ_PROFILE'] . ''; - $temp_url = "privmsg.php?mode=post&" . POST_USERS_URL . "=$user_id_from"; + $temp_url = PM_URL . "?mode=post&" . POST_USERS_URL . "=$user_id_from"; $pm_img = '' . $lang['SEND_PRIVATE_MESSAGE'] . ''; $pm = '' . $lang['SEND_PRIVATE_MESSAGE'] . ''; @@ -520,7 +517,7 @@ else if ( ( $delete && $mark_list ) || $delete_all ) print_confirmation(array( 'QUESTION' => (count($mark_list) == 1) ? $lang['CONFIRM_DELETE_PM'] : $lang['CONFIRM_DELETE_PMS'], - 'FORM_ACTION' => "privmsg.php?folder=$folder", + 'FORM_ACTION' => PM_URL . "?folder=$folder", 'HIDDEN_FIELDS' => build_hidden_fields($hidden_fields), )); } @@ -895,7 +892,7 @@ else if ( $save && $mark_list && $folder != 'savebox' && $folder != 'outbox' ) message_die(GENERAL_ERROR, 'Could not save private messages', '', __LINE__, __FILE__, $saved_sql); } - redirect("privmsg.php?folder=savebox"); + redirect(PM_URL . "?folder=savebox"); } } else if ( $submit || $refresh || $mode != '' ) @@ -1108,7 +1105,7 @@ else if ( $submit || $refresh || $mode != '' ) if ( bf($to_userdata['user_opt'], 'user_opt', 'notify_pm') && !empty($to_userdata['user_email']) && $to_userdata['user_active'] && $bb_cfg['pm_notify_enabled'] ) { $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($bb_cfg['script_path'])); - $script_name = ( $script_name != '' ) ? $script_name . '/privmsg.php' : 'privmsg.php'; + $script_name = ( $script_name != '' ) ? $script_name . '/'. PM_URL : PM_URL; $server_name = trim($bb_cfg['server_name']); $server_protocol = ( $bb_cfg['cookie_secure'] ) ? 'https://' : 'http://'; $server_port = ( $bb_cfg['server_port'] <> 80 ) ? ':' . trim($bb_cfg['server_port']) . '/' : '/'; @@ -1229,7 +1226,7 @@ else if ( $submit || $refresh || $mode != '' ) if ( !($privmsg = DB()->sql_fetchrow($result)) ) { - redirect("privmsg.php?folder=$folder"); + redirect(PM_URL . "?folder=$folder"); } $privmsg_subject = $privmsg['privmsgs_subject']; @@ -1255,7 +1252,7 @@ else if ( $submit || $refresh || $mode != '' ) if ( !($privmsg = DB()->sql_fetchrow($result)) ) { - redirect("privmsg.php?folder=$folder"); + redirect(PM_URL . "?folder=$folder"); } $privmsg_subject = ( ( !preg_match('/^Re:/', $privmsg['privmsgs_subject']) ) ? 'Re: ' : '' ) . $privmsg['privmsgs_subject']; @@ -1398,11 +1395,11 @@ else if ( $submit || $refresh || $mode != '' ) 'POSTING_TYPE_TITLE' => $post_a, 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields, - 'S_POST_ACTION' => "privmsg.php", + 'S_POST_ACTION' => PM_URL, 'U_SEARCH_USER' => "search.php?mode=searchuser", - 'U_VIEW_FORUM' => "privmsg.php") - ); + 'U_VIEW_FORUM' => PM_URL, + )); } else { @@ -1450,7 +1447,7 @@ else // // New message // - $post_new_mesg_url = '' . $lang['SEND_A_NEW_MESSAGE'] . ''; + $post_new_mesg_url = '' . $lang['SEND_A_NEW_MESSAGE'] . ''; // // General SQL to obtain messages @@ -1586,7 +1583,7 @@ else $l_box_name = $lang['SENTBOX']; break; } - $post_pm = "privmsg.php?mode=post"; + $post_pm = PM_URL . "?mode=post"; $post_pm_img = '' . $lang['POST_NEW_PM'] . ''; $post_pm = '' . $lang['POST_NEW_PM'] . ''; @@ -1642,12 +1639,12 @@ else 'L_FROM_OR_TO' => ( $folder == 'inbox' || $folder == 'savebox' ) ? $lang['FROM'] : $lang['TO'], - 'S_PRIVMSGS_ACTION' => "privmsg.php?folder=$folder", + 'S_PRIVMSGS_ACTION' => PM_URL . "?folder=$folder", 'S_HIDDEN_FIELDS' => '', 'S_POST_NEW_MSG' => $post_new_mesg_url, 'S_SELECT_MSG_DAYS' => $select_msg_days, - 'U_POST_NEW_TOPIC' => "privmsg.php?mode=post") + 'U_POST_NEW_TOPIC' => PM_URL . "?mode=post") ); // @@ -1680,7 +1677,7 @@ else $msg_subject = preg_replace($orig_word, $replacement_word, $msg_subject); } - $u_subject = "privmsg.php?folder=$folder&mode=read&" . POST_POST_URL . "=$privmsg_id"; + $u_subject = PM_URL . "?folder=$folder&mode=read&" . POST_POST_URL . "=$privmsg_id"; $msg_date = bb_date($row['privmsgs_date']); @@ -1711,7 +1708,7 @@ else } while( $row = DB()->sql_fetchrow($result) ); - generate_pagination("privmsg.php?folder=$folder", $pm_total, $bb_cfg['topics_per_page'], $start); + generate_pagination(PM_URL . "?folder=$folder", $pm_total, $bb_cfg['topics_per_page'], $start); } else { @@ -1735,10 +1732,10 @@ function pm_message_die ($msg) global $lang; $msg .= '

'; - $msg .= sprintf($lang['CLICK_RETURN_INBOX'], '', ' '); - $msg .= sprintf($lang['CLICK_RETURN_SENTBOX'], '', ' '); - $msg .= sprintf($lang['CLICK_RETURN_OUTBOX'], '', ' '); - $msg .= sprintf($lang['CLICK_RETURN_SAVEBOX'], '', ' '); + $msg .= sprintf($lang['CLICK_RETURN_INBOX'], '', ' '); + $msg .= sprintf($lang['CLICK_RETURN_SENTBOX'], '', ' '); + $msg .= sprintf($lang['CLICK_RETURN_OUTBOX'], '', ' '); + $msg .= sprintf($lang['CLICK_RETURN_SAVEBOX'], '', ' '); $msg .= '

'; $msg .= sprintf($lang['CLICK_RETURN_INDEX'], '', ''); diff --git a/upload/report.php b/upload/report.php index 5499b7ea7..a413535e9 100644 --- a/upload/report.php +++ b/upload/report.php @@ -694,7 +694,7 @@ else $template->assign_vars(array( 'S_HIDDEN_FIELDS' => '', - 'U_REPORT_AUTHOR_PRIVMSG' => "privmsg.php?mode=post&" . POST_USERS_URL . '=' . $report['user_id'], + 'U_REPORT_AUTHOR_PRIVMSG' => PM_URL . "?mode=post&" . POST_USERS_URL . '=' . $report['user_id'], 'REPORT_TYPE' => $report_module->lang['REPORT_TYPE'], 'REPORT_TITLE' => $report['report_title'], diff --git a/upload/templates/default/page_header.tpl b/upload/templates/default/page_header.tpl index f5e984075..73c2120b0 100644 --- a/upload/templates/default/page_header.tpl +++ b/upload/templates/default/page_header.tpl @@ -215,7 +215,7 @@ $(document).ready(function(){ }); -var ajax = new Ajax('{SITE_URL}ajax.php', 'POST', 'json'); +var ajax = new Ajax('{$bb_cfg['ajax_url']}', 'POST', 'json'); function getElText (e) { diff --git a/upload/templates/default/tpl_config.php b/upload/templates/default/tpl_config.php index 0f57ebf72..bb66d2238 100644 --- a/upload/templates/default/tpl_config.php +++ b/upload/templates/default/tpl_config.php @@ -147,9 +147,9 @@ if (!empty($page_cfg['load_tpl_vars']) AND $vars = array_flip($page_cfg['load_tp 'MOD_POST_IMG' => ($bb_cfg['text_buttons']) ? $lang['MODERATE_POST_TXTB'] : ''.$lang['MODERATE_POST_TXTB'].'', 'MC_IMG' => ($bb_cfg['text_buttons']) ? '['.$lang['COMMENT'].']' : '['.$lang['COMMENT'].']', - 'QUOTE_URL' => BB_ROOT ."posting.php?mode=quote&p=", - 'EDIT_POST_URL' => BB_ROOT ."posting.php?mode=editpost&p=", - 'DELETE_POST_URL' => BB_ROOT ."posting.php?mode=delete&p=", + 'QUOTE_URL' => BB_ROOT . POSTING_URL . "?mode=quote&p=", + 'EDIT_POST_URL' => BB_ROOT . POSTING_URL . "?mode=editpost&p=", + 'DELETE_POST_URL' => BB_ROOT . POSTING_URL . "?mode=delete&p=", 'IP_POST_URL' => BB_ROOT ."modcp.php?mode=ip&p=", 'PROFILE_IMG' => ($bb_cfg['text_buttons']) ? $lang['READ_PROFILE_TXTB'] : ''. $lang['READ_PROFILE_TXTB'] .'', diff --git a/upload/templates/default/viewforum.tpl b/upload/templates/default/viewforum.tpl index 437888607..3a0dbe267 100644 --- a/upload/templates/default/viewforum.tpl +++ b/upload/templates/default/viewforum.tpl @@ -643,7 +643,7 @@ td.topic_id { cursor: pointer; }
{L_ADMIN}:  -{L_DESIGNER}  ·  +{L_DESIGNER}  ·  {L_FORUM_LOGS}  ·  {L_EDIT}  ·  diff --git a/upload/templates/default/viewtopic.tpl b/upload/templates/default/viewtopic.tpl index 4686154cf..03f536eb2 100644 --- a/upload/templates/default/viewtopic.tpl +++ b/upload/templates/default/viewtopic.tpl @@ -392,7 +392,7 @@ ajax.callback.post_mod_comment = function(data) {
{PROFILE_IMG}{POST_BTN_SPACER} - {PM_IMG}{POST_BTN_SPACER} + {PM_IMG}{POST_BTN_SPACER}
diff --git a/upload/viewforum.php b/upload/viewforum.php index 5cce8892e..3c17fd35b 100644 --- a/upload/viewforum.php +++ b/upload/viewforum.php @@ -69,7 +69,7 @@ if (!$is_auth['auth_view']) { $redirect = "f=$forum_id"; $redirect .= ($start) ? "&start=$start" : ''; - redirect("login.php?redirect=viewforum.php&$redirect"); + redirect(LOGIN_URL . "?redirect=viewforum.php&$redirect"); } // The user is not authed to read this forum ... $message = sprintf($lang['SORRY_AUTH_VIEW'], $is_auth['auth_view_type']); @@ -86,7 +86,7 @@ if ($is_auth['auth_mod']) { $redirect = isset($_POST['redirect']) ? $_POST['redirect'] : @$_SERVER['REQUEST_URI']; $redirect = url_arg($redirect, 'mod', 1, '&'); - $mod_redirect_url = "login.php?redirect=$redirect&admin=1"; + $mod_redirect_url = LOGIN_URL . "?redirect=$redirect&admin=1"; if ($moderation && !$userdata['session_admin']) { @@ -399,13 +399,13 @@ obtain_word_list($orig_word, $replacement_word); if($forum_data['allow_reg_tracker']) { - $post_new_topic_url = "posting.php?mode=new_rel&f=$forum_id"; + $post_new_topic_url = POSTING_URL . "?mode=new_rel&f=$forum_id"; $post_img = $images['release_new']; $post_new_topic = $lang['POST_NEW_RELEASE']; } else { - $post_new_topic_url = "posting.php?mode=newtopic&f=$forum_id"; + $post_new_topic_url = POSTING_URL . "?mode=newtopic&f=$forum_id"; $post_img = $images['post_new']; $post_new_topic = $lang['POST_NEW_TOPIC']; } diff --git a/upload/viewtopic.php b/upload/viewtopic.php index 8877379e6..55bd97785 100644 --- a/upload/viewtopic.php +++ b/upload/viewtopic.php @@ -175,7 +175,7 @@ if (!$is_auth['auth_read']) { $redirect = ($post_id) ? POST_POST_URL . "=$post_id" : POST_TOPIC_URL . "=$topic_id"; $redirect .= ($start) ? "&start=$start" : ''; - redirect("login.php?redirect=viewtopic.php&$redirect"); + redirect(LOGIN_URL . "?redirect=viewtopic.php&$redirect"); } bb_die($lang['TOPIC_POST_NOT_EXIST']); } @@ -194,7 +194,7 @@ if ($is_auth['auth_mod']) { $redirect = isset($_POST['redirect']) ? $_POST['redirect'] : @$_SERVER['REQUEST_URI']; $redirect = url_arg($redirect, 'mod', 1, '&'); - $mod_redirect_url = "login.php?redirect=$redirect&admin=1"; + $mod_redirect_url = LOGIN_URL . "?redirect=$redirect&admin=1"; if ($moderation && !$userdata['session_admin']) { @@ -329,7 +329,7 @@ if ($bb_cfg['topic_notify_enabled']) { if ($_GET['unwatch'] == 'topic') { - redirect("login.php?redirect=viewtopic.php&t=$topic_id&unwatch=topic"); + redirect(LOGIN_URL . "?redirect=viewtopic.php&t=$topic_id&unwatch=topic"); } } } @@ -450,9 +450,9 @@ if ( count($orig_word) ) // Post, reply and other URL generation for // templating vars // -$new_topic_url = "posting.php?mode=newtopic&f=$forum_id"; +$new_topic_url = POSTING_URL . "?mode=newtopic&f=$forum_id"; $new_topic_url .= ($t_data['topic_tpl_id']) ? '&tpl=1' : ''; -$reply_topic_url = "posting.php?mode=reply&t=$topic_id"; +$reply_topic_url = POSTING_URL . "?mode=reply&t=$topic_id"; $view_forum_url = "viewforum.php?f=$forum_id"; $view_prev_topic_url = "viewtopic.php?t=$topic_id&view=previous#newest"; $view_next_topic_url = "viewtopic.php?t=$topic_id&view=next#newest"; @@ -761,7 +761,7 @@ if ( !empty($t_data['topic_vote']) ) 'POLL_QUESTION' => $vote_title, 'S_HIDDEN_FIELDS' => $s_hidden_fields, - 'S_POLL_ACTION' => "posting.php?mode=vote&t=$topic_id", + 'S_POLL_ACTION' => POSTING_URL . "?mode=vote&t=$topic_id", )); } } @@ -1023,7 +1023,7 @@ if ($bb_cfg['show_quick_reply']) { $template->assign_vars(array( 'QUICK_REPLY' => true, - 'QR_POST_ACTION' => "posting.php", + 'QR_POST_ACTION' => POSTING_URL, 'QR_TOPIC_ID' => $topic_id, 'CAPTCHA_HTML' => (IS_GUEST) ? CAPTCHA()->get_html() : '', ));