diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-01-20 12:20:31 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-01-20 12:20:31 +0000 |
commit | 2952d16f78eea91724760f526504010cb8f796a9 (patch) | |
tree | 21598276fd9bc316be320308c5cd8eeafa77c12d /index.php | |
parent | 53b92a614a9e30b693760b8299342f9bfb01320b (diff) | |
download | brdo-2952d16f78eea91724760f526504010cb8f796a9.tar.gz brdo-2952d16f78eea91724760f526504010cb8f796a9.tar.bz2 |
- updated/improved discussion engine: it needs additional fine-tuning
though but I think this is stable enough for public consumption and
real-life testing.
==> a first big step towards a flexible comment engine.
IMPORTANT:
- Required theme updatins:
UnConeD: check your $theme->controls() as I added a very, very
dummy implementation
- Required database updates:
alter table users modify mode tinyint(1) DEFAULT '' NOT NULL;
alter table comments change sid lid int(6) DEFAULT '0' NOT NULL;
alter table comments add link varchar(16) DEFAULT '' NOT NULL;
update comments set link = 'story';
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -13,7 +13,7 @@ $number = ($user->stories) ? $user->stories : 10; $date = ($date) ? $date : time(); // Perform query: -$result = db_query("SELECT stories.*, users.userid, COUNT(comments.sid) AS comments FROM stories LEFT JOIN comments ON stories.id = comments.sid LEFT JOIN users ON stories.author = users.id WHERE stories.status = 2 AND stories.timestamp <= $date GROUP BY stories.id ORDER BY stories.timestamp DESC LIMIT $number"); +$result = db_query("SELECT stories.*, users.userid, COUNT(comments.lid) AS comments FROM stories LEFT JOIN comments ON stories.id = comments.lid LEFT JOIN users ON stories.author = users.id WHERE stories.status = 2 AND stories.timestamp <= $date GROUP BY stories.id ORDER BY stories.timestamp DESC LIMIT $number"); // Display stories: $theme->header(); |