summaryrefslogtreecommitdiff
path: root/story.php
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-01-21 09:26:06 +0000
committerDries Buytaert <dries@buytaert.net>2001-01-21 09:26:06 +0000
commit7cc7b405e323f36037dab894b69d6fd739915d5d (patch)
treec06aa86ab4fa2987abea3ef682114446122aa7d5 /story.php
parentccb69d763b2517207e13136007fad973b61ecd26 (diff)
downloadbrdo-7cc7b405e323f36037dab894b69d6fd739915d5d.tar.gz
brdo-7cc7b405e323f36037dab894b69d6fd739915d5d.tar.bz2
- fixed some bugs in the new comment/discussion code and added a few
enhancements
Diffstat (limited to 'story.php')
-rw-r--r--story.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/story.php b/story.php
index 5f4ad9dbc..257e4c8b9 100644
--- a/story.php
+++ b/story.php
@@ -3,7 +3,7 @@
include "includes/common.inc";
function story_render($id, $cid) {
- global $theme, $threshold, $mode, $order, $user;
+ global $theme, $user;
// Compose story query:
$result = db_query("SELECT s.*, u.userid FROM stories s LEFT JOIN users u ON s.author = u.id WHERE s.status != 0 AND s.id = $id");
@@ -13,9 +13,6 @@ function story_render($id, $cid) {
if ($story->status == 1) $theme->article($story, "[ <A HREF=\"submission.php\"><FONT COLOR=\"$theme->hlcolor2\">submission queue</FONT></A> | <A HREF=\"story.php?op=reply&id=$story->id&pid=0\"><FONT COLOR=\"$theme->hlcolor2\">add a comment</FONT></A> ]");
else $theme->article($story, "[ <A HREF=\"\"><FONT COLOR=\"$theme->hlcolor2\">home</FONT></A> | <A HREF=\"story.php?op=reply&id=$story->id&pid=0\"><FONT COLOR=\"$theme->hlcolor2\">add a comment</FONT></A> ]");
- // Display 'comment control'-box:
- if ($user->id) $theme->controls($threshold, $mode, $order);
-
// Display comments:
comment_render($id, $cid);
}
@@ -29,12 +26,17 @@ switch($op) {
case "Post comment":
comment_post($pid, $id, $subject, $comment);
break;
+ case "Add comment":
+ $theme->header();
+ comment_reply($cid, $id);
+ $theme->footer();
+ break;
case "reply":
$theme->header();
comment_reply($pid, $id);
$theme->footer();
break;
- case "Update":
+ case "Update settings":
comment_settings($mode, $order, $threshold);
$theme->header();
story_render($id, $cid);