summaryrefslogtreecommitdiff
path: root/forum/utils/posts.php
diff options
context:
space:
mode:
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();