From 6695be87e82d294aa04d925b8ef880326b3352fb Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Fri, 7 Sep 2001 00:23:40 +0000 Subject: Moved signature attach toggle to DB run convert_sig to update after adding new field to DB git-svn-id: file:///svn/phpbb/trunk@998 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index c4233c0c77..723b914fb2 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -332,7 +332,7 @@ $select_post_order .= ""; // // Go ahead and pull all data for this topic // -$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_avatar, p.post_time, p.post_id, p.post_username, p.bbcode_uid, p.post_edit_time, p.post_edit_count, p.enable_bbcode, p.enable_html, p.enable_smilies, pt.post_text, pt.post_subject +$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_avatar, p.*, pt.post_text, pt.post_subject FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt WHERE p.topic_id = $topic_id AND p.poster_id = u.user_id @@ -519,6 +519,11 @@ if( !empty($forum_row['topic_vote']) ) $vote_graphic_img = $images['voting_graphic'][$vote_graphic]; $vote_graphic = ($vote_graphic < $vote_graphic_max - 1) ? $vote_graphic + 1 : 0; + if( count($orig_word) ) + { + $vote_info[$i]['vote_option_text'] = preg_replace($orig_word, $replacement_word, $vote_info[$i]['vote_option_text']); + } + $template->assign_block_vars("poll_option", array( "POLL_OPTION_CAPTION" => $vote_info[$i]['vote_option_text'], "POLL_OPTION_RESULT" => $vote_info[$i]['vote_result'], @@ -542,6 +547,11 @@ if( !empty($forum_row['topic_vote']) ) for($i = 0; $i < $vote_options; $i++) { + if( count($orig_word) ) + { + $vote_info[$i]['vote_option_text'] = preg_replace($orig_word, $replacement_word, $vote_info[$i]['vote_option_text']); + } + $template->assign_block_vars("poll_option", array( "POLL_OPTION_ID" => $vote_info[$i]['vote_option_id'], "POLL_OPTION_CAPTION" => $vote_info[$i]['vote_option_text']) @@ -558,6 +568,11 @@ if( !empty($forum_row['topic_vote']) ) $s_hidden_fields = ''; } + if( count($orig_word) ) + { + $vote_title = preg_replace($orig_word, $replacement_word, $vote_title); + } + $template->assign_vars(array( "POLL_QUESTION" => $vote_title, @@ -672,7 +687,7 @@ for($i = 0; $i < $total_posts; $i++) $aim_img = ($postrow[$i]['user_aim']) ? "\""" : ""; - $msn_img = ($postrow[$i]['user_msnm']) ? "\""" : ""; + $msn_img = ($postrow[$i]['user_msnm']) ? "\""" : ""; $yim_img = ($postrow[$i]['user_yim']) ? "\""" : ""; } @@ -704,7 +719,7 @@ for($i = 0; $i < $total_posts; $i++) if( $is_auth['auth_mod'] ) { - $ip_img = "\"""; + $ip_img = "\"""; $delpost_img = "\"""; } @@ -727,7 +742,7 @@ for($i = 0; $i < $total_posts; $i++) // if( !$board_config['allow_html'] ) { - if($user_sig != "") + if( $user_sig != "" && $postrow[$i]['enable_sig'] ) { $user_sig = preg_replace("#(<)([\/]?.*?)(>)#is", "<\\2>", $user_sig); } @@ -740,7 +755,7 @@ for($i = 0; $i < $total_posts; $i++) if( $board_config['allow_bbcode'] && $bbcode_uid != "" ) { - if($user_sig != "") + if( $user_sig != "" && $postrow[$i]['enable_sig'] ) { $sig_uid = make_bbcode_uid(); $user_sig = bbencode_first_pass($user_sig, $sig_uid); @@ -754,7 +769,10 @@ for($i = 0; $i < $total_posts; $i++) $message = preg_replace("/\:[0-9a-z\:]+\]/si", "]", $message); } - $message = ($user_sig != "") ? ereg_replace("\[addsig]$", "

_________________
" . $user_sig, $message) : ereg_replace("\[addsig]$", "", $message); + if( $postrow[$i]['enable_sig'] ) + { + $message .= "

_________________
" . $user_sig; + } if( count($orig_word) ) { @@ -865,13 +883,13 @@ if($can_watch_topic) { if($is_watching_topic) { - $s_watching_topic = "" . $lang['Stop_watching_topic'] . ""; - $s_watching_topic_img = "\"""; + $s_watching_topic = "" . $lang['Stop_watching_topic'] . ""; + $s_watching_topic_img = "\"""; } else { - $s_watching_topic = "" . $lang['Start_watching_topic'] . ""; - $s_watching_topic_img = "\"""; + $s_watching_topic = "" . $lang['Start_watching_topic'] . ""; + $s_watching_topic_img = "\"""; } } else -- cgit v1.2.1