[geeklog-devel] Brainstorming -- Spam Comment API

Tom Willett tomw at pigstye.net
Mon Jul 12 17:38:18 EDT 2004

Talking to Tony on irc about the API needed to make the spamx comment plugin 
and related plugins work.  Here are some issues which it should address.

Some background -- I implemented the spamx plugin by renaming the savecomment
() function in comment.php to savecomment1 and implementing the savecomment 
function in the functions inc, thus hijacking the call to savecomment.  The 
question is how to implement a plugin API to address this and other possible 

Issue 1:  Since spamx was the only plugin access the savecomment function I 
did not bother to return to the function if I wanted to simply drop the 
comment.  A well behaved plugin should not do this.  It should return some 
error code to the core code for the core code to decide what to do with it.

Issue 2: What about plugins that might want to alter the comment text and 
return it to the savecomment function?

Issue 3: What about a plugin that might want to do something with the 
comment (like moderation) depending on what other plugins had found.

This may be two different APIs depending on how its handled.

By the way the same issues could apply to stories and we may want to 
consider a similiar api for stories.  One plugin that might implement both 
the comment and story APIs would be a smiley plugin.


Tom Willett
tomw at pigstye.net

More information about the geeklog-devel mailing list