diff options
author | deva <deva> | 2011-11-01 09:32:21 +0000 |
---|---|---|
committer | deva <deva> | 2011-11-01 09:32:21 +0000 |
commit | 42c62cb041a2b2b95c9cda0c20fcf70334fd244c (patch) | |
tree | 38371eb37ff7348585ee84438b326c25055e2cbe /forum/utils/threads.php | |
parent | 208e3b642149a9ac701a43397d31990f9b27ca79 (diff) |
Rewl og krat... needs cleaning up - after port to GIT.origin
Diffstat (limited to 'forum/utils/threads.php')
-rw-r--r-- | forum/utils/threads.php | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/forum/utils/threads.php b/forum/utils/threads.php index 52dda06..a30bf5c 100644 --- a/forum/utils/threads.php +++ b/forum/utils/threads.php @@ -35,6 +35,8 @@ class Thread { global $fid, $current_user; global $users; + $str = ""; + $jumptonew = ""; $newcls = " thread_nonew"; if($this->lastseen[$current_user->uid] < $this->lastpost) { @@ -42,21 +44,23 @@ class Thread { $jumptonew = "#firstunread"; } - echo " <div class=\"thread\">\n"; - echo " <span class=\"thread_icon".$newcls."\"> </span>\n"; - echo " <a class=\"thread_title\" href=\"?fid=" . $fid . - "&tid=" . $this->tid . $jumptonew."\">" . $this->name . "</a>\n"; - echo " <span class=\"thread_numposts\">".$this->numposts." posts"; + $str .= " <div class=\"thread\">\n"; + $str .= " <span class=\"thread_icon".$newcls."\"> </span>\n"; + $str .= " <span class=\"thread_title\"><a href=\"?fid=" . $fid . + "&tid=" . $this->tid . $jumptonew."\">" . $this->name . "</a></span>\n"; + $str .= " <span class=\"thread_numposts\">".$this->numposts." posts"; if($this->numunread != 0) { - echo " <strong>(".$this->numunread." unread)</strong>"; + $str .= " <strong>(".$this->numunread." unread)</strong>"; } - echo "</span>\n"; - echo " <span class=\"thread_lastpost\">Last post: ". + $str .= "</span>\n"; + $str .= " <span class=\"thread_lastpost\">Last post: ". date("j. M Y - G:i", $this->lastpost)."</span>\n"; $user = $users->getUser($this->first_user); - echo " <span class=\"thread_createdby\">By ".$user->name; - echo " at ". date("j. M Y - G:i", $this->first_date)."</span>\n"; - echo " </div>\n"; + $str .= " <span class=\"thread_createdby\">By ".$user->name; + $str .= " at ". date("j. M Y - G:i", $this->first_date)."</span>\n"; + $str .= " </div>\n"; + + return $str; } public function processPost($pid, $title, $user, $date) @@ -190,9 +194,13 @@ class Threads { public function show() { + $str = ""; + foreach($this->threads as $thread) { - $thread->show(); + $str .= $thread->show(); } + + return $str; } public function newStuff() |