From 008411240d192871d40bc2075911ff794ecb25a0 Mon Sep 17 00:00:00 2001 From: deva Date: Sat, 13 Mar 2010 13:43:39 +0000 Subject: Some layout changes on forum/threads. --- forum/utils/forums.php | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'forum/utils/forums.php') diff --git a/forum/utils/forums.php b/forum/utils/forums.php index 1827e3c..06196a6 100644 --- a/forum/utils/forums.php +++ b/forum/utils/forums.php @@ -1,4 +1,4 @@ -numPosts = sizeof($threads->threads); + $this->latestPost = ""; + $t = $threads->getLatestThread(); + if($t) { + $this->latestPost = $t->name; + } + $this->newStuff = $newStuff; } public function show() { + $newcls = ""; + if($this->newStuff) $newcls = " forum_new"; + echo "
\n"; - if($this->newStuff) echo "
\n"; - else echo "
\n"; - echo " fid . "\">" . $this->name . "\n"; + echo " \n"; + echo " fid . "\">" . $this->name . "\n"; + echo " ".$this->latestPost."\n"; + echo " ".sprintf("%d", $this->numPosts)." threads\n"; echo "
\n"; } @@ -92,7 +105,7 @@ class Forums { $this->add($forum); $threads = new Threads($FORUMS_DIR . "/" . $f->getAttribute('fid')); - $forum->setNewStuff($threads->newStuff()); + $forum->setNewStuff($threads->newStuff(), $threads); } } -- cgit v1.2.3