mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
r51
Удаление bbcode_uid git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@51 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
0ae55a6fe4
commit
218629a79a
17 changed files with 64 additions and 213 deletions
|
@ -167,8 +167,7 @@ if ($mode == 'submit' || $mode == 'refresh')
|
||||||
// get the post subject/text of each post
|
// get the post subject/text of each post
|
||||||
$result = DB()->query("
|
$result = DB()->query("
|
||||||
SELECT
|
SELECT
|
||||||
pt.post_id,
|
pt.post_id, pt.post_text,
|
||||||
pt.post_text, pt.bbcode_uid,
|
|
||||||
IF(p.post_id = t.topic_first_post_id, t.topic_title, '') AS post_subject
|
IF(p.post_id = t.topic_first_post_id, t.topic_title, '') AS post_subject
|
||||||
FROM
|
FROM
|
||||||
". BB_POSTS_TEXT ." pt,
|
". BB_POSTS_TEXT ." pt,
|
||||||
|
@ -196,7 +195,7 @@ if ($mode == 'submit' || $mode == 'refresh')
|
||||||
// Get search words
|
// Get search words
|
||||||
$words_sql[] = array(
|
$words_sql[] = array(
|
||||||
'post_id' => (int) $row['post_id'],
|
'post_id' => (int) $row['post_id'],
|
||||||
'search_words' => add_search_words($row['post_id'], stripslashes($row['post_text']), stripslashes($row['post_subject']), $row['bbcode_uid'], true),
|
'search_words' => add_search_words($row['post_id'], stripslashes($row['post_text']), stripslashes($row['post_subject']), true),
|
||||||
);
|
);
|
||||||
|
|
||||||
$timer_expired = (time() > $expire_time);
|
$timer_expired = (time() > $expire_time);
|
||||||
|
|
|
@ -20,7 +20,7 @@ array_deep($_POST, 'trim');
|
||||||
$html_entities_match = array('#<#', '#>#');
|
$html_entities_match = array('#<#', '#>#');
|
||||||
$html_entities_replace = array('<', '>');
|
$html_entities_replace = array('<', '>');
|
||||||
|
|
||||||
$message = $error_msg = $username_sql = $signature_bbcode_uid = '';
|
$message = $error_msg = $username_sql = '';
|
||||||
$group_moderator = $mark_list = array();
|
$group_moderator = $mark_list = array();
|
||||||
|
|
||||||
$mode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : '';
|
$mode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : '';
|
||||||
|
@ -216,8 +216,6 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset(
|
||||||
if ($signature != '')
|
if ($signature != '')
|
||||||
{
|
{
|
||||||
$sig_length_check = preg_replace('/(\[.*?)(=.*?)\]/is', '\\1]', stripslashes($signature));
|
$sig_length_check = preg_replace('/(\[.*?)(=.*?)\]/is', '\\1]', stripslashes($signature));
|
||||||
$signature_bbcode_uid = ($bb_cfg['allow_bbcode']) ? make_bbcode_uid() : '';
|
|
||||||
$signature = prepare_message($signature, $bb_cfg['allow_bbcode'], $bb_cfg['allow_smilies'], $signature_bbcode_uid);
|
|
||||||
|
|
||||||
if ( strlen($sig_length_check) > $bb_cfg['max_sig_chars'] )
|
if ( strlen($sig_length_check) > $bb_cfg['max_sig_chars'] )
|
||||||
{
|
{
|
||||||
|
@ -523,7 +521,6 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset(
|
||||||
user_allow_viewonline = $allowviewonline,
|
user_allow_viewonline = $allowviewonline,
|
||||||
user_notify = $notifyreply,
|
user_notify = $notifyreply,
|
||||||
user_notify_pm = $notifypm,
|
user_notify_pm = $notifypm,
|
||||||
user_sig_bbcode_uid = '$signature_bbcode_uid',
|
|
||||||
user_allowavatar = $user_allowavatar,
|
user_allowavatar = $user_allowavatar,
|
||||||
user_allow_pm = $user_allowpm,
|
user_allow_pm = $user_allowpm,
|
||||||
user_lang = '" . str_replace("\'", "''", $user_lang) . "',
|
user_lang = '" . str_replace("\'", "''", $user_lang) . "',
|
||||||
|
@ -627,7 +624,6 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset(
|
||||||
$occupation = htmlspecialchars($this_userdata['user_occ']);
|
$occupation = htmlspecialchars($this_userdata['user_occ']);
|
||||||
$interests = htmlspecialchars($this_userdata['user_interests']);
|
$interests = htmlspecialchars($this_userdata['user_interests']);
|
||||||
|
|
||||||
$signature = ($this_userdata['user_sig_bbcode_uid'] != '') ? preg_replace('#:' . $this_userdata['user_sig_bbcode_uid'] . '#si', '', $this_userdata['user_sig']) : $this_userdata['user_sig'];
|
|
||||||
$signature = preg_replace($html_entities_match, $html_entities_replace, $signature);
|
$signature = preg_replace($html_entities_match, $html_entities_replace, $signature);
|
||||||
|
|
||||||
$viewemail = bf($this_userdata['user_opt'], 'user_opt', 'viewemail');
|
$viewemail = bf($this_userdata['user_opt'], 'user_opt', 'viewemail');
|
||||||
|
|
|
@ -16,7 +16,7 @@ $sql = "
|
||||||
SELECT
|
SELECT
|
||||||
p.*,
|
p.*,
|
||||||
h.post_html, IF(h.post_html IS NULL, pt.post_text, NULL) AS post_text,
|
h.post_html, IF(h.post_html IS NULL, pt.post_text, NULL) AS post_text,
|
||||||
pt.post_subject, pt.bbcode_uid,
|
pt.post_subject,
|
||||||
f.auth_read
|
f.auth_read
|
||||||
FROM ". BB_POSTS ." p
|
FROM ". BB_POSTS ." p
|
||||||
INNER JOIN ". BB_POSTS_TEXT ." pt ON(pt.post_id = p.post_id)
|
INNER JOIN ". BB_POSTS_TEXT ." pt ON(pt.post_id = p.post_id)
|
||||||
|
|
|
@ -55,7 +55,7 @@ function send_pm($topic_id, $t_info, $to_user_id)
|
||||||
|
|
||||||
$id = DB()->sql_nextid();
|
$id = DB()->sql_nextid();
|
||||||
|
|
||||||
$sql = "INSERT INTO ". BB_PRIVMSGS_TEXT ." VALUES($id, '". make_bbcode_uid() ."', '$text')";
|
$sql = "INSERT INTO ". BB_PRIVMSGS_TEXT ." VALUES($id, '$text')";
|
||||||
if (!DB()->sql_query($sql)) {
|
if (!DB()->sql_query($sql)) {
|
||||||
$msg_error = "MSG_TEXT";
|
$msg_error = "MSG_TEXT";
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -497,10 +497,10 @@ function replace_synonyms ($text)
|
||||||
return ($syn_match && $syn_replace) ? str_replace($syn_match, $syn_replace, $text) : $text;
|
return ($syn_match && $syn_replace) ? str_replace($syn_match, $syn_replace, $text) : $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_search_words ($post_id, $post_message, $post_title = '', $bbcode_uid = '', $only_return_words = false)
|
function add_search_words ($post_id, $post_message, $post_title = '', $only_return_words = false)
|
||||||
{
|
{
|
||||||
$text = $post_title .' '. $post_message;
|
$text = $post_title .' '. $post_message;
|
||||||
$text = strip_bbcode_uid($text, $bbcode_uid);
|
$text = strip_bbcode_uid($text);
|
||||||
$words = ($text) ? extract_search_words($text) : array();
|
$words = ($text) ? extract_search_words($text) : array();
|
||||||
|
|
||||||
if ($only_return_words)
|
if ($only_return_words)
|
||||||
|
@ -882,14 +882,13 @@ function bbcode2html ($text)
|
||||||
return $bbcode->bbcode2html($text);
|
return $bbcode->bbcode2html($text);
|
||||||
}
|
}
|
||||||
|
|
||||||
function strip_bbcode_uid ($text, $bbcode_uid)
|
function strip_bbcode_uid ($text)
|
||||||
{
|
{
|
||||||
$text = str_replace('[tab]', ' ', $text);
|
$text = str_replace('[tab]', ' ', $text);
|
||||||
$text = str_replace('"', '"', $text);
|
$text = str_replace('"', '"', $text);
|
||||||
$text = str_replace('code:1:', 'code:', $text);
|
$text = str_replace('code:1:', 'code:', $text);
|
||||||
$text = str_replace('list:u:', 'list:', $text);
|
$text = str_replace('list:u:', 'list:', $text);
|
||||||
$text = str_replace('list:o:', 'list:', $text);
|
$text = str_replace('list:o:', 'list:', $text);
|
||||||
$text = str_replace(":$bbcode_uid", '', $text);
|
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2061,18 +2061,13 @@ function smiley_sort ($a, $b)
|
||||||
// CRITICAL_ERROR : Used when config data cannot be obtained, eg
|
// CRITICAL_ERROR : Used when config data cannot be obtained, eg
|
||||||
// no database connection. Should _not_ be used in 99.5% of cases
|
// no database connection. Should _not_ be used in 99.5% of cases
|
||||||
//
|
//
|
||||||
function bb_die ($msg_text, $msg_code = GENERAL_MESSAGE, $msg_title = '')
|
function bb_die ($msg_text)
|
||||||
{
|
{
|
||||||
if (defined('IN_AJAX'))
|
if (defined('IN_AJAX'))
|
||||||
{
|
{
|
||||||
ajax_die($msg_text, $msg_code);
|
$GLOBALS['ajax']->ajax_die($msg_text);
|
||||||
}
|
}
|
||||||
message_die($msg_code, $msg_text, $msg_title);
|
message_die(GENERAL_MESSAGE, $msg_text);
|
||||||
}
|
|
||||||
|
|
||||||
function ajax_die ($msg_text, $msg_code = E_AJAX_GENERAL_ERROR)
|
|
||||||
{
|
|
||||||
$GLOBALS['ajax']->ajax_die($msg_text, $msg_code);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function message_die ($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '')
|
function message_die ($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '')
|
||||||
|
@ -2976,3 +2971,20 @@ function get_path_from_id ($id, $ext_id, $base_path, $first_div, $sec_div)
|
||||||
$ext = isset($bb_cfg['file_id_ext'][$ext_id]) ? $bb_cfg['file_id_ext'][$ext_id] : '';
|
$ext = isset($bb_cfg['file_id_ext'][$ext_id]) ? $bb_cfg['file_id_ext'][$ext_id] : '';
|
||||||
return ($base_path ? "$base_path/" : '') . ($id % $sec_div) .'/'. $id . ($ext ? ".$ext" : '');
|
return ($base_path ? "$base_path/" : '') . ($id % $sec_div) .'/'. $id . ($ext ? ".$ext" : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function send_pm($user_id, $subject, $message)
|
||||||
|
{
$subject = DB()->escape($subject);
|
||||||
|
$message = DB()->escape($message);
|
||||||
|
|
||||||
|
DB()->sql_query("INSERT INTO ". BB_PRIVMSGS ." (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip)
|
||||||
|
VALUES (". PRIVMSGS_NEW_MAIL .", '$subject', {$userdata['user_id']}, $user_id, ". TIMENOW .", '". USER_IP ."')");
|
||||||
|
$pm_id = DB()->sql_nextid();
|
||||||
|
|
||||||
|
DB()->sql_query("INSERT INTO ". BB_PRIVMSGS_TEXT ." VALUES($pm_id, '$text')");
|
||||||
|
|
||||||
|
DB()->sql_query("UPDATE ". BB_USERS ." SET
|
||||||
|
user_new_privmsg = user_new_privmsg + 1,
|
||||||
|
user_last_privmsg = ". TIMENOW .",
|
||||||
|
user_newest_pm_id = $pm_id
|
||||||
|
WHERE user_id = $user_id");
|
||||||
|
}
|
|
@ -22,28 +22,10 @@
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||||
|
|
||||||
$html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#');
|
|
||||||
$html_entities_replace = array('&', '<', '>', '"');
|
|
||||||
|
|
||||||
$unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#');
|
|
||||||
$unhtml_specialchars_replace = array('>', '<', '"', '&');
|
|
||||||
|
|
||||||
//
|
|
||||||
// This function will prepare a posted message for
|
|
||||||
// entry into the database.
|
|
||||||
//
|
|
||||||
|
|
||||||
function unprepare_message($message)
|
|
||||||
{
|
|
||||||
global $unhtml_specialchars_match, $unhtml_specialchars_replace;
|
|
||||||
|
|
||||||
return preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, $message);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Prepare a message for posting
|
// Prepare a message for posting
|
||||||
//
|
//
|
||||||
function prepare_post(&$mode, &$post_data, &$bbcode_on, &$smilies_on, &$error_msg, &$username, &$bbcode_uid, &$subject, &$message, &$poll_title, &$poll_options, &$poll_length)
|
function prepare_post(&$mode, &$post_data, &$error_msg, &$username, &$subject, &$message, &$poll_title, &$poll_options, &$poll_length)
|
||||||
{
|
{
|
||||||
global $bb_cfg, $userdata, $lang;
|
global $bb_cfg, $userdata, $lang;
|
||||||
|
|
||||||
|
@ -147,7 +129,7 @@ function prepare_post(&$mode, &$post_data, &$bbcode_on, &$smilies_on, &$error_ms
|
||||||
//
|
//
|
||||||
// Post a new topic/reply/poll or edit existing post/poll
|
// Post a new topic/reply/poll or edit existing post/poll
|
||||||
//
|
//
|
||||||
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$smilies_on, &$attach_sig, &$bbcode_uid, $post_username, $post_subject, $post_message, $poll_title, &$poll_options, &$poll_length, $update_post_time)
|
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, $post_username, $post_subject, $post_message, $poll_title, &$poll_options, &$poll_length, $update_post_time)
|
||||||
{
|
{
|
||||||
global $bb_cfg, $lang;
|
global $bb_cfg, $lang;
|
||||||
global $userdata, $post_info, $is_auth;
|
global $userdata, $post_info, $is_auth;
|
||||||
|
@ -178,7 +160,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
||||||
if ($mode != 'editpost' && !empty($row['last_post_time']) && !IS_AM)
|
if ($mode != 'editpost' && !empty($row['last_post_time']) && !IS_AM)
|
||||||
{
|
{
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT pt.post_text, pt.bbcode_uid
|
SELECT pt.post_text
|
||||||
FROM ". BB_POSTS ." p, ". BB_POSTS_TEXT ." pt
|
FROM ". BB_POSTS ." p, ". BB_POSTS_TEXT ." pt
|
||||||
WHERE
|
WHERE
|
||||||
$where_sql
|
$where_sql
|
||||||
|
@ -189,7 +171,6 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
||||||
|
|
||||||
if ($row = DB()->fetch_row($sql))
|
if ($row = DB()->fetch_row($sql))
|
||||||
{
|
{
|
||||||
$last_msg = addslashes(str_replace($row['bbcode_uid'], $bbcode_uid, $row['post_text']));
|
|
||||||
$last_msg = str_replace("\'", "''", $last_msg);
|
$last_msg = str_replace("\'", "''", $last_msg);
|
||||||
|
|
||||||
if ($last_msg == $post_message)
|
if ($last_msg == $post_message)
|
||||||
|
@ -232,7 +213,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
||||||
");
|
");
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = ($mode != "editpost") ? "INSERT INTO " . BB_POSTS . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '". USER_IP ."', $bbcode_on, $smilies_on, $attach_sig)" : "UPDATE " . BB_POSTS . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";
|
$sql = ($mode != "editpost") ? "INSERT INTO " . BB_POSTS . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '". USER_IP ."')" : "UPDATE " . BB_POSTS . " SET post_username = '$post_username'" . $edited_sql . " WHERE post_id = $post_id";
|
||||||
if (!DB()->sql_query($sql))
|
if (!DB()->sql_query($sql))
|
||||||
{
|
{
|
||||||
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
|
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
|
||||||
|
@ -243,7 +224,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
||||||
$post_id = DB()->sql_nextid();
|
$post_id = DB()->sql_nextid();
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = ($mode != 'editpost') ? "INSERT INTO " . BB_POSTS_TEXT . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message')" : "UPDATE " . BB_POSTS_TEXT . " SET post_text = '$post_message', bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id";
|
$sql = ($mode != 'editpost') ? "INSERT INTO " . BB_POSTS_TEXT . " (post_id, post_subject, post_text) VALUES ($post_id, '$post_subject', '$post_message')" : "UPDATE " . BB_POSTS_TEXT . " SET post_text = '$post_message', post_subject = '$post_subject' WHERE post_id = $post_id";
|
||||||
if (!DB()->sql_query($sql))
|
if (!DB()->sql_query($sql))
|
||||||
{
|
{
|
||||||
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
|
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
|
||||||
|
@ -251,14 +232,12 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
||||||
|
|
||||||
if ($userdata['user_id'] != BOT_UID)
|
if ($userdata['user_id'] != BOT_UID)
|
||||||
{
|
{
|
||||||
add_search_words($post_id, stripslashes($post_message), stripslashes($post_subject), $bbcode_uid);
|
add_search_words($post_id, stripslashes($post_message), stripslashes($post_subject));
|
||||||
}
|
}
|
||||||
|
|
||||||
update_post_html(array(
|
update_post_html(array(
|
||||||
'post_id' => $post_id,
|
'post_id' => $post_id,
|
||||||
'post_text' => $post_message,
|
'post_text' => $post_message,
|
||||||
'bbcode_uid' => $bbcode_uid,
|
|
||||||
'enable_smilies' => $smilies_on,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -576,7 +555,10 @@ function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topi
|
||||||
$emailer->from($bb_cfg['board_email']);
|
$emailer->from($bb_cfg['board_email']);
|
||||||
$emailer->replyto($bb_cfg['board_email']);
|
$emailer->replyto($bb_cfg['board_email']);
|
||||||
|
|
||||||
$topic_title = (count($orig_word)) ? preg_replace($orig_word, $replacement_word, unprepare_message($topic_title)) : unprepare_message($topic_title);
|
if(count($orig_word))
|
||||||
|
{
|
||||||
|
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
|
||||||
|
}
|
||||||
|
|
||||||
@reset($bcc_list_ary);
|
@reset($bcc_list_ary);
|
||||||
while (list($user_lang, $bcc_list) = each($bcc_list_ary))
|
while (list($user_lang, $bcc_list) = each($bcc_list_ary))
|
||||||
|
@ -666,7 +648,7 @@ function insert_post ($mode, $topic_id, $forum_id = '', $old_forum_id = '', $new
|
||||||
|
|
||||||
if (!$topic_id) return;
|
if (!$topic_id) return;
|
||||||
|
|
||||||
$post_username = $post_subject = $post_text = $poster_ip = $bbcode_uid = '';
|
$post_username = $post_subject = $post_text = $poster_ip = '';
|
||||||
|
|
||||||
$enable_bbcode = $enable_smilies = 0;
|
$enable_bbcode = $enable_smilies = 0;
|
||||||
$enable_sig = 1;
|
$enable_sig = 1;
|
||||||
|
@ -737,8 +719,8 @@ function insert_post ($mode, $topic_id, $forum_id = '', $old_forum_id = '', $new
|
||||||
$post_id = DB()->sql_nextid();
|
$post_id = DB()->sql_nextid();
|
||||||
$post_text = DB()->escape($post_text);
|
$post_text = DB()->escape($post_text);
|
||||||
|
|
||||||
$post_text_columns = 'post_id, post_subject, bbcode_uid, post_text';
|
$post_text_columns = 'post_id, post_subject, post_text';
|
||||||
$post_text_values = "$post_id, '$post_subject', '$bbcode_uid', '$post_text'";
|
$post_text_values = "$post_id, '$post_subject, '$post_text'";
|
||||||
|
|
||||||
DB()->query("INSERT INTO ". BB_POSTS_TEXT ." ($post_text_columns) VALUES ($post_text_values)");
|
DB()->query("INSERT INTO ". BB_POSTS_TEXT ." ($post_text_columns) VALUES ($post_text_values)");
|
||||||
}
|
}
|
||||||
|
@ -750,8 +732,7 @@ function topic_review ($topic_id)
|
||||||
// Fetch posts data
|
// Fetch posts data
|
||||||
$review_posts = DB()->fetch_rowset("
|
$review_posts = DB()->fetch_rowset("
|
||||||
SELECT
|
SELECT
|
||||||
p.*,
|
p.*, pt.post_text
|
||||||
pt.post_text, pt.bbcode_uid,
|
|
||||||
IF(p.poster_id = ". ANONYMOUS .", p.post_username, u.username) AS username, u.user_id
|
IF(p.poster_id = ". ANONYMOUS .", p.post_username, u.username) AS username, u.user_id
|
||||||
FROM
|
FROM
|
||||||
". BB_POSTS ." p,
|
". BB_POSTS ." p,
|
||||||
|
|
|
@ -193,7 +193,7 @@ class report_privmsg extends report_module
|
||||||
//
|
//
|
||||||
function subject_details_obtain($report_subject)
|
function subject_details_obtain($report_subject)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT p.privmsgs_subject, p.privmsgs_from_userid, p.privmsgs_enable_bbcode, p.privmsgs_enable_smilies, pt.privmsgs_bbcode_uid, pt.privmsgs_text, u.username
|
$sql = 'SELECT p.privmsgs_subject, p.privmsgs_from_userid, p.privmsgs_enable_bbcode, p.privmsgs_enable_smilies, pt.privmsgs_text, u.username
|
||||||
FROM ' . BB_PRIVMSGS . ' p
|
FROM ' . BB_PRIVMSGS . ' p
|
||||||
INNER JOIN ' . BB_PRIVMSGS_TEXT . ' pt
|
INNER JOIN ' . BB_PRIVMSGS_TEXT . ' pt
|
||||||
ON pt.privmsgs_text_id = privmsgs_id
|
ON pt.privmsgs_text_id = privmsgs_id
|
||||||
|
|
|
@ -1527,6 +1527,6 @@ $lang['TRACKER_S'] = 'on tracker';
|
||||||
|
|
||||||
// copyright
|
// copyright
|
||||||
$lang['NOTICE'] = '!ATTENTION!';
|
$lang['NOTICE'] = '!ATTENTION!';
|
||||||
$lang['POWERED'] = 'Powered by <a target="_blank" href="http://torrentpier.me">TorrentPier</a> © <strong>Meithar</strong>';
|
$lang['POWERED'] = 'Powered by <a target="_blank" href="http://torrentpier.me">TorrentPier</a> © Meithar';
|
||||||
$lang['DIVE'] = 'The forum is submitted on base <a target="_blank" href="http://www.phpbb.com">phpBB</a> © phpBB Group';
|
$lang['DIVE'] = 'The forum is submitted on base <a target="_blank" href="http://www.phpbb.com">phpBB</a> © phpBB Group';
|
||||||
$lang['COPY'] = 'The site does not give electronic versions of products, and is engaged only in a collecting and cataloguing of the references sent and published at a forum by our readers. If you are the legal owner of any submitted material and do not wish that the reference to him{it} was in our catalogue, contact us and we shall immediately remove her. Files for an exchange on tracker are given by users of a site, and the administration does not bear the responsibility for their maintenance. The request to not fill in the files protected by copyrights, and also files of the illegal maintenance!';
|
$lang['COPY'] = 'The site does not give electronic versions of products, and is engaged only in a collecting and cataloguing of the references sent and published at a forum by our readers. If you are the legal owner of any submitted material and do not wish that the reference to him{it} was in our catalogue, contact us and we shall immediately remove her. Files for an exchange on tracker are given by users of a site, and the administration does not bear the responsibility for their maintenance. The request to not fill in the files protected by copyrights, and also files of the illegal maintenance!';
|
|
@ -1534,6 +1534,6 @@ $lang['TRACKER_S'] = 'по трекеру';
|
||||||
|
|
||||||
// copyright
|
// copyright
|
||||||
$lang['NOTICE'] = '!ВНИМАНИЕ!';
|
$lang['NOTICE'] = '!ВНИМАНИЕ!';
|
||||||
$lang['POWERED'] = 'Powered by <a target="_blank" href="http://torrentpier.me">TorrentPier</a> © <strong>Meithar</strong>';
|
$lang['POWERED'] = 'Powered by <a target="_blank" href="http://torrentpier.me">TorrentPier</a> © Meithar';
|
||||||
$lang['DIVE'] = 'Форум представлен на базе <a target="_blank" href="http://www.phpbb.com">phpBB</a> © phpBB Group';
|
$lang['DIVE'] = 'Форум представлен на базе <a target="_blank" href="http://www.phpbb.com">phpBB</a> © phpBB Group';
|
||||||
$lang['COPY'] = 'Сайт не предоставляет электронные версии произведений, а занимается лишь коллекционированием и каталогизацией ссылок, присылаемых и публикуемых на форуме нашими читателями. Если вы являетесь правообладателем какого-либо представленного материала и не желаете чтобы ссылка на него находилась в нашем каталоге, свяжитесь с нами и мы незамедлительно удалим её. Файлы для обмена на трекере предоставлены пользователями сайта, и администрация не несёт ответственности за их содержание. Просьба не заливать файлы, защищенные авторскими правами, а также файлы нелегального содержания!';
|
$lang['COPY'] = 'Сайт не предоставляет электронные версии произведений, а занимается лишь коллекционированием и каталогизацией ссылок, присылаемых и публикуемых на форуме нашими читателями. Если вы являетесь правообладателем какого-либо представленного материала и не желаете чтобы ссылка на него находилась в нашем каталоге, свяжитесь с нами и мы незамедлительно удалим её. Файлы для обмена на трекере предоставлены пользователями сайта, и администрация не несёт ответственности за их содержание. Просьба не заливать файлы, защищенные авторскими правами, а также файлы нелегального содержания!';
|
|
@ -542,7 +542,7 @@ switch ($mode)
|
||||||
//mpd end
|
//mpd end
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql = "SELECT u.username, p.*, pt.post_text, pt.bbcode_uid, pt.post_subject, p.post_username
|
$sql = "SELECT u.username, p.*, pt.post_text, pt.post_subject, p.post_username
|
||||||
FROM " . BB_POSTS . " p, " . BB_USERS . " u, " . BB_POSTS_TEXT . " pt
|
FROM " . BB_POSTS . " p, " . BB_USERS . " u, " . BB_POSTS_TEXT . " pt
|
||||||
WHERE p.topic_id = $topic_id
|
WHERE p.topic_id = $topic_id
|
||||||
AND p.poster_id = u.user_id
|
AND p.poster_id = u.user_id
|
||||||
|
@ -575,7 +575,6 @@ switch ($mode)
|
||||||
|
|
||||||
$post_date = bb_date($postrow[$i]['post_time']);
|
$post_date = bb_date($postrow[$i]['post_time']);
|
||||||
|
|
||||||
$bbcode_uid = $postrow[$i]['bbcode_uid'];
|
|
||||||
$message = $postrow[$i]['post_text'];
|
$message = $postrow[$i]['post_text'];
|
||||||
$post_subject = ( isset($postrow[$i]['post_subject']) ) ? $postrow[$i]['post_subject'] : $topic_title;
|
$post_subject = ( isset($postrow[$i]['post_subject']) ) ? $postrow[$i]['post_subject'] : $topic_title;
|
||||||
|
|
||||||
|
|
|
@ -292,26 +292,6 @@ if ($mode == 'newtopic' && $topic_tpl && $post_info['topic_tpl_id'])
|
||||||
require(INC_DIR .'topic_templates.php');
|
require(INC_DIR .'topic_templates.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
// BBCode
|
|
||||||
if (!$bb_cfg['allow_bbcode'])
|
|
||||||
{
|
|
||||||
$bbcode_on = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$bbcode_on = ($submit || $refresh) ? (int) empty($_POST['disable_bbcode']) : $bb_cfg['allow_bbcode'];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Smilies
|
|
||||||
if (!$bb_cfg['allow_smilies'])
|
|
||||||
{
|
|
||||||
$smilies_on = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$smilies_on = ($submit || $refresh) ? (int) empty($_POST['disable_smilies']) : $bb_cfg['allow_smilies'];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Notify
|
// Notify
|
||||||
if ($submit || $refresh)
|
if ($submit || $refresh)
|
||||||
{
|
{
|
||||||
|
@ -346,7 +326,7 @@ if (!IS_GUEST && $mode != 'newtopic' && ($submit || $preview || $mode == 'quote'
|
||||||
{
|
{
|
||||||
if ($topic_last_read = max(intval(@$tracking_topics[$topic_id]), intval(@$tracking_forums[$forum_id])))
|
if ($topic_last_read = max(intval(@$tracking_topics[$topic_id]), intval(@$tracking_forums[$forum_id])))
|
||||||
{
|
{
|
||||||
$sql = "SELECT p.*, pt.post_text, pt.bbcode_uid, u.username
|
$sql = "SELECT p.*, pt.post_text, u.username
|
||||||
FROM ". BB_POSTS ." p, ". BB_POSTS_TEXT ." pt, ". BB_USERS ." u
|
FROM ". BB_POSTS ." p, ". BB_POSTS_TEXT ." pt, ". BB_USERS ." u
|
||||||
WHERE p.topic_id = ". (int) $topic_id ."
|
WHERE p.topic_id = ". (int) $topic_id ."
|
||||||
AND u.user_id = p.poster_id
|
AND u.user_id = p.poster_id
|
||||||
|
@ -507,15 +487,14 @@ else if ( ($submit || $confirm) && !$topic_has_new_posts )
|
||||||
$poll_title = ( isset($_POST['poll_title']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_title'] : '';
|
$poll_title = ( isset($_POST['poll_title']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_title'] : '';
|
||||||
$poll_options = ( isset($_POST['poll_option_text']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_option_text'] : '';
|
$poll_options = ( isset($_POST['poll_option_text']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_option_text'] : '';
|
||||||
$poll_length = ( isset($_POST['poll_length']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_length'] : '';
|
$poll_length = ( isset($_POST['poll_length']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_length'] : '';
|
||||||
$bbcode_uid = '';
|
|
||||||
|
|
||||||
prepare_post($mode, $post_data, $bbcode_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length);
|
prepare_post($mode, $post_data, $error_msg, $username, $subject, $message, $poll_title, $poll_options, $poll_length);
|
||||||
|
|
||||||
if (!$error_msg)
|
if (!$error_msg)
|
||||||
{
|
{
|
||||||
$topic_type = ( isset($post_data['topic_type']) && $topic_type != $post_data['topic_type'] && !$is_auth['auth_sticky'] && !$is_auth['auth_announce'] ) ? $post_data['topic_type'] : $topic_type;
|
$topic_type = ( isset($post_data['topic_type']) && $topic_type != $post_data['topic_type'] && !$is_auth['auth_sticky'] && !$is_auth['auth_announce'] ) ? $post_data['topic_type'] : $topic_type;
|
||||||
|
|
||||||
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length, $update_post_time);
|
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length, $update_post_time);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -677,22 +656,6 @@ else
|
||||||
$subject = ( $post_data['first_post'] ) ? $post_info['topic_title'] : $post_info['post_subject'];
|
$subject = ( $post_data['first_post'] ) ? $post_info['topic_title'] : $post_info['post_subject'];
|
||||||
$message = $post_info['post_text'];
|
$message = $post_info['post_text'];
|
||||||
|
|
||||||
if ( $mode == 'editpost' )
|
|
||||||
{
|
|
||||||
$attach_sig = $post_info['enable_sig'];
|
|
||||||
$bbcode_on = $post_info['enable_bbcode'];
|
|
||||||
$smilies_on = $post_info['enable_smilies'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$attach_sig = bf($userdata['user_opt'], 'user_opt', 'attachsig');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $post_info['bbcode_uid'] != '' )
|
|
||||||
{
|
|
||||||
$message = preg_replace('/\:(([a-z0-9]:)?)' . $post_info['bbcode_uid'] . '/s', '', $message);
|
|
||||||
}
|
|
||||||
|
|
||||||
$message = str_replace('<', '<', $message);
|
$message = str_replace('<', '<', $message);
|
||||||
$message = str_replace('>', '>', $message);
|
$message = str_replace('>', '>', $message);
|
||||||
$message = str_replace('<br />', "\n", $message);
|
$message = str_replace('<br />', "\n", $message);
|
||||||
|
@ -877,15 +840,12 @@ if ($mode == 'editpost' && $post_data['last_post'] && !$post_data['first_post'])
|
||||||
//
|
//
|
||||||
// Output the data to the template
|
// Output the data to the template
|
||||||
//
|
//
|
||||||
$bbcode_status = ($bb_cfg['allow_bbcode']) ? $lang['BBCODE_IS_ON'] : $lang['BBCODE_IS_OFF'];
|
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'USERNAME' => @$username,
|
'USERNAME' => @$username,
|
||||||
'CAPTCHA_HTML' => (IS_GUEST) ? CAPTCHA()->get_html() : '',
|
'CAPTCHA_HTML' => (IS_GUEST) ? CAPTCHA()->get_html() : '',
|
||||||
'SUBJECT' => $subject,
|
'SUBJECT' => $subject,
|
||||||
'MESSAGE' => $message,
|
'MESSAGE' => $message,
|
||||||
'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="'."faq.php?mode=bbcode".'" target="_phpbbcode">', '</a>'),
|
|
||||||
'SMILIES_STATUS' => ($bb_cfg['allow_smilies']) ? $lang['SMILIES_ARE_ON'] : $lang['SMILIES_ARE_OFF'],
|
|
||||||
|
|
||||||
'L_SUBJECT' => $lang['SUBJECT'],
|
'L_SUBJECT' => $lang['SUBJECT'],
|
||||||
'L_MESSAGE_BODY' => $lang['MESSAGE_BODY'],
|
'L_MESSAGE_BODY' => $lang['MESSAGE_BODY'],
|
||||||
|
@ -938,9 +898,6 @@ $template->assign_vars(array(
|
||||||
|
|
||||||
'U_VIEWTOPIC' => ( $mode == 'reply' ) ? append_sid("viewtopic.php?" . POST_TOPIC_URL . "=$topic_id&postorder=desc") : '',
|
'U_VIEWTOPIC' => ( $mode == 'reply' ) ? append_sid("viewtopic.php?" . POST_TOPIC_URL . "=$topic_id&postorder=desc") : '',
|
||||||
|
|
||||||
'S_BBCODE_CHECKED' => ( !$bbcode_on ) ? 'checked="checked"' : '',
|
|
||||||
'S_SMILIES_CHECKED' => ( !$smilies_on ) ? 'checked="checked"' : '',
|
|
||||||
'S_SIGNATURE_CHECKED' => ( $attach_sig ) ? 'checked="checked"' : '',
|
|
||||||
'S_NOTIFY_CHECKED' => ( $notify_user ) ? 'checked="checked"' : '',
|
'S_NOTIFY_CHECKED' => ( $notify_user ) ? 'checked="checked"' : '',
|
||||||
'S_TYPE_TOGGLE' => $topic_type_toggle,
|
'S_TYPE_TOGGLE' => $topic_type_toggle,
|
||||||
'S_TOPIC_ID' => $topic_id,
|
'S_TOPIC_ID' => $topic_id,
|
||||||
|
|
|
@ -174,7 +174,7 @@ if ( $mode == 'read' )
|
||||||
//
|
//
|
||||||
// Major query obtains the message ...
|
// Major query obtains the message ...
|
||||||
//
|
//
|
||||||
$sql = "SELECT u.username AS username_1, u.user_id AS user_id_1, u2.username AS username_2, u2.user_id AS user_id_2, u.user_posts, u.user_from, u.user_email, u.user_regdate, u.user_rank, u.user_avatar, pm.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text
|
$sql = "SELECT u.username AS username_1, u.user_id AS user_id_1, u2.username AS username_2, u2.user_id AS user_id_2, u.user_posts, u.user_from, u.user_email, u.user_regdate, u.user_rank, u.user_avatar, pm.*, pmt.privmsgs_text
|
||||||
FROM " . BB_PRIVMSGS . " pm, " . BB_PRIVMSGS_TEXT . " pmt, " . BB_USERS . " u, " . BB_USERS . " u2
|
FROM " . BB_PRIVMSGS . " pm, " . BB_PRIVMSGS_TEXT . " pmt, " . BB_USERS . " u, " . BB_USERS . " u2
|
||||||
WHERE pm.privmsgs_id = $privmsgs_id
|
WHERE pm.privmsgs_id = $privmsgs_id
|
||||||
AND pmt.privmsgs_text_id = pm.privmsgs_id
|
AND pmt.privmsgs_text_id = pm.privmsgs_id
|
||||||
|
@ -288,8 +288,8 @@ if ( $mode == 'read' )
|
||||||
|
|
||||||
$privmsg_sent_id = DB()->sql_nextid();
|
$privmsg_sent_id = DB()->sql_nextid();
|
||||||
|
|
||||||
$sql = "INSERT INTO " . BB_PRIVMSGS_TEXT . " (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text)
|
$sql = "INSERT INTO " . BB_PRIVMSGS_TEXT . " (privmsgs_text_id, privmsgs_text)
|
||||||
VALUES ($privmsg_sent_id, '" . $privmsg['privmsgs_bbcode_uid'] . "', '" . str_replace("\'", "''", addslashes($privmsg['privmsgs_text'])) . "')";
|
VALUES ($privmsg_sent_id, '" . str_replace("\'", "''", addslashes($privmsg['privmsgs_text'])) . "')";
|
||||||
if ( !DB()->sql_query($sql) )
|
if ( !DB()->sql_query($sql) )
|
||||||
{
|
{
|
||||||
message_die(GENERAL_ERROR, 'Could not insert private message sent text', '', __LINE__, __FILE__, $sql);
|
message_die(GENERAL_ERROR, 'Could not insert private message sent text', '', __LINE__, __FILE__, $sql);
|
||||||
|
@ -473,12 +473,6 @@ if ( $mode == 'read' )
|
||||||
$post_subject = htmlCHR($privmsg['privmsgs_subject']);
|
$post_subject = htmlCHR($privmsg['privmsgs_subject']);
|
||||||
|
|
||||||
$private_message = $privmsg['privmsgs_text'];
|
$private_message = $privmsg['privmsgs_text'];
|
||||||
$bbcode_uid = $privmsg['privmsgs_bbcode_uid'];
|
|
||||||
|
|
||||||
if ( $bbcode_uid != '' )
|
|
||||||
{
|
|
||||||
$private_message = ( $bb_cfg['allow_bbcode'] ) ? bbencode_second_pass($private_message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $private_message);
|
|
||||||
}
|
|
||||||
|
|
||||||
$orig_word = array();
|
$orig_word = array();
|
||||||
$replacement_word = array();
|
$replacement_word = array();
|
||||||
|
@ -490,7 +484,7 @@ if ( $mode == 'read' )
|
||||||
$private_message = preg_replace($orig_word, $replacement_word, $private_message);
|
$private_message = preg_replace($orig_word, $replacement_word, $private_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
$private_message = str_replace("\n", '<br />', $private_message);
|
$private_message = bbcode2html($private_message);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Dump it to the templating engine
|
// Dump it to the templating engine
|
||||||
|
@ -1027,7 +1021,7 @@ else if ( $submit || $refresh || $mode != '' )
|
||||||
{
|
{
|
||||||
if ( !$error )
|
if ( !$error )
|
||||||
{
|
{
|
||||||
$privmsg_message = bbcode2html($_POST['message']);
|
$privmsg_message = DB()->escape($_POST['message']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1118,13 +1112,13 @@ else if ( $submit || $refresh || $mode != '' )
|
||||||
{
|
{
|
||||||
$privmsg_sent_id = DB()->sql_nextid();
|
$privmsg_sent_id = DB()->sql_nextid();
|
||||||
|
|
||||||
$sql = "INSERT INTO " . BB_PRIVMSGS_TEXT . " (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text)
|
$sql = "INSERT INTO " . BB_PRIVMSGS_TEXT . " (privmsgs_text_id, privmsgs_text)
|
||||||
VALUES ($privmsg_sent_id, '" . @$bbcode_uid . "', '" . str_replace("\'", "''", $privmsg_message) . "')";
|
VALUES ($privmsg_sent_id, '" . str_replace("\'", "''", $privmsg_message) . "')";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql = "UPDATE " . BB_PRIVMSGS_TEXT . "
|
$sql = "UPDATE " . BB_PRIVMSGS_TEXT . "
|
||||||
SET privmsgs_text = '" . str_replace("\'", "''", $privmsg_message) . "', privmsgs_bbcode_uid = '$bbcode_uid'
|
SET privmsgs_text = '" . str_replace("\'", "''", $privmsg_message) . "'
|
||||||
WHERE privmsgs_text_id = $privmsg_id";
|
WHERE privmsgs_text_id = $privmsg_id";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1188,7 +1182,6 @@ else if ( $submit || $refresh || $mode != '' )
|
||||||
}
|
}
|
||||||
else if ( $preview || $refresh || $error )
|
else if ( $preview || $refresh || $error )
|
||||||
{
|
{
|
||||||
|
|
||||||
//
|
//
|
||||||
// If we're previewing or refreshing then obtain the data
|
// If we're previewing or refreshing then obtain the data
|
||||||
// passed to the script, process it a little, do some checks
|
// passed to the script, process it a little, do some checks
|
||||||
|
@ -1265,7 +1258,7 @@ else if ( $submit || $refresh || $mode != '' )
|
||||||
|
|
||||||
else if ( $mode == 'edit' )
|
else if ( $mode == 'edit' )
|
||||||
{
|
{
|
||||||
$sql = "SELECT pm.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text, u.username, u.user_id
|
$sql = "SELECT pm.*, pmt.privmsgs_text, u.username, u.user_id
|
||||||
FROM " . BB_PRIVMSGS . " pm, " . BB_PRIVMSGS_TEXT . " pmt, " . BB_USERS . " u
|
FROM " . BB_PRIVMSGS . " pm, " . BB_PRIVMSGS_TEXT . " pmt, " . BB_USERS . " u
|
||||||
WHERE pm.privmsgs_id = $privmsg_id
|
WHERE pm.privmsgs_id = $privmsg_id
|
||||||
AND pmt.privmsgs_text_id = pm.privmsgs_id
|
AND pmt.privmsgs_text_id = pm.privmsgs_id
|
||||||
|
@ -1285,16 +1278,8 @@ else if ( $submit || $refresh || $mode != '' )
|
||||||
|
|
||||||
$privmsg_subject = $privmsg['privmsgs_subject'];
|
$privmsg_subject = $privmsg['privmsgs_subject'];
|
||||||
$privmsg_message = $privmsg['privmsgs_text'];
|
$privmsg_message = $privmsg['privmsgs_text'];
|
||||||
$privmsg_bbcode_uid = $privmsg['privmsgs_bbcode_uid'];
|
|
||||||
$privmsg_bbcode_enabled = ($privmsg['privmsgs_enable_bbcode'] == 1);
|
$privmsg_bbcode_enabled = ($privmsg['privmsgs_enable_bbcode'] == 1);
|
||||||
|
|
||||||
if ( $privmsg_bbcode_enabled )
|
|
||||||
{
|
|
||||||
$privmsg_message = preg_replace("/\:(([a-z0-9]:)?)$privmsg_bbcode_uid/si", '', $privmsg_message);
|
|
||||||
}
|
|
||||||
|
|
||||||
$privmsg_message = str_replace('<br />', "\n", $privmsg_message);
|
|
||||||
|
|
||||||
$to_username = $privmsg['username'];
|
$to_username = $privmsg['username'];
|
||||||
$to_userid = $privmsg['user_id'];
|
$to_userid = $privmsg['user_id'];
|
||||||
|
|
||||||
|
@ -1302,7 +1287,7 @@ else if ( $submit || $refresh || $mode != '' )
|
||||||
else if ( $mode == 'reply' || $mode == 'quote' )
|
else if ( $mode == 'reply' || $mode == 'quote' )
|
||||||
{
|
{
|
||||||
|
|
||||||
$sql = "SELECT pm.privmsgs_subject, pm.privmsgs_date, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text, u.username, u.user_id
|
$sql = "SELECT pm.privmsgs_subject, pm.privmsgs_date, pmt.privmsgs_text, u.username, u.user_id
|
||||||
FROM " . BB_PRIVMSGS . " pm, " . BB_PRIVMSGS_TEXT . " pmt, " . BB_USERS . " u
|
FROM " . BB_PRIVMSGS . " pm, " . BB_PRIVMSGS_TEXT . " pmt, " . BB_USERS . " u
|
||||||
WHERE pm.privmsgs_id = $privmsg_id
|
WHERE pm.privmsgs_id = $privmsg_id
|
||||||
AND pmt.privmsgs_text_id = pm.privmsgs_id
|
AND pmt.privmsgs_text_id = pm.privmsgs_id
|
||||||
|
@ -1326,10 +1311,6 @@ else if ( $submit || $refresh || $mode != '' )
|
||||||
if ( $mode == 'quote' )
|
if ( $mode == 'quote' )
|
||||||
{
|
{
|
||||||
$privmsg_message = $privmsg['privmsgs_text'];
|
$privmsg_message = $privmsg['privmsgs_text'];
|
||||||
$privmsg_bbcode_uid = $privmsg['privmsgs_bbcode_uid'];
|
|
||||||
|
|
||||||
$privmsg_message = preg_replace("/\:(([a-z0-9]:)?)$privmsg_bbcode_uid/si", '', $privmsg_message);
|
|
||||||
$privmsg_message = str_replace('<br />', "\n", $privmsg_message);
|
|
||||||
|
|
||||||
$msg_date = bb_date($privmsg['privmsgs_date']);
|
$msg_date = bb_date($privmsg['privmsgs_date']);
|
||||||
|
|
||||||
|
@ -1422,32 +1403,6 @@ else if ( $submit || $refresh || $mode != '' )
|
||||||
$template->assign_block_vars('switch_privmsg', array());
|
$template->assign_block_vars('switch_privmsg', array());
|
||||||
$template->assign_var('POSTING_USERNAME');
|
$template->assign_var('POSTING_USERNAME');
|
||||||
|
|
||||||
//
|
|
||||||
// BBCode toggle selection
|
|
||||||
//
|
|
||||||
if ( $bb_cfg['allow_bbcode'] )
|
|
||||||
{
|
|
||||||
$bbcode_status = $lang['BBCODE_IS_ON'];
|
|
||||||
$template->assign_block_vars('switch_bbcode_checkbox', array());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$bbcode_status = $lang['BBCODE_IS_OFF'];
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Smilies toggle selection
|
|
||||||
//
|
|
||||||
if ( $bb_cfg['allow_smilies'] )
|
|
||||||
{
|
|
||||||
$smilies_status = $lang['SMILIES_ARE_ON'];
|
|
||||||
$template->assign_block_vars('switch_smilies_checkbox', array());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$smilies_status = $lang['SMILIES_ARE_OFF'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$post_a = ' ';
|
$post_a = ' ';
|
||||||
if ( $mode == 'post' )
|
if ( $mode == 'post' )
|
||||||
{
|
{
|
||||||
|
@ -1524,10 +1479,6 @@ else if ( $submit || $refresh || $mode != '' )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//
|
|
||||||
// Default page
|
|
||||||
//
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Reset PM counters
|
// Reset PM counters
|
||||||
//
|
//
|
||||||
|
|
|
@ -488,7 +488,7 @@ if ($post_mode)
|
||||||
t.*,
|
t.*,
|
||||||
p.*,
|
p.*,
|
||||||
h.post_html, IF(h.post_html IS NULL, pt.post_text, NULL) AS post_text,
|
h.post_html, IF(h.post_html IS NULL, pt.post_text, NULL) AS post_text,
|
||||||
pt.post_subject, pt.bbcode_uid,
|
pt.post_subject,
|
||||||
IF(p.poster_id = $anon_id, p.post_username, u.username) AS username, u.user_id
|
IF(p.poster_id = $anon_id, p.post_username, u.username) AS username, u.user_id
|
||||||
FROM $posts_tbl
|
FROM $posts_tbl
|
||||||
INNER JOIN $topics_tbl ON(t.topic_id = p.topic_id)
|
INNER JOIN $topics_tbl ON(t.topic_id = p.topic_id)
|
||||||
|
|
|
@ -119,30 +119,11 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1 vTop pad_4" valign="top">
|
<td class="row1 vTop pad_4" valign="top">
|
||||||
<p><b>{L_OPTIONS}</b></p>
|
<p><b>{L_OPTIONS}</b></p>
|
||||||
<p class="small mrg_4">
|
|
||||||
{BBCODE_STATUS}<br />
|
|
||||||
{SMILIES_STATUS}<br />
|
|
||||||
</p>
|
|
||||||
</td>
|
</td>
|
||||||
<td class="row2">
|
<td class="row2">
|
||||||
|
|
||||||
<div class="floatL">
|
|
||||||
<table class="borderless">
|
|
||||||
<tr>
|
|
||||||
<td><input type="checkbox" id="disable_bbcode" name="disable_bbcode" {S_BBCODE_CHECKED} <!-- IF not $bb_cfg['allow_bbcode'] -->disabled="disabled"<!-- ENDIF --> /></td>
|
|
||||||
<td><label for="disable_bbcode">{L_DISABLE_BBCODE}</label></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><input type="checkbox" id="disable_smilies" name="disable_smilies" {S_SMILIES_CHECKED} <!-- IF not $bb_cfg['allow_smilies'] -->checked="checked" disabled="disabled"<!-- ENDIF --> /></td>
|
|
||||||
<td><label for="disable_smilies">{L_DISABLE_SMILIES}</label></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- IF IN_PM -->
|
<!-- IF IN_PM -->
|
||||||
<!-- ELSEIF LOGGED_IN -->
|
<!-- ELSEIF LOGGED_IN -->
|
||||||
<div class="floatL"> </div>
|
|
||||||
|
|
||||||
<div class="floatL">
|
<div class="floatL">
|
||||||
<table class="borderless inline">
|
<table class="borderless inline">
|
||||||
<!-- IF SHOW_UPDATE_POST_TIME -->
|
<!-- IF SHOW_UPDATE_POST_TIME -->
|
||||||
|
@ -151,10 +132,6 @@
|
||||||
<td><label for="update_post_time">{L_UPDATE_POST_TIME}</label></td>
|
<td><label for="update_post_time">{L_UPDATE_POST_TIME}</label></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<tr>
|
|
||||||
<td><input type="checkbox" id="attach_sig" name="attach_sig" {S_SIGNATURE_CHECKED} /></td>
|
|
||||||
<td><label for="attach_sig">{L_ATTACH_SIGNATURE}</label></td>
|
|
||||||
</tr>
|
|
||||||
<!-- IF SHOW_NOTIFY_CHECKBOX -->
|
<!-- IF SHOW_NOTIFY_CHECKBOX -->
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" id="notify" name="notify" {S_NOTIFY_CHECKED} /></td>
|
<td><input type="checkbox" id="notify" name="notify" {S_NOTIFY_CHECKED} /></td>
|
||||||
|
|
|
@ -341,25 +341,8 @@ function set_hid_chbox (id)
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="post_opt" class="row2">
|
<tr id="post_opt" class="row2">
|
||||||
<td class="td2 med tCenter pad_4">
|
<td class="td2 med tCenter pad_4">
|
||||||
|
<label><input type="checkbox" name="notify" <!-- IF QR_NOTIFY_CHECKED -->checked="checked"<!-- ENDIF --> <!-- IF not LOGGED_IN -->disabled="disabled"<!-- ENDIF --> />
|
||||||
{L_QR_DISABLE}:
|
{L_QR_NOTIFY} </label>
|
||||||
|
|
||||||
<label><input type="checkbox" name="disable_bbcode" <!-- IF not $bb_cfg['allow_bbcode'] -->checked="checked" disabled="disabled"<!-- ENDIF --> />
|
|
||||||
BBCode </label>
|
|
||||||
|
|
||||||
<label><input type="checkbox" name="disable_smilies" <!-- IF not $bb_cfg['allow_smilies'] -->checked="checked" disabled="disabled"<!-- ENDIF --> />
|
|
||||||
Smilies </label>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<label><input type="checkbox" name="attach_sig" <!-- IF QR_ATTACHSIG_CHECKED -->checked="checked"<!-- ENDIF --> <!-- IF not LOGGED_IN -->disabled="disabled"<!-- ENDIF --> />
|
|
||||||
{L_QR_ATTACHSIG} </label>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<label><input type="checkbox" name="notify" <!-- IF QR_NOTIFY_CHECKED -->checked="checked"<!-- ENDIF --> <!-- IF not LOGGED_IN -->disabled="disabled"<!-- ENDIF --> />
|
|
||||||
{L_QR_NOTIFY} </label>
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table><!--/topic_quick_reply-->
|
</table><!--/topic_quick_reply-->
|
||||||
|
|
|
@ -371,11 +371,11 @@ $post_order = (isset($_POST['postorder']) && $_POST['postorder'] !== 'asc') ? 'd
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT
|
SELECT
|
||||||
u.username, u.user_id, u.user_posts, u.user_from, u.user_from_flag,
|
u.username, u.user_id, u.user_posts, u.user_from, u.user_from_flag,
|
||||||
u.user_regdate, u.user_rank, u.user_sig, u.user_sig_bbcode_uid,
|
u.user_regdate, u.user_rank, u.user_sig,
|
||||||
u.user_avatar, u.user_avatar_type, u.user_allowavatar,
|
u.user_avatar, u.user_avatar_type, u.user_allowavatar,
|
||||||
p.*,
|
p.*,
|
||||||
h.post_html, IF(h.post_html IS NULL, pt.post_text, NULL) AS post_text,
|
h.post_html, IF(h.post_html IS NULL, pt.post_text, NULL) AS post_text,
|
||||||
pt.post_subject, pt.bbcode_uid
|
pt.post_subject
|
||||||
FROM ". BB_POSTS ." p
|
FROM ". BB_POSTS ." p
|
||||||
LEFT JOIN ". BB_USERS ." u ON(u.user_id = p.poster_id)
|
LEFT JOIN ". BB_USERS ." u ON(u.user_id = p.poster_id)
|
||||||
LEFT JOIN ". BB_POSTS_TEXT ." pt ON(pt.post_id = p.post_id)
|
LEFT JOIN ". BB_POSTS_TEXT ." pt ON(pt.post_id = p.post_id)
|
||||||
|
@ -870,8 +870,6 @@ for($i = 0; $i < $total_posts; $i++)
|
||||||
|
|
||||||
$message = get_parsed_post($postrow[$i]);
|
$message = get_parsed_post($postrow[$i]);
|
||||||
|
|
||||||
$bbcode_uid = $postrow[$i]['bbcode_uid'];
|
|
||||||
|
|
||||||
$user_sig = ($bb_cfg['allow_sig'] && !$user->opt_js['h_sig'] && $postrow[$i]['enable_sig'] && $postrow[$i]['user_sig']) ? $postrow[$i]['user_sig'] : '';
|
$user_sig = ($bb_cfg['allow_sig'] && !$user->opt_js['h_sig'] && $postrow[$i]['enable_sig'] && $postrow[$i]['user_sig']) ? $postrow[$i]['user_sig'] : '';
|
||||||
|
|
||||||
if ($user_sig)
|
if ($user_sig)
|
||||||
|
@ -1044,7 +1042,6 @@ if ($bb_cfg['show_quick_reply'])
|
||||||
if (!IS_GUEST)
|
if (!IS_GUEST)
|
||||||
{
|
{
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'QR_ATTACHSIG_CHECKED' => bf($userdata['user_opt'], 'user_opt', 'attachsig'),
|
|
||||||
'QR_NOTIFY_CHECKED' => ($userdata['user_notify'] || $is_watching_topic),
|
'QR_NOTIFY_CHECKED' => ($userdata['user_notify'] || $is_watching_topic),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue