From 37d1bf52e292d9bd29f0dcdb678c8dc66d0909d9 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Wed, 4 Jun 2003 17:32:14 +0000 Subject: [PATCH] Don't show the comment form if comments are closed. git-svn-id: http://svn.automattic.com/wordpress/trunk@156 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- b2comments.php | 6 +++++- b2commentspopup.php | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/b2comments.php b/b2comments.php index d4152699d8..8f8c55589f 100644 --- a/b2comments.php +++ b/b2comments.php @@ -8,6 +8,7 @@ $comment_author_url = (empty($HTTP_COOKIE_VARS["comment_author"])) ? "url" : trim($HTTP_COOKIE_VARS["comment_author_url"]); $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id ORDER BY comment_date"); + $commentstatus = $wpdb->get_var("SELECT comment_status FROM $tableposts WHERE ID = $id"); ?> @@ -35,6 +36,7 @@ if ($comments) {

Leave a Comment

+

Line and paragraph breaks automatic, website trumps email, HTML allowed:

@@ -66,7 +68,9 @@ if ($comments) {

- + +

Sorry, comments are closed at this time.

+
Go back.
diff --git a/b2commentspopup.php b/b2commentspopup.php index aaebe15a80..c4cfa9f009 100644 --- a/b2commentspopup.php +++ b/b2commentspopup.php @@ -24,6 +24,7 @@ foreach ($posts as $post) { start_b2(); get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id ORDER BY comment_date"); +$commentstatus = $wpdb->get_var("SELECT comment_status FROM $tableposts WHERE ID = $id"); // this line is WordPress' motor, do not delete it. if ($comments) { foreach ($comments as $comment) { @@ -42,6 +43,7 @@ if ($comments) {

Leave a Comment

+

Line and paragraph breaks automatic, website trumps email, HTML allowed:

@@ -74,6 +76,9 @@ if ($comments) {

+ +

Sorry, comments are closed at this time.

+
Close this window.