115,9 → 115,14 |
function drawBlogPostTree($id) |
{ |
$post = $this->getBlogPost($id); |
write('<h3>' . $post->title. '</h3>'); |
write('<a href="' . $this->url . 'blog/post.php?id=' . $id . '"><h3>' . $post->title. '</h3></a>'); |
write('<h5 style="color: #666666;">Posted On ' . date('l j F Y', $post->datePosted) . ' by ' . $post->user->name . ' (' . $post->user->username . ')</h5>'); |
write('<p>' . $post->content . '</p>'); |
if ($this->isUserNormal($page->getLoggedInUser())) |
{ |
write('<p class="bold"><a href="add-commend.php?id="' . $id . '">Add Comment</a></p>'); |
write('<br />'); |
} |
|
$ids = $this->findIDs('BlogPosts', 'WHERE ParentID=' . $id); |
for ($i = 0; $i < count($ids); $i++) |