Remove mandatory e-mail from comment form

Does anyone know where to change the comment form, so that either e-mail adress is not mandatory, or to remove the e-mail field completely... I just want a comment form having a "name" field, and then the comment itself.

Paul.

Comments

  • To get rid of the field you have to take it out of the image.php in the theme. To keep zenphoto from complaining about the email you have to change the following code from the function addComment under the Image class in classes.php

    if (empty($email) || !is_valid_email_zp($email) || empty($name) || empty($comment)) {
    return false;
    }

    should be changed to

    if (empty($name) || empty($comment)) {
    return false;
    }
  • Thanks a lot, that solved it right away.
  • No Problem. Glad it worked out for you!
  • I have ver-1.0.8.2. I have commented the email and the site in the image.php under themes as well and This does not work to me...

    I just basically don't need the email and the site on my comment section, anyone has ever done this? any HELP will be appreciated. Thanks in advance!

    regards
  • It seems like a good enhancement to zenphoto would be some options as to which comment fields are required.
  • In tonight's nightly build will be a new set of options so that you can decide what comment posting fields are mandatory. You will still have to eliminate the HTML of any fields you don't want your theme to show.
  • Hi there, thanks for your reply, however im a bit still lost... is the new version in the download section has this option? thanks again!
  • You need to download the nightly build. Then go to the admin--options and comment configuration tabs. There you will see the options. Note that the nightly build may not be as stable as the released version. (However, so far we have had only one really bad nightly, so you are pretty safe. Most of us developers are running this build.)
Sign In or Register to comment.