Textpattern Notes Part 3 is a post on The Hickensian

Here is a way to prevent you receiving an email notification of your own comments. Go to the end of the /textpattern/publish/comment.php file, and find this code:

$out = "Dear $RealName,\r\n\r\nA comment on your post on your post 
\"$Title\" was recorded.\r\n\r\nName: $cname\r\nEmail: $cemail\r\nWeb: 
$cweb\r\nComment:\r\n$message";
		mail($email, "[$sitename] comment received: $Title", $out,
		 "From: $RealName <$email>\r\n"
		."Reply-To: $cname <$cemail>\r\n"
		."X-Mailer: Textpattern\r\n"
		."Content-Transfer-Encoding: 8bit\r\n"
		."Content-Type: text/plain; charset=\"UTF-8\"\r\n");
	}

Change to this:

if ($cemail != $email) {
$out = "A comment on your post on your post \"$Title\" was recorded.
\r\n\r\nName: $cname\r\nEmail: $cemail\r\nWeb: $cweb\r\nComment:\r\n$message";
		mail($email, "[$sitename] comment received: $Title", $out,
		 "From: $cname <$email>\r\n"
		."Reply-To: $cname <$cemail>\r\n"
		."X-Mailer: Textpattern\r\n"
		."Content-Transfer-Encoding: 8bit\r\n"
		."Content-Type: text/plain; charset=\"UTF-8\"\r\n");
	}
}

This then only sends an email if the commenters email isn't the same as your email. I also changed it so that when the email comes in, the 'from' is the commenters name, not your own!

The Hickensian is the journal of Jon Hicks, one half of the creative partnership Hicksdesign. See the work we do.

AD by FUSION

Jobs

Hicksdesign doesn't have any vacancies, but these fine folk do:

    Via Authentic Jobs Come in, we're hiring!

    playlist

    See more on last.fm

    My Zoo

    I use Zootool to collect the things I like on the web…

    Contact

    Hicksdesign

    73a High Street

    Witney

    Oxfordshire, UK

    OX28 6JA

    +44 (0)7917 391 536

    Download vCard

    Happy Cog Hosting

    Hicksmade. Unique handmade products made for machines, not by them