I've made my own module to add commenting to a node (it opens modally in a colorbox - really nice). The form works great, but how do I save the comment?
I know it's got to be done using comment_save. But, as usual, drupal.org is great at showing the code for the function without giving an example...
Has anyone done this before?
I'm guessing it's something like:
$comment = new stdClass(); $comment->nid = $the_node_the_comment_is_for; $comment->title = $my_comment_title; $comment->body = $my_comment_body; comment_save($comment);