故障现象
评论的时候提示必须填写电子邮箱地址
修复过程
其实修复起来很简单。只要修改主题文件夹下的 comments.php。大概在87行。
原:有问题
<li class="form-inline"><label class="hide" for="email">邮箱</label><input class="ipt" type="text" name="email" id="email" value="" tabindex="3" placeholder="邮箱" <?php if ($this->options->commentsRequireMail): ?> required<?php endif; ?>><span class="text-muted">邮箱 (必填)</span></li>
修复后:正常
<li class="form-inline"><label class="hide" for="mail">邮箱</label><input class="ipt" type="text" name="mail" id="mail" value="" tabindex="3" placeholder="邮箱" <?php if ($this->options->commentsRequireMail): ?> required<?php endif; ?>><span class="text-muted">邮箱 (必填)</span></li>
其实就是把几个email
改成mail
。
修复完毕来测试下评论把!
备注
此方法也可适用于其他typecho主题无法评论。