I think I could use something like that, here is a description taken from that page:
Once installed and activated (see below), here is what the plugin does when someone posts a comment (or a trackback) to determine if this is Old Stuff® or not, and thus to accept the comment or send it to moderation queue :
Compare today’s date with date of last comment
If no comments, compare today’s date with post’s modification date
If never modified, compare today’s date with writing date
sounds great to me, should be simple to code, anyone supporting this request?
or do you consider this outdated? I think I'd love to use it.
I think I could use something like that, here is a description taken from that page:
Once installed and activated (see below), here is what the plugin does when someone posts a comment (or a trackback) to determine if this is Old Stuff® or not, and thus to accept the comment or send it to moderation queue :
Compare today’s date with date of last comment
If no comments, compare today’s date with post’s modification date
If never modified, compare today’s date with writing date
sounds great to me, should be simple to code, anyone supporting this request?
or do you consider this outdated? I think I'd love to use it.
I see it hasn't been updated for awhile, so don't know if it works with current versions of wordpress. But, I don't see why it wouldn't and if by some chance it doesn't work then it shouldn't be a big deal to update it :)
New post - comment wasn't moderated. Old post - comment was held for moderation. Once approved - comment author could post comments on that thread without moderation. but commnet author was moderated on other old posts he tried to comment on.
That's all the time I have for testing, but it seems ozh plugin still works.
did I understand this right that I need to add <?php wp_ozh_automoderate_status() ?> to comments tempalte files so users see the message about whether a comment will be moderated or not?
if we need this, how would I hook it into all themes via a hook? would this one work? comment_form according to the codex its a template action, surely adding one line to a file placed inside mu-plugins would trigger this on all blogs?
thanks chap, but as I understood those hooks, they will just print out that the comment is awaiting moderation after it has been submitted while if we managed to hook this: <?php wp_ozh_automoderate_status() ?> into a relevant hook around the comment form, it would show visitors a warning I can define if they are about to comment on an old post, that is the reason I asked about how to hook it into all templates comment forms via a small plugin placed inside mu-plugins :-)
any takers for this or am I misunderstanding things here?
:-) thanks chap, BUT I won't go adding that to each functions.php so can it be instead used in a my_snippets.php inside mu-plugins like this:
<?php
/*
Plugin Name: zice.ro extras
Description: my random snippets
Author: ovidiu
*/
add_action( 'comment_form', 'my_comment_moderation_message' );
function my_comment_moderation_message() {
wp_ozh_automoderate_status();
}
?>
oh and since you'been so helpful, how about wrapping the whole thing into an function_exists() function to make sure it doesn't break if I ever deactivate the comment moderation plugin?
like this?
<?php
/*
Plugin Name: zice.ro extras
Description: my random snippets
Author: ovidiu
*/
if (function_exists(wp_ozh_automoderate_status) {
add_action( 'comment_form', 'my_comment_moderation_message' );
};
function my_comment_moderation_message() {
wp_ozh_automoderate_status();
}
?>
but I am really,really, no coder, please check my lines above :-)
Well, a functions.php file is just another auto-loading plugin specific to the active theme. As long as the original wp_ozh_automoderate plugin is active on each site then I don't see any reason why bundling it into a network activated snippet plugin wouldn't work.
can't get it to work. the moderation plugin works fine but the warning about the old post is not shown anywhere.
tried different themes but all should have the comment_form hook deleted caches still nothing.
can you give it a quick try on your side please?
:-) I think I'll just include it in the plugin for now since the plugin doesn't look as if it is going to be upgraded anytime soon! Thanks for the ongoing help here!
Responses (15)
WPMU DEV Fanatic — 21st June 2011 18:20 #
Hi Ovidiu,
It does sound rather simple as you've mentioned.
Any other +1s?
Lifetime Member — 21st June 2011 18:43 #
@Ovidiu
The plugin is in the WordPress plugins section and is found and downloaded here
http://wordpress.org/extend/plugins/ozh-auto-moderate-comments/
I see it hasn't been updated for awhile, so don't know if it works with current versions of wordpress. But, I don't see why it wouldn't and if by some chance it doesn't work then it shouldn't be a big deal to update it :)
Cheers,
Jonathan
Lifetime Member — 21st June 2011 19:03 #
Okay, I just tested it.
http://wordpress.org/extend/plugins/ozh-auto-moderate-comments/
And it works.
New post - comment wasn't moderated.
Old post - comment was held for moderation.
Once approved - comment author could post comments on that thread without moderation.
but commnet author was moderated on other old posts he tried to comment on.
That's all the time I have for testing, but it seems ozh plugin still works.
Cheers,
Jonathan
Member — 21st June 2011 19:27 #
hey that sounds great. didn't realize it was on wordpress.org too since he didn't mention it on his site :-)
will give it a try a bit later.
thanks for testing though!
Member — 21st June 2011 19:49 #
did I understand this right that I need to add
<?php wp_ozh_automoderate_status() ?>to comments tempalte files so users see the message about whether a comment will be moderated or not?if we need this, how would I hook it into all themes via a hook? would this one work?
comment_formaccording to the codex its a template action, surely adding one line to a file placed inside mu-plugins would trigger this on all blogs?can someone clarify and maybe help?
Lifetime Member — 21st June 2011 20:08 #
@Ovidiu,
The plugin already hooks into
So, I added nothing to my templates. I think the template addition is only to customize the text. To read...
Moderation Active: Old stuff here... Therefore your comment on this post will be moderated (i.e. don't submit twice !)
But mine just defaults to ...
I could be missing it entirely, its late and I'm off to bed ;)
So Hope that helps.
Regards,
Jonathan
Member — 22nd June 2011 08:08 #
thanks chap, but as I understood those hooks, they will just print out that the comment is awaiting moderation after it has been submitted while if we managed to hook this:
<?php wp_ozh_automoderate_status() ?>into a relevant hook around the comment form, it would show visitors a warning I can define if they are about to comment on an old post, that is the reason I asked about how to hook it into all templates comment forms via a small plugin placed inside mu-plugins :-)any takers for this or am I misunderstanding things here?
Lifetime Member — 22nd June 2011 09:15 #
Sorry, was tired last night ;)
Here is your code:
ADD TO FUNCTIONS.PHP
http://codex.wordpress.org/Function_Reference/comment_form
and if you don't like the position of the automoderate status text, here some interesting reading
http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/
Cheers,
Jonathan
Member — 22nd June 2011 09:20 #
:-) thanks chap, BUT I won't go adding that to each functions.php so can it be instead used in a my_snippets.php inside mu-plugins like this:
oh and since you'been so helpful, how about wrapping the whole thing into an function_exists() function to make sure it doesn't break if I ever deactivate the comment moderation plugin?
like this?
but I am really,really, no coder, please check my lines above :-)
Lifetime Member — 22nd June 2011 09:40 #
Well, a functions.php file is just another auto-loading plugin specific to the active theme. As long as the original wp_ozh_automoderate plugin is active on each site then I don't see any reason why bundling it into a network activated snippet plugin wouldn't work.
Regards,
Jonathan
Lifetime Member — 22nd June 2011 09:53 #
Oops, didn't see your edit and function check (which is a great idea) ;)
Here is fixed plugin code:
Regards,
Jonathan
Member — 22nd June 2011 09:59 #
can't get it to work. the moderation plugin works fine but the warning about the old post is not shown anywhere.
tried different themes but all should have the comment_form hook deleted caches still nothing.
can you give it a quick try on your side please?
Lifetime Member — 22nd June 2011 10:52 #
oops, lost my post while trying to edit it. lol
It's too long to re-post - sorry
Member — 22nd June 2011 11:19 #
:-) I think I'll just include it in the plugin for now since the plugin doesn't look as if it is going to be upgraded anytime soon! Thanks for the ongoing help here!
Lifetime Member — 22nd June 2011 11:22 #
You're welcome and I agree, drop this
into the plugin, as it hasn't been updated for a couple of years :-)
Cheers,
Jonathan
Become a member