diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-02-07 22:01:57 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-02-07 22:01:57 +0000 |
commit | 77ed5310351b53372ba2eb6250d18b333ac3c1a2 (patch) | |
tree | bf49161de68ba24bee72d4ab8308dcb7a3339618 /modules/comment | |
parent | dac719a3bacc2d6257b3757237af29933c491ccc (diff) | |
download | brdo-77ed5310351b53372ba2eb6250d18b333ac3c1a2.tar.gz brdo-77ed5310351b53372ba2eb6250d18b333ac3c1a2.tar.bz2 |
- added new feature for evaluating purpose: user rating (mojo, karma)!
- removed tabs from Jeroen's theme
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/comment.module | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index e4a8ca9ac..bd6594dbc 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1,6 +1,16 @@ <? -$module = array("admin" => "comment_admin"); +$module = array("find" => "comment_find", + "admin" => "comment_admin"); + +function comment_find($keys) { + $find = array(); + $result = db_query("SELECT c.*, u.userid FROM comments c LEFT JOIN users u ON c.author = u.id WHERE c.subject LIKE '%". check_input($keys) ."%' OR c.comment LIKE '%". check_input($keys) ."%' ORDER BY c.timestamp DESC LIMIT 20"); + while ($comment = db_fetch_object($result)) { + array_push($find, array("subject" => check_output($comment->subject), "link" => "story.php?id=$comment->lid&cid=$comment->cid", "user" => $story->userid, "date" => $comment->timestamp)); + } + return $find; +} function comment_edit($id) { $result = db_query("SELECT c.*, u.userid FROM comments c LEFT JOIN users u ON c.author = u.id WHERE c.cid = $id"); |