As requested by Chris, here's a hack that will give you an extra field for your comments, and have the contents of that field included in your email notification.
(note: what this will NOT do is show those contents back on your site. I can think of a way to do that with php and mySQL (with a slight detour on the comment form submission – similar to the way comment subscribe works) and I can write up a second tutorial on that one if there's interest. OR 10 points to the person that can figure out how to hack that directly into MT.)
(another note: if/when you do upgrades to MT – you will need to do this hack again (or one similar depending on how much changes in the version of MT you're working with). This tutorial assumes you're using MT 2.63 – although it also applies to 2.62)
Part One: Edit your comments form
Wherever you want the extra field to show (in this example, we're assuming people are entering the location of their RSS feed) add this:
<input type="text" name="rssfeed" />
If you have the "remember me" cookies working on this page, and you'd like this field to also be remembered, look for your "remember me" and "forget me" functions (towards the top of your page), and just add the line that I have in red/bold text:
function rememberMe (f) {
var now = new Date();
fixDate(now);
now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
setCookie('mtcmtauth', f.author.value, now, ", HOST, ");
setCookie('mtcmtmail', f.email.value, now, ", HOST, ");
setCookie('mtcmthome', f.url.value, now, ", HOST, ");
setCookie('mtcmtrssfeed', f.rssfeed.value, now, ", HOST, ");
}
function forgetMe (f) {
deleteCookie('mtcmtmail', ", HOST);
deleteCookie('mtcmthome', ", HOST);
deleteCookie('mtcmtauth', ", HOST);
deleteCookie('mtcmtrssfeed', ", HOST);
f.email.value = ";
f.author.value = ";
f.url.value = ";
f.rssfeed.value =";
}
Now look towards the bottom for the page for the code below and add what I have in red/bold
<script type="text/javascript" language="javascript">
<!–
document.comments.email.value = getCookie("mtcmtmail");
document.comments.author.value = getCookie("mtcmtauth");
document.comments.url.value = getCookie("mtcmthome");
document.comments.rssfeed.value = getCookie("mtcmtrssfeed");
//–>
</script>
Part Two: Getting the field to be included in the email notification
This is the part that has to be re-done each time you upgrade (or replace your comments.pm file). Your Comments.pm file is (probably) located in this path:
mt/lib/MT/App/Comments.pm
Look for this line (probably around line 82):
$comment->author(remove_html(scalar $q->param('author')));
and add this line below it:
$comment->rssfeed($q->param('rssfeed'));
Look for this line (probably around line 150):
$app->translate('URL:') . ' ' . $comment->url . "\n\n" .
and add this line below it:
$app->translate('RSS Feed:') . ' ' . $comment->rssfeed. "\n\n" .
That's it.