mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
r566
Возможность переименования файлов ajax.php, login.php, privmsg.php, posting.php путем легкой настройки в конфиге. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@566 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
2bd1394906
commit
3b2e125d6b
29 changed files with 94 additions and 87 deletions
|
@ -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]
|
||||
Вся база перенесена на новый движок, регистрироваться заново не надо.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 .= '<input type="hidden" name="subject" value="'. $post['topic_title'] .'" />';
|
||||
|
||||
$this->response['text'] = '
|
||||
<form action="posting.php" method="post" name="post">
|
||||
<form action="'. POSTING_URL .'" method="post" name="post">
|
||||
'. $hidden_form .'
|
||||
<div class="buttons mrg_4">
|
||||
<input type="button" value="B" name="codeB" title="'. $lang['BOLD'] .'" style="font-weight: bold; width: 25px;" />
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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']) ? '<a class="txtb" href="'. ("privmsg.php?mode=post&". POST_USERS_URL ."=".$row['user_id']) .'">'. $lang['SEND_PM_TXTB'] .'</a>' : '<a href="' . ("privmsg.php?mode=post&". POST_USERS_URL ."=".$row['user_id']) .'"><img src="' . $images['icon_pm'] . '" alt="' . $lang['SEND_PRIVATE_MESSAGE'] . '" title="' . $lang['SEND_PRIVATE_MESSAGE'] . '" border="0" /></a>';
|
||||
$pm = ($bb_cfg['text_buttons']) ? '<a class="txtb" href="'. (PM_URL . "?mode=post&". POST_USERS_URL ."=".$row['user_id']) .'">'. $lang['SEND_PM_TXTB'] .'</a>' : '<a href="' . (PM_URL . "?mode=post&". POST_USERS_URL ."=".$row['user_id']) .'"><img src="' . $images['icon_pm'] . '" alt="' . $lang['SEND_PRIVATE_MESSAGE'] . '" title="' . $lang['SEND_PRIVATE_MESSAGE'] . '" border="0" /></a>';
|
||||
|
||||
if (bf($row['user_opt'], 'user_opt', 'viewemail') || $group_mod)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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=');
|
||||
|
|
|
@ -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,
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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']}",
|
||||
|
||||
));
|
||||
|
||||
|
|
|
@ -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' => '<a href="privmsg.php?mode=post&'. POST_USERS_URL .'='. $profiledata['user_id'] .'">'. $lang['SEND_PRIVATE_MESSAGE'] .'</a>',
|
||||
'PM' => '<a href="' . PM_URL . '?mode=post&'. POST_USERS_URL .'='. $profiledata['user_id'] .'">'. $lang['SEND_PRIVATE_MESSAGE'] .'</a>',
|
||||
'EMAIL' => $email,
|
||||
'WWW' => $profiledata['user_website'],
|
||||
'ICQ' => $profiledata['user_icq'],
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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']) ? '<a class="txtb" href="'. ("privmsg.php?mode=post&". POST_USERS_URL ."=$user_id") .'">'. $lang['SEND_PM_TXTB'] .'</a>' : '<a href="' . ("privmsg.php?mode=post&". POST_USERS_URL ."=$user_id") .'"><img src="' . $images['icon_pm'] . '" alt="' . $lang['SEND_PRIVATE_MESSAGE'] . '" title="' . $lang['SEND_PRIVATE_MESSAGE'] . '" border="0" /></a>';
|
||||
$pm = ($bb_cfg['text_buttons']) ? '<a class="txtb" href="'. (PM_URL . "?mode=post&". POST_USERS_URL ."=$user_id") .'">'. $lang['SEND_PM_TXTB'] .'</a>' : '<a href="' . (PM_URL . "?mode=post&". POST_USERS_URL ."=$user_id") .'"><img src="' . $images['icon_pm'] . '" alt="' . $lang['SEND_PRIVATE_MESSAGE'] . '" title="' . $lang['SEND_PRIVATE_MESSAGE'] . '" border="0" /></a>';
|
||||
|
||||
if (bf($row['user_opt'], 'user_opt', 'viewemail') || IS_AM)
|
||||
{
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -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)
|
||||
);
|
||||
|
||||
|
|
|
@ -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 != '' ) ? '<a href="'."privmsg.php?folder=inbox".'">'. $lang['INBOX'] .'</a>' : $lang['INBOX'];
|
||||
|
||||
$outbox_url = ( $folder != 'outbox' || $mode != '' ) ? '<a href="'."privmsg.php?folder=outbox".'">'. $lang['OUTBOX'] .'</a>' : $lang['OUTBOX'];
|
||||
|
||||
$sentbox_url = ( $folder != 'sentbox' || $mode != '' ) ? '<a href="'."privmsg.php?folder=sentbox".'">'. $lang['SENTBOX'] .'</a>' : $lang['SENTBOX'];
|
||||
|
||||
$savebox_url = ( $folder != 'savebox' || $mode != '' ) ? '<a href="'."privmsg.php?folder=savebox".'">'. $lang['SAVEBOX'] .'</a>' : $lang['SAVEBOX'];
|
||||
$inbox_url = ( $folder != 'inbox' || $mode != '' ) ? '<a href="' . PM_URL . "?folder=inbox".'">'. $lang['INBOX'] .'</a>' : $lang['INBOX'];
|
||||
$outbox_url = ( $folder != 'outbox' || $mode != '' ) ? '<a href="' . PM_URL . "?folder=outbox".'">'. $lang['OUTBOX'] .'</a>' : $lang['OUTBOX'];
|
||||
$sentbox_url = ( $folder != 'sentbox' || $mode != '' ) ? '<a href="' . PM_URL . "?folder=sentbox".'">'. $lang['SENTBOX'] .'</a>' : $lang['SENTBOX'];
|
||||
$savebox_url = ( $folder != 'savebox' || $mode != '' ) ? '<a href="' . PM_URL . "?folder=savebox".'">'. $lang['SAVEBOX'] .'</a>' : $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' => '<a href="' . $post_urls['post'] . '"><img src="' . $images['pm_postmsg'] . '" alt="' . $lang['POST_NEW_PM'] . '" border="0" /></a>',
|
||||
|
@ -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 = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['READ_PROFILE'] . '" title="' . $lang['READ_PROFILE'] . '" border="0" /></a>';
|
||||
$profile = '<a href="' . $temp_url . '">' . $lang['READ_PROFILE'] . '</a>';
|
||||
|
||||
$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 = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['SEND_PRIVATE_MESSAGE'] . '" title="' . $lang['SEND_PRIVATE_MESSAGE'] . '" border="0" /></a>';
|
||||
$pm = '<a href="' . $temp_url . '">' . $lang['SEND_PRIVATE_MESSAGE'] . '</a>';
|
||||
|
||||
|
@ -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 = '<a href="privmsg.php?mode=post"><img src="' . $images['post_new'] . '" alt="' . $lang['SEND_A_NEW_MESSAGE'] . '" border="0" /></a>';
|
||||
$post_new_mesg_url = '<a href="' . PM_URL .'?mode=post"><img src="' . $images['post_new'] . '" alt="' . $lang['SEND_A_NEW_MESSAGE'] . '" border="0" /></a>';
|
||||
|
||||
//
|
||||
// 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 = '<a href="' . $post_pm . '"><img src="' . $images['pm_postmsg'] . '" alt="' . $lang['POST_NEW_PM'] . '" border="0" /></a>';
|
||||
$post_pm = '<a href="' . $post_pm . '">' . $lang['POST_NEW_PM'] . '</a>';
|
||||
|
||||
|
@ -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 .= '<br /><br />';
|
||||
$msg .= sprintf($lang['CLICK_RETURN_INBOX'], '<a href="'."privmsg.php?folder=inbox".'">', '</a> ');
|
||||
$msg .= sprintf($lang['CLICK_RETURN_SENTBOX'], '<a href="'."privmsg.php?folder=sentbox".'">', '</a> ');
|
||||
$msg .= sprintf($lang['CLICK_RETURN_OUTBOX'], '<a href="'."privmsg.php?folder=outbox".'">', '</a> ');
|
||||
$msg .= sprintf($lang['CLICK_RETURN_SAVEBOX'], '<a href="'."privmsg.php?folder=savebox".'">', '</a> ');
|
||||
$msg .= sprintf($lang['CLICK_RETURN_INBOX'], '<a href="' . PM_URL . "?folder=inbox".'">', '</a> ');
|
||||
$msg .= sprintf($lang['CLICK_RETURN_SENTBOX'], '<a href="' . PM_URL . "?folder=sentbox".'">', '</a> ');
|
||||
$msg .= sprintf($lang['CLICK_RETURN_OUTBOX'], '<a href="' . PM_URL . "?folder=outbox".'">', '</a> ');
|
||||
$msg .= sprintf($lang['CLICK_RETURN_SAVEBOX'], '<a href="' . PM_URL . "?folder=savebox".'">', '</a> ');
|
||||
$msg .= '<br /><br />';
|
||||
$msg .= sprintf($lang['CLICK_RETURN_INDEX'], '<a href="'."index.php".'">', '</a>');
|
||||
|
||||
|
|
|
@ -694,7 +694,7 @@ else
|
|||
$template->assign_vars(array(
|
||||
'S_HIDDEN_FIELDS' => '<input type="hidden" name="' . POST_REPORT_URL . '" value="' . $report['report_id'] . '" />',
|
||||
|
||||
'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'],
|
||||
|
|
|
@ -215,7 +215,7 @@ $(document).ready(function(){
|
|||
});
|
||||
<!-- ENDIF -->
|
||||
|
||||
var ajax = new Ajax('{SITE_URL}ajax.php', 'POST', 'json');
|
||||
var ajax = new Ajax('{$bb_cfg['ajax_url']}', 'POST', 'json');
|
||||
|
||||
function getElText (e)
|
||||
{
|
||||
|
|
|
@ -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'] : '<img src="'. $images['icon_mod'] .'" alt="'.$lang['MODERATE_POST_TXTB'].'" title="'. $lang['MODERATE_POST'] .'" />',
|
||||
'MC_IMG' => ($bb_cfg['text_buttons']) ? '['.$lang['COMMENT'].']' : '<img src="'. $images['icon_mc'] .'" alt="['.$lang['COMMENT'].']" title="'.$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'] : '<img src="'. $images['icon_profile'] .'" alt="'. $lang['READ_PROFILE_TXTB'] .'" title="'. $lang['READ_PROFILE'] .'" />',
|
||||
|
|
|
@ -643,7 +643,7 @@ td.topic_id { cursor: pointer; }
|
|||
<div class="med tCenter">
|
||||
{L_ADMIN}:
|
||||
<!-- IF $bb_cfg['new_tpls'] -->
|
||||
<a href="posting.php?mode=new_rel&f={FORUM_ID}&edit_tpl=1" class="bold" target="_blank">{L_DESIGNER}</a> ·
|
||||
<a href="{POSTING_URL}?mode=new_rel&f={FORUM_ID}&edit_tpl=1" class="bold" target="_blank">{L_DESIGNER}</a> ·
|
||||
<!-- ENDIF -->
|
||||
<a href="admin/admin_log.php?f={FORUM_ID}&db={$bb_cfg['log_days_keep']}" target="_blank">{L_FORUM_LOGS}</a> ·
|
||||
<a href="admin/admin_forums.php?mode=editforum&f={FORUM_ID}" target="_blank">{L_EDIT}</a> ·
|
||||
|
|
|
@ -392,7 +392,7 @@ ajax.callback.post_mod_comment = function(data) {
|
|||
<!-- ELSE -->
|
||||
<div style="<!-- IF TEXT_BUTTONS --> padding: 2px 6px 4px;<!-- ELSE --> padding: 2px 3px;<!-- ENDIF -->" class="post_btn_2">
|
||||
<a class="txtb" href="{PROFILE_URL}{postrow.POSTER_ID}">{PROFILE_IMG}</a>{POST_BTN_SPACER}
|
||||
<a class="txtb" href="{PM_URL}{postrow.POSTER_ID}">{PM_IMG}</a>{POST_BTN_SPACER}
|
||||
<a class="txtb" href="{PM_URL}?mode=post&u={postrow.POSTER_ID}">{PM_IMG}</a>{POST_BTN_SPACER}
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
|
|
@ -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'];
|
||||
}
|
||||
|
|
|
@ -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() : '',
|
||||
));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue