Open rgblogs opened 12 years ago
There is no way to do that in the current version but a notification system is planned for the version 1.4
I would also like an email notification for new comments. Happy to see it is planned in a future release.
In the meantime I've inserted this block of code into com_slicomments/controllers/comments.raw.php on line 47.
*/
$to_address = "youremail@yourdomain.com"; $from_name = "Your Website Name"; $from_address = "website@yourdomain.com";
$subject = "Article Comment"; $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $headers .= "From: =?UTF-8?B?". base64_encode($from_name) ."?= <$from_address>\r\n"; $headers .= "Bcc: " . "\r\n" . "X-Mailer: php";
$emailContent = "
A user has posted a new comment on the yourdomain.com Website. This comment is currently pending and will not be published until it is authorised by an Administrator. Please login to the Administration area of the website and approve or delete this comment.
The details of the comment are:This notifcation was auto-generated by the <a href=\"http://www.yourdomain.com\">yourdomain.com Website - If this was sent to you in error or there are any problems please email <a href=\"mailto:youremail@yourdomain.com\">youremail@yourdomain.com.
mail($to_address, $subject, $emailContent, $headers, "-f $from_address");
*/
With my limited PHP and Joomla knowledge I can only figure out how to include the Comment Author's name in the email notification. =( I hope someone finds this useful.
A possible plugin implementation for this is in pull request #54
Hi
Is there any way to get email notification of any new comment?
Thanks