DerekAllard.com

Comment Notification

Edit: With I moved this site to ExpressionEngine the information in this post is obsolete.

This blog now features notification of follow-up comments (if you want it).  I wanted to detail how it works.
notification screenshot

  1. When you make a post, your email is saved in a cookie so that you don’t need to keep re-entering it on my site (this becomes important in a minute).
  2. When the comment is sent, I check if you’ve selected follow-up notification.  If you do, it is saved in the database as “true”.  Another field is used to track the status of notification.  It starts off as “false”, meaning no notification has been sent.
  3. When a new post is made, the blog combs through all other comments in that post checking to see if anyone should be notified (it only allows 1 notification per post in the event that someone has commented twice).  If you’ve selected to be notified, it sends you an email, and changes your notification status to “true” (you’ve been notified).
  4. At this point, you’ve been notified once, and I won’t continue to annoy you.  However, if you visit the post again, it uses the cookie set above to recognize you, and sets the status back to “false”, meaning it will notify you again if another new comment is made after your visit.

It’s the best system I could think of that doesn’t require user sign-ups, but I’m sure there’s room for improvement.  I welcome any additional feedback as comments below, or feel free to contact me personally.

This entry was made on and filed into Noteworthy.

Comments

No comments yet, be the first to write one!