I finally got around to learning PHP, and having notification of new comments on my blog sent to my email has been something I have wanted for a while. If you want something, sometimes you have to do it yourself!
This is a beta release of a modification to the MODx UserComment snippet. Use at your own risk.
This version of UserComments functions exactly like version 1.1, but adds the ability to be
notified by email when a new comment is posted. You set the email address to be sent to like
this:
[!UserComments? ¬ify=`
[email protected]`!]
in your &formtpl chunk, you must add the following hidden input:
<input type="hidden" name="send" value="true" />
the following input names are can be specified in your form template:
<input name="commentname" type="text" /> - the name of the person posting.
<input name="email" type="text" /> - the email of the person posting.
<input name="subject" type="text" /> - the subject of the post.
<textarea name="comment" cols="50" rows="8"></textarea> - the content of the post.
this snippet will look for the names commentname, email, subject, and comment to format the notification email. The URL of the page that the comment was posted to will also be displayed in the email.
I heavily commented every modification I made to the snippet, You can search for "*** scottydelicious" to see what I changed. This works pretty slick on my site, so if you have a chance to try it out and see if it works, let me know.
later
-sD-