diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-12-16 13:47:16 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-12-16 13:47:16 +0000 |
| commit | 652b7d323c973fb8dd3dad7f59006c48febdaba0 (patch) | |
| tree | 61ba9fcb50609fe644d668510104ef5167970e25 /phpBB | |
| parent | 5bf5404cd01c992f2f74c847078c07eaa20f77f2 (diff) | |
| download | forums-652b7d323c973fb8dd3dad7f59006c48febdaba0.tar forums-652b7d323c973fb8dd3dad7f59006c48febdaba0.tar.gz forums-652b7d323c973fb8dd3dad7f59006c48febdaba0.tar.bz2 forums-652b7d323c973fb8dd3dad7f59006c48febdaba0.tar.xz forums-652b7d323c973fb8dd3dad7f59006c48febdaba0.zip | |
Re-jiggle some unread/read/newest topic stuff
git-svn-id: file:///svn/phpbb/trunk@1606 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
| -rw-r--r-- | phpBB/viewforum.php | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 402c440ab2..12afa21e3a 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -515,57 +515,59 @@ if( $total_topics ) $newest_post_img = ""; if( $userdata['session_logged_in'] ) { - if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"]) || - isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_$forum_id"]) || - isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_all"]) ) + if( $topic_rowset[$i]['post_time'] > $userdata['user_lastvisit'] ) { + if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"]) || + isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_$forum_id"]) || + isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_all"]) ) + { - $unread_topics = true; + $unread_topics = true; - if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"]) ) - { - if( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"] > $topic_rowset[$i]['post_time'] ) + if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"]) ) { - $unread_topics = false; + if( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"] > $topic_rowset[$i]['post_time'] ) + { + $unread_topics = false; + } } - } - if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_$forum_id"]) ) - { - if( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_$forum_id"] > $topic_rowset[$i]['post_time'] ) + if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_$forum_id"]) ) { - $unread_topics = false; + if( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_$forum_id"] > $topic_rowset[$i]['post_time'] ) + { + $unread_topics = false; + } } - } - if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_all"]) ) - { - if( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_all"] > $topic_rowset[$i]['post_time'] ) + if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_all"]) ) { - $unread_topics = false; + if( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_all"] > $topic_rowset[$i]['post_time'] ) + { + $unread_topics = false; + } } - } - if( $unread_topics ) - { - $folder_image = "<img src=\"$folder_new\" alt=\"" . $lang['New_posts'] . "\" title=\"" . $lang['New_posts'] . "\" />"; + if( $unread_topics ) + { + $folder_image = "<img src=\"$folder_new\" alt=\"" . $lang['New_posts'] . "\" title=\"" . $lang['New_posts'] . "\" />"; - $newest_post_img = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest\"><img src=\"" . $images['icon_newest_reply'] . "\" alt=\"" . $lang['View_newest_post'] . "\" title=\"" . $lang['View_newest_post'] . "\" border=\"0\" /></a> "; + $newest_post_img = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest\"><img src=\"" . $images['icon_newest_reply'] . "\" alt=\"" . $lang['View_newest_post'] . "\" title=\"" . $lang['View_newest_post'] . "\" border=\"0\" /></a> "; + } + else + { + $folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts']; + + $folder_image = "<img src=\"$folder\" alt=\"$folder_alt\" title=\"$folder_alt\" border=\"0\" />"; + $newest_post_img = ""; + } } else { - $folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts']; + $folder_image = "<img src=\"$folder_new\" alt=\"" . $lang['New_posts'] . "\" title=\"" . $lang['New_posts'] . "\" />"; - $folder_image = "<img src=\"$folder\" alt=\"$folder_alt\" title=\"$folder_alt\" border=\"0\" />"; - $newest_post_img = ""; + $newest_post_img = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest\"><img src=\"" . $images['icon_newest_reply'] . "\" alt=\"" . $lang['View_newest_post'] . "\" title=\"" . $lang['View_newest_post'] . "\" border=\"0\" /></a> "; } - - } - else if( $topic_rowset[$i]['post_time'] > $userdata['user_lastvisit'] ) - { - $folder_image = "<img src=\"$folder_new\" alt=\"" . $lang['New_posts'] . "\" title=\"" . $lang['New_posts'] . "\" />"; - - $newest_post_img = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest\"><img src=\"" . $images['icon_newest_reply'] . "\" alt=\"" . $lang['View_newest_post'] . "\" title=\"" . $lang['View_newest_post'] . "\" border=\"0\" /></a> "; } else { |
