[Comoblog-commit] modules/mod_comment_notify mod_comment_notify_comment_filter.php,NONE,1.1
Status: Inactive
Brought to you by:
markwallis
|
From: iamdecal <iam...@us...> - 2005-11-28 10:41:55
|
Update of /cvsroot/comoblog/modules/mod_comment_notify In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13672/mod_comment_notify Added Files: mod_comment_notify_comment_filter.php Log Message: initial add mod_comment_notify, this mod will email a notification of new comments to the site owner, ive not used it in anger since i first wrote it, as i replace it with an rss feed of comments, how ever i believe it all works okay - on linux at least., it should probably be tested some more, however i noticed that there was a feature request for this, so im adding it as a base for some one to look at, test and file any bug reports. --- NEW FILE: mod_comment_notify_comment_filter.php --- <?php include('include/pear/Mail.php'); require_once(dirname(__FILE__).'/include/mod_comment_notify.inc.php'); $subject = mod_comment_notify($comment['post_id']); $body = "Message details " . "\n\n"; $body .= "Post ID:" . $comment['post_id'] ."\n"; $body .= "Link: " .CFG_SITE_URL. "post.php?/". $comment['post_id'] ."\n"; $body .= "From:" . $comment['comment_author'] . " - " . $comment['comment_author_email'] ."\n"; $body .= "Comment:\n\n" . $comment['comment_text'] ."\n"; $recipients = CFG_COMMENT_NOTIFY_TO; $headers['From'] = CFG_COMMENT_NOTIFY_FROM; $headers['To'] = CFG_COMMENT_NOTIFY_TO; $headers['Subject'] = 'Blog Comment Added To Post - ' .$subject; $params['sendmail_path'] = CFG_WHERE_IS_SENDMAIL; // Create the mail object using the Mail::factory method $mail_object =& Mail::factory('sendmail', $params);$mail_object->send($recipients, $headers, $body); ?> |