|
From: Jon O. <jon...@us...> - 2007-09-09 20:33:29
|
Update of /cvsroot/mxbb/mx_profilecp/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29066/includes Modified Files: functions_topics_list.php Log Message: for 2.9.x Index: functions_topics_list.php =================================================================== RCS file: /cvsroot/mxbb/mx_profilecp/includes/functions_topics_list.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** functions_topics_list.php 5 Apr 2006 23:04:41 -0000 1.6 --- functions_topics_list.php 9 Sep 2007 20:33:05 -0000 1.7 *************** *** 51,61 **** // standard sql request in order to fill the topic_rowset array : // --------------------------------- ! // $sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time // FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2 // WHERE t.topic_poster = u.user_id // AND p.post_id = t.topic_first_post_id // AND p2.post_id = t.topic_last_post_id ! // AND u2.user_id = p2.poster_id ! // ORDER BY t.topic_type DESC, t.topic_last_post_id DESC // LIMIT $start, ".$board_config['topics_per_page']; // --------------------------------- --- 51,61 ---- // standard sql request in order to fill the topic_rowset array : // --------------------------------- ! // $sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time // FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2 // WHERE t.topic_poster = u.user_id // AND p.post_id = t.topic_first_post_id // AND p2.post_id = t.topic_last_post_id ! // AND u2.user_id = p2.poster_id ! // ORDER BY t.topic_type DESC, t.topic_last_post_id DESC // LIMIT $start, ".$board_config['topics_per_page']; // --------------------------------- *************** *** 132,136 **** $orig_word = array(); $replacement_word = array(); ! obtain_word_list($orig_word, $replacement_word); // read the user cookie --- 132,136 ---- $orig_word = array(); $replacement_word = array(); ! phpBB2::obtain_word_list($orig_word, $replacement_word); // read the user cookie *************** *** 182,186 **** // check the posts $s_topic_ids = implode(', ', $topic_ids); ! $sql = "SELECT DISTINCT topic_id FROM " . POSTS_TABLE . " WHERE topic_id IN ($s_topic_ids) AND poster_id = " . $userdata['user_id']; --- 182,186 ---- // check the posts $s_topic_ids = implode(', ', $topic_ids); ! $sql = "SELECT DISTINCT topic_id FROM " . POSTS_TABLE . " WHERE topic_id IN ($s_topic_ids) AND poster_id = " . $userdata['user_id']; *************** *** 261,265 **** else { ! $topic_type = ''; } if( $topic_rowset[$i]['topic_vote'] ) --- 261,265 ---- else { ! $topic_type = ''; } if( $topic_rowset[$i]['topic_vote'] ) *************** *** 326,330 **** if ( $userdata['session_logged_in'] && ($topic_item_type == POST_TOPIC_URL) ) { ! if( $topic_rowset[$i]['post_time'] > $userdata['user_lastvisit'] ) { if( !empty($tracking_topics) || !empty($tracking_forums) || !empty($tracking_all) ) --- 326,330 ---- if ( $userdata['session_logged_in'] && ($topic_item_type == POST_TOPIC_URL) ) { ! if( $topic_rowset[$i]['post_time'] > $userdata['user_lastvisit'] ) { if( !empty($tracking_topics) || !empty($tracking_forums) || !empty($tracking_all) ) *************** *** 356,360 **** $folder_image = $folder_new; $folder_alt = $lang['New_posts']; ! $newest_post_img = '<a href="' . append_sid($phpbb_root_path . "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['profilecp_icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> '; } else --- 356,360 ---- $folder_image = $folder_new; $folder_alt = $lang['New_posts']; ! $newest_post_img = '<a href="' . mx_append_sid($phpbb_root_path . "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['profilecp_icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> '; } else *************** *** 369,376 **** $folder_image = $folder_new; $folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['New_posts']; ! $newest_post_img = '<a href="' . append_sid($phpbb_root_path ."viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['profilecp_icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> '; } } ! else { $folder_image = $folder; --- 369,376 ---- $folder_image = $folder_new; $folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['New_posts']; ! $newest_post_img = '<a href="' . mx_append_sid($phpbb_root_path ."viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['profilecp_icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> '; } } ! else { $folder_image = $folder; *************** *** 396,400 **** for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page']) { ! $goto_page .= '<a href="' . append_sid($phpbb_root_path ."viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id . "&start=$j") . '">' . $times . '</a>'; if( $times == 1 && $total_pages > 4 ) { --- 396,400 ---- for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page']) { ! $goto_page .= '<a href="' . mx_append_sid($phpbb_root_path ."viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id . "&start=$j") . '">' . $times . '</a>'; if( $times == 1 && $total_pages > 4 ) { *************** *** 420,434 **** { case POST_USERS_URL: ! $view_topic_url = append_sid($phpbb_root_path ."profile.$phpEx?" . POST_USERS_URL . "=$topic_id"); break; default: ! $view_topic_url = append_sid($phpbb_root_path ."viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id"); ! $topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid($phpbb_root_path ."profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '">' : ''; $topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] ); $topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; ! $first_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['topic_time'], $board_config['board_timezone']); ! $last_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['post_time'], $board_config['board_timezone']); ! $last_post_author = ( $topic_rowset[$i]['id2'] == ANONYMOUS ) ? ( ($topic_rowset[$i]['post_username2'] != '' ) ? $topic_rowset[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid($phpbb_root_path ."profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['id2']) . '">' . $topic_rowset[$i]['user2'] . '</a>'; ! $last_post_url = '<a href="' . append_sid($phpbb_root_path ."viewtopic.$phpEx?" . POST_POST_URL . '=' . $topic_rowset[$i]['topic_last_post_id']) . '#' . $topic_rowset[$i]['topic_last_post_id'] . '"><img src="' . $images['profilecp_icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>'; $views = $topic_rowset[$i]['topic_views']; break; --- 420,434 ---- { case POST_USERS_URL: ! $view_topic_url = mx_append_sid($phpbb_root_path ."profile.$phpEx?" . POST_USERS_URL . "=$topic_id"); break; default: ! $view_topic_url = mx_append_sid($phpbb_root_path ."viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id"); ! $topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . mx_append_sid($phpbb_root_path ."profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '">' : ''; $topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] ); $topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; ! $first_post_time = phpBB2::create_date($board_config['default_dateformat'], $topic_rowset[$i]['topic_time'], $board_config['board_timezone']); ! $last_post_time = phpBB2::create_date($board_config['default_dateformat'], $topic_rowset[$i]['post_time'], $board_config['board_timezone']); ! $last_post_author = ( $topic_rowset[$i]['id2'] == ANONYMOUS ) ? ( ($topic_rowset[$i]['post_username2'] != '' ) ? $topic_rowset[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . mx_append_sid($phpbb_root_path ."profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['id2']) . '">' . $topic_rowset[$i]['user2'] . '</a>'; ! $last_post_url = '<a href="' . mx_append_sid($phpbb_root_path ."viewtopic.$phpEx?" . POST_POST_URL . '=' . $topic_rowset[$i]['topic_last_post_id']) . '#' . $topic_rowset[$i]['topic_last_post_id'] . '"><img src="' . $images['profilecp_icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>'; $views = $topic_rowset[$i]['topic_views']; break; *************** *** 450,454 **** if ($is_auth[ $topic_rowset[$i]['forum_id'] ]['auth_view']) { ! $nav_tree = '<a href="' . append_sid($phpbb_root_path ."viewforum.$phpEx?f=" . $topic_rowset[$i]['forum_id']) . '" class="gensmall">' . $topic_rowset[$i]['forum_name'] . '</a>'; } } --- 450,454 ---- if ($is_auth[ $topic_rowset[$i]['forum_id'] ]['auth_view']) { ! $nav_tree = '<a href="' . mx_append_sid($phpbb_root_path ."viewforum.$phpEx?f=" . $topic_rowset[$i]['forum_id']) . '" class="gensmall">' . $topic_rowset[$i]['forum_name'] . '</a>'; } } |