[wp-hackers] Plugins interfering on comment_post action?

Skybly skybly at gmail.com
Wed Nov 17 08:12:35 UTC 2004


Hello,

hope this hasn't been asked before, I looked through the archives but
did not find anything.

I'm currently writing my first plugin. It updates a graphic every time
a new post or comment is made (similar to how BlogTimes works).

To prevent this plugin from putting a strain on the server if a blog
gets comment spam, I am triggering a "spamCheck" function when
comments are posted (via add_action). This function simply queries the
comment in the DB and only updates the image if comment_approved is
set to 1.

Now this works fine, *unless* I also have the Blacklist plugin
activated. In that case, it seems that no comment id (or an empty id)
is passed to my spamCheck function, so no comment, whether approved or
not, triggers the image update. I'm also letting a friend test my
plugin and she experiences the same - she doesn't use Blacklist, but
she is using at least one other comment-related plugin (nested
comments).

On a fresh install of Mingus or the latest 1.3 nightly, or on my own
blog with Blacklist turned off, my plugin works just fine.

Is there some reason why add_action wouldn't pass the comment id if it
is executed a second time? Or am I just doing something wrong? Any
suggestions?

Thanks in advance!

cheers,
Kathrin / Skybly



More information about the hackers mailing list