This project is read-only.

Not Requiring Email Address for Comments

Topics: Controls
Jan 12, 2009 at 1:39 PM
Is there a way to not require the email address when someone comments on a blog post, without modifying the code?
Jan 12, 2009 at 2:45 PM
You may disregard this message.

I was able to not require email address or website by modifying three files:  "User controls/CommentView.ascx", "User controls/CommentView.ascx.cs", and "blog.js".

On "CommentView.ascx" and "CommentView.ascx.cs" I simply commented out any reference to the email address or website.  Blog.js was a little more complicated to figure out, but a simple fix after all was said and done.

in "function AddComment(preview)" modify the variables "var email" and "var website".  I set these to strings:

var email = 'Email Address Not Required'
var website = 'Website Not Required'

These values are only noticed in the email sent if comments are being moderated.