Page 1 of 1

Add comment from event plugin

Posted: Mon Apr 10, 2006 6:18 pm
by stadskle
We are programming a plugin for mobile blogging (SMS/email). How can I from the plug in:

- Add a comment to an entry
- Add a comment to a comment to an entry
- Add a comment to a comment to a comment to an entry
- etc.

I already have functions for identifying the entry (and/or the comments that are going to be commented) but which function can I use to add this information to the database? Is there one? Or do I have to write the SQL mtself?

Re: Add comment from event plugin

Posted: Mon Apr 10, 2006 7:27 pm
by garvinhicking
Hi!

You can use the serendipity_saveComment() function found in include/functions_comments.inc.php. The 1.0/1.1 versionso fserendipity contain phpdoc function headers, which should tell you what the function exactly expects.

You might also want to look at the comment.php file which contains the current "workflow" for adding comment.

Does that help you further?

Best regards,
Garvin