[wp-hackers] Addition to check_comment(): return false if thepost is older than 21 days

Mark Jaquith mark.wordpress at txfx.net
Sat Oct 2 15:41:12 UTC 2004


> This is what I was talking about regarding a structure to pass comment 
> data.
> The comment data isn't easily or intuitively accessed like this from 
> the
> plugin.  If you're going to do it this way, try passing a whole struct 
> to
> the plugin.
>
> I'm still not convinced of this method working because it assumes that
> you're only going to want to rate a message based on how spammy it is.
> There may be other reasons to chuck a message to moderation besides 
> whether
> it contains a word, like whether the post has reached a certain age.  
> Even
> if you modded the score up +1000, downchain plugins could rewrite this 
> and
> negate any effect of what should have been an indisputable action.

As long as downchain plugins modify the existing score, there's no 
problem.

$comment_score += #;

This adds on to the score, so there is a cumulative effect.  Sure, there 
would be a problem if a crappy plugin resets the score before changing 
it, but that would be a faulty plugin.

Nothing is stopping you from checking the age of the entry being 
commented on.  You could do age plugins, content plugins, blacklist 
plugins, CAPTCHA plugins.  Many existing hacks could quickly be 
converted to plugins that would work in this system.



More information about the hackers mailing list