[Comoblog-commit] modules/mod_comment_notify mod_comment_notify_comment_filter.php, 1.8, 1.9
Status: Inactive
Brought to you by:
markwallis
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:43
|
Update of /cvsroot/comoblog/modules/mod_comment_notify In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/modules/mod_comment_notify Modified Files: mod_comment_notify_comment_filter.php Log Message: work in progress, ditching this server cos its borked ;( Index: mod_comment_notify_comment_filter.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_comment_notify/mod_comment_notify_comment_filter.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- mod_comment_notify_comment_filter.php 15 Aug 2006 17:06:04 -0000 1.8 +++ mod_comment_notify_comment_filter.php 22 Oct 2006 11:44:07 -0000 1.9 @@ -1,52 +1,46 @@ <?php -require_once(dirname(__FILE__).'/include/mod_comment_notify.inc.php'); +require_once (dirname(__FILE__) . +'/include/mod_comment_notify.inc.php'); -$subject ='Blog Comment Added To Post - ' . mod_comment_notify($comment['post_id']); +$subject = 'Blog Comment Added To Post - ' . mod_comment_notify($comment['post_id']); $body = "Message details " . "\n\n"; -$body .='Blog Comment Added To Post - ' . mod_comment_notify($comment['post_id']) ."\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 .="\n\n"; -$body .="This comment was added with a state of " . $comment['comment_live'] ."\n"; -$body .="This commenters pre approved state is " . get_commenter_approval_state($comment['comment_author_email']) ."\n"; - - +$body .= 'Blog Comment Added To Post - ' . mod_comment_notify($comment['post_id']) . "\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 .= "\n\n"; +$body .= "This comment was added with a state of " . $comment['comment_live'] . "\n"; +$body .= "This commenters pre approved state is " . get_commenter_approval_state($comment['comment_author_email']) . "\n"; // if the comment is LIVE - give option to hide it. -if ($comment['comment_live'] =="Y"){ - $body .="Click here to HIDE this comment " . - CFG_SITE_URL. "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=N&comment_id=".$comment['comment_id']."\n"; - } - - // if the comment is NOT LIVE - give option to hide it. -if ($comment['comment_live'] =="N"){ - $body .="Click here to SHOW this comment " . - CFG_SITE_URL. "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=Y&comment_id=".$comment['comment_id']."\n"; - } - - $body .="Click here to HIDE this AND ALL FUTURE comments from this commenters " . - CFG_SITE_URL. "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=N&preAuth=N&comment_id=".$comment['comment_id']."\n"; - - - $body .="Click here to SHOW this AND ALL FUTURE comments from this commenters " . - CFG_SITE_URL. "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=Y&preAuth=Y&comment_id=".$comment['comment_id']."\n"; - -$body .="\n\nFor Clarity - This will not affect comments posted before these links are clicked,\n\n"; - -$body .="\n\n\n"; -$body .= "Comment:\n\n" . filter_html($comment['comment_text']) ."\n"; -$body .="\n\n\n"; +if ($comment['comment_live'] == "Y") { + $body .= "Click here to HIDE this comment " . + CFG_SITE_URL . "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=N&comment_id=" . $comment['comment_id'] . "\n"; +} +// if the comment is NOT LIVE - give option to hide it. +if ($comment['comment_live'] == "N") { + $body .= "Click here to SHOW this comment " . + CFG_SITE_URL . "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=Y&comment_id=" . $comment['comment_id'] . "\n"; +} -$headerstring = "MIME-Version: 1.0\r\n". - "Content-type: text/plain; charset=iso-8859-1\r\n". - "From: ".CFG_COMMENT_NOTIFY_FROM_NAME."<".CFG_COMMENT_NOTIFY_FROM.">\r\n". - "To: ".CFG_COMMENT_NOTIFY_TO_NAME."<".CFG_COMMENT_NOTIFY_TO.">\r\n". - "Date: ".date("r")."\r\n". - "Subject: ".$subject."\r\n"; +$body .= "Click here to HIDE this AND ALL FUTURE comments from this commenters " . +CFG_SITE_URL . "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=N&preAuth=N&comment_id=" . $comment['comment_id'] . "\n"; -mail($recipients, $subject, $body,$headerstring); +$body .= "Click here to SHOW this AND ALL FUTURE comments from this commenters " . +CFG_SITE_URL . "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=Y&preAuth=Y&comment_id=" . $comment['comment_id'] . "\n"; +$body .= "\n\nFor Clarity - This will not affect comments posted before these links are clicked,\n\n"; +$body .= "\n\n\n"; +$body .= "Comment:\n\n" . filter_html($comment['comment_text']) . "\n"; +$body .= "\n\n\n"; + +$headerstring = "MIME-Version: 1.0\n" . "Content-type: text/plain; charset=iso-8859-1\n" . +"From: " . CFG_COMMENT_NOTIFY_FROM_NAME . "<" . CFG_COMMENT_NOTIFY_FROM . ">\n" . +"To: " . CFG_COMMENT_NOTIFY_TO_NAME . "<" . CFG_COMMENT_NOTIFY_TO . ">\n" . +"Date: " . date("r") . "\n" . +"Subject: " . $subject . "\n"; +error_log($recipients, $subject, $body, $headerstring); +mail($recipients, $subject, $body, $headerstring); ?> |