diff options
author | deva <deva> | 2009-11-03 10:43:35 +0000 |
---|---|---|
committer | deva <deva> | 2009-11-03 10:43:35 +0000 |
commit | f8deb525437dc0995e8b0b7c693ff9bbc3bbc48c (patch) | |
tree | 603b21d0a89b34db134bed663edcb1281e628a6d /forum/utils/threads.php | |
parent | 8e8cfb2fb27c2b217144e1efaa4137254d58ed3e (diff) |
Marking of new posts. Jump-to mark of first unread.
Diffstat (limited to 'forum/utils/threads.php')
-rw-r--r-- | forum/utils/threads.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/forum/utils/threads.php b/forum/utils/threads.php index f65a1f8..0c4ef32 100644 --- a/forum/utils/threads.php +++ b/forum/utils/threads.php @@ -20,10 +20,15 @@ class Thread { public function show() { global $fid, $current_user; + $jumptonew = ""; echo " <div class=\"thread\">\n"; - if($this->lastseen[$current_user->uid] < $this->lastpost) echo " <div class=\"new\"></div>"; - else echo " <div class=\"nonew\"></div>\n"; - echo " <a href=\"?fid=" . $fid . "&tid=" . $this->tid . "\">" . $this->name . "</a>\n"; + if($this->lastseen[$current_user->uid] < $this->lastpost) { + echo " <div class=\"new\"></div>"; + $jumptonew = "#firstunread"; + } else { + echo " <div class=\"nonew\"></div>\n"; + } + echo " <a href=\"?fid=" . $fid . "&tid=" . $this->tid . $jumptonew."\">" . $this->name . "</a>\n"; echo " </div>\n"; } @@ -159,4 +164,4 @@ class Threads { } } -?>
\ No newline at end of file +?> |