Commit a2466c54 authored by Dries's avatar Dries
Browse files

* Commited a *temporary* version of the new comment system: I have been
  working on it for about 4 a 5 hours today and I considered it would be
  smart (backup- or crash-wise) to commit what I have made so far.  I'm
  aware of a few bugs and I'll keep workin on it:
    - removing bugs
    - clean up the code to make it very streamlined
    - improve error checking
  Once we got a stable comment system, I'll add moderation.  But right
  now I want to sort out the major problems.
* I made my theme the default theme until the other themes are updated.
* Expanded the database abstraction layer with more goodies.
parent 315d060a
......@@ -11,15 +11,11 @@
if ($op == "reply") Header("Location: comments.php?op=reply&pid=0&sid=$sid&mode=$mode&order=$order&thold=$thold");
$result = db_query("SELECT * FROM stories WHERE id = $id");
$result = db_query("SELECT stories.*, users.userid FROM stories LEFT JOIN users ON stories.author = users.id WHERE stories.status = 2 AND stories.id = $id");
$story = db_fetch_object($result);
$theme->header();
$reply = "[ <A HREF=\"\"><FONT COLOR=\"$theme->hlcolor2\">home</FONT></A> | <A HREF=\"comments.php?op=reply&pid=0&sid=$story->sid\"><FONT COLOR=\"$theme->hlcolor2\">add a comment</FONT></A> ]";
$theme->article($story, $reply);
// if ($mode != "nocomments") include "comments.php";
// 21/06/2000 - temporary disabled commnents
$theme->article($story, "[ <A HREF=\"\"><FONT COLOR=\"$theme->hlcolor2\">home</FONT></A> | <A HREF=\"comments.php?op=reply&pid=0&sid=$story->id\"><FONT COLOR=\"$theme->hlcolor2\">add a comment</FONT></A> ]");
if ($mode != "nocomments") include "comments.php";
$theme->footer();
?>
\ No newline at end of file
This diff is collapsed.
......@@ -64,7 +64,7 @@
#
# Default theme:
#
$cfg_theme = "default";
$cfg_theme = "Dries";
#
# Submission moderation votes:
......
......@@ -47,6 +47,10 @@ function db_fetch_array($qid) {
if ($qid) return mysql_fetch_array($qid);
}
function db_result($qid, $field) {
if ($qid) return mysql_result($qid, $field);
}
#
# Automatically connect to database:
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment