Add comment from event plugin

Creating and modifying plugins.
Post Reply
stadskle
Regular
Posts: 7
Joined: Mon Apr 10, 2006 6:07 pm

Add comment from event plugin

Post 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?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Add comment from event plugin

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply