Hey Everyone,
First of all nice job on this component, its pretty simple for my users to work with and has everything it needs to be a comments system.
Well anyway, I wanted to contribute a little bit, I was also trying to send a notification email to the author of the article everytime someone wrote down a comment.
Using the instructions provided on the last post I made a little tweak my self also.
With this code you'll be able to send an email containing the text of the comment to the respective author of the article they are writing on.
global $mainframe;
$tmpdb =& JFactory::getDBO();
$pageid = $post['pageid'];
$tmpquery = "SELECT DISTINCT #__users.email FROM #__users JOIN #__content on #__users.id = #__content.created_by and #__content.id ='".$pageid."'";
$tmpdb->setQuery( $tmpquery );
$tmpuser = $tmpdb->loadObject();
JUtility::sendMail("email@from.com", "fromName", $tmpuser->email, "Subject here", $post['text'], true, NULL, NULL, NULL, NULL, NULL );
You can set it up on the com_chronocomments/chronocomments.php between the send verification and send admin notification email.
I hope this was what you were looking for.
Regards
Miguel 😀