WordPress.org

Make WordPress Core

Changeset 6


Ignore:
Timestamp:
04/07/2003 06:12:32 AM (17 years ago)
Author:
saxmatt
Message:

Fixed some email things, added whois.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/b2comments.post.php

    r3 r6  
    9393    $result = mysql_query($query);
    9494    if (!$result)
    95         die ("There is an error with the database, it can't store your comment...<br>Contact the <a href=\"mailto:$admin_email\">webmaster</a>");
     95        die ("There is an error with the database, it can't store your comment...<br />Contact the <a href=\"mailto:$admin_email\">webmaster</a>");
    9696
    9797    if ($comments_notify) {
    9898
    99         $notify_message  = "New comment on your post #$comment_post_ID.\r\n\r\n";
    100         $notify_message .= "author : $comment_author (IP: $user_ip , $user_domain)\r\n";
    101         $notify_message .= "e-mail : $comment_author_email\r\n";
    102         $notify_message .= "url    : $comment_author_url\r\n";
    103         $notify_message .= "comment: \n".stripslashes($original_comment)."\r\n\r\n";
    104         $notify_message .= "You can see all comments on this post there: \r\n";
    105         $notify_message .= $siteurl.'/'.$blogfilename.$querystring_start.'p'.$querystring_equal.$comment_post_ID.$querystring_separator.'c'.$querystring_equal.'1'."\r\n\r\n";
     99        $notify_message  = "New comment on your post #$comment_post_ID ".stripslashes($postdata['Title'])."\r\n\r\n";
     100        $notify_message .= "Author : $comment_author (IP: $user_ip , $user_domain)\r\n";
     101        $notify_message .= "E-mail : $comment_author_email\r\n";
     102        $notify_message .= "URL    : $comment_author_url\r\n";
     103        $notify_message .= "Whois  : http://ws.arin.net/cgi-bin/whois.pl?queryinput=$user_ip";
     104        $notify_message .= "Comment: \n".stripslashes($original_comment)."\r\n\r\n";
     105        $notify_message .= "You can see all comments on this post here: \r\n";
     106        $notify_message .= comments_link('', false);
    106107 
    107108        $postdata = get_postdata($comment_post_ID);
    108         $authordata = get_userdata($postdata["Author_ID"]);
    109         $recipient = $authordata["user_email"];
    110         $subject = "comment on post #$comment_post_ID \"".$postdata["Title"]."\"";
     109        $authordata = get_userdata($postdata['Author_ID']);
     110        $recipient = $authordata['user_email'];
     111        $subject = "[$blogname] Comment: \"".stripslashes($postdata['Title']).'"';
    111112
    112         @mail($recipient, $subject, $notify_message, "From: b2@".$HTTP_SERVER_VARS['SERVER_NAME']."\r\n"."X-Mailer: b2 $b2_version - PHP/" . phpversion());
     113        @mail($recipient, $subject, $notify_message, "From: \"$comment_author\" <$comment_author_email>\r\n"."X-Mailer: wordpress $b2_version with PHP/".phpversion());
    113114       
    114115    }
Note: See TracChangeset for help on using the changeset viewer.