summaryrefslogtreecommitdiff
path: root/forum/utils/posts.php
diff options
context:
space:
mode:
authordeva <deva>2009-11-03 10:43:35 +0000
committerdeva <deva>2009-11-03 10:43:35 +0000
commitf8deb525437dc0995e8b0b7c693ff9bbc3bbc48c (patch)
tree603b21d0a89b34db134bed663edcb1281e628a6d /forum/utils/posts.php
parent8e8cfb2fb27c2b217144e1efaa4137254d58ed3e (diff)
Marking of new posts. Jump-to mark of first unread.
Diffstat (limited to 'forum/utils/posts.php')
-rw-r--r--forum/utils/posts.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/forum/utils/posts.php b/forum/utils/posts.php
index 3b0e73b..59678de 100644
--- a/forum/utils/posts.php
+++ b/forum/utils/posts.php
@@ -193,9 +193,19 @@ class Posts {
*/
// Linear
+ $firstunread = false;
foreach($this->posts_linear as $post) {
+ if($post->date > $this->thread->lastseen[$current_user->uid] && $firstunread == false) {
+ $firstunread = true;
+ echo " <div id=\"firstunread\"></div>\n";
+ echo " <div class=\"unread\">\n";
+ }
$post->show(" ", false);
}
+
+ if($firstunread == true) {
+ echo " </div>\n";
+ }
$this->thread->lastseen[$current_user->uid] = time();