Hi,
I noticed that comments added to existing feature requests are immediately online, and this despite the fact that according to the settings new submissions first get the status "draft" assigned. It also does not to respect the general WP discussion settings, which say that every first comment of a user and all comments with links and certain bad words in them need to be approved before going online.
Can you please tell me what to do so that these comments will not be published without approval? Otherwise anyone can just publish whatever crap on my website and I don't even receive a notification.
Thanks a lot
Chris
Avia Feedback Box: need to moderate comments
10 posts from 3 voices-
Posted 2 years ago #
-
Hey,
I'll report it to KriesiPosted 2 years ago # -
Thank you for the fast reaction!
Posted 2 years ago # -
I just noticed that Kriesi was last time online one week ago: http://www.kriesi.at/support/profile/Kriesi ...
Where would the reply appear - here in the forum? Or is there any bug tracking system?
Thanks!Posted 2 years ago # -
Hey! yould you send me your login details so I can take a look myself? When publishing new feedback the draft function should definitley work. I will have a look if its easy to implement the global comment settings as well but wont make a promise here :)
Posted 2 years ago # -
Thanks - I sent you a message via contact form. Do you mean that this problem is specific to our website? You cannot reproduce it?
New feedback arrives as "draft", that is working correctly. But then the comments are published immediately - that is a problem.Posted 2 years ago # -
ah ok, than this was a misunderstanding. if the new feedback is set to draft everything is working as intended. As I said, making the comments behave like set in the global settings is a good idea but was never implemented. So we just neeed to deal with those comments?
I think I found a quick and dirty solution :)
Comments are added via wp_insert_comment: http://codex.wordpress.org/Function_Reference/wp_insert_commentopen index.php in your plugin folder and search at line 302 for :
$post = array( 'comment_post_ID'=> $id, 'comment_author' => $_POST['avia_comment_name'], 'comment_content' => wpautop(wptexturize($_POST['avia_comment_message'])), 'comment_author_email' => $_POST['avia_comment_mail'], 'comment_author_IP' => $this->user->ip_adress ); and change it to $post = array( 'comment_post_ID'=> $id, 'comment_author' => $_POST['avia_comment_name'], 'comment_content' => wpautop(wptexturize($_POST['avia_comment_message'])), 'comment_author_email' => $_POST['avia_comment_mail'], 'comment_author_IP' => $this->user->ip_adress, 'comment_approved' => 0 );There is no documentation about this on the wordpress function but i guess setting the comment_approved to either 0 or -1 should work
Posted 2 years ago # -
Thank you very much, that did the trick! :-)
The new comments now show up in the backend where the admin needs to approve.
I will probably still have to find a way how to show a message to that person who submitted the comment, something like "Thank you, we have received your comment."Posted 2 years ago # -
OK, one more: I needed to receive a notification for every new comment. So I added:
wp_notify_postauthor( $this->addedCommentID, 'comment' );before the following
} else {(after the place where the code above was added, around line 315).
Maybe some folks find that useful too.Posted 2 years ago # -
One more little change for those who like to improve the handling of spam:
Using the WP function to check for spam. (applying the blacklists)
'comment_author_IP' => $this->user->ip_adress, 'comment_approved' => '0' ); if (!check_comment($post['author'], $post['comment_author_email'], '', $post['comment_content'], $post['comment_author_IP'], '', 'comment')) $post['comment_approved'] = 'spam';Notification only if comment is not classified as spam:
if ($post['comment_approved'] != 'spam') wp_notify_postauthor( $this->addedCommentID, 'comment' );Posted 2 years ago #
Reply
You must log in to post.














