ecshop 商品詳情頁用戶評論取消E-MAIL郵箱驗證的方法 ,最模板提供教程,轉載請注明網址!
該方法同樣適用于文章詳情頁用戶評論
1、修改comments_list.lbi文件
將javascript代碼中的下面部分刪除或者暫時注釋掉整理
if (cmt.email.length > 0)
{
if (!(Utils.isEmail(cmt.email)))
{
alert(cmt_error_email);
return false;
}
}
else
{
alert(cmt_empty_email);
return false;
}
2、修改comment.php文件
將
if (empty($cmt) || !isset($cmt->type) || !isset($cmt->id) || !is_email($cmt->email))
修改為
if (empty($cmt) || !isset($cmt->type) || !isset($cmt->id))
3、
有朋友建議干脆去掉 e-mail 那一欄,那么在做完前兩步修改后繼續進行如下操作即可
修改 comments_list.lbi
將
<tr>
<td align="right">E-mail:</td>
<td>
<input type="text" name="email" id="email" maxlength="100" value="{$smarty.session.email|escape}" class="inputBorder"/>
</td>
</tr>
刪除
同時將
cmt.email = frm.elements[‘email‘].value;
也刪除
如果沒有找到if (empty($cmt) || !isset($cmt->type) || !isset($cmt->id) || !is_email($cmt->email))
在comment.php里有 elseif (!is_email($cmt->email))
{
$result[‘error‘] = 1;
$result[‘message‘] = $_LANG[‘error_email‘];
}
把這個注釋掉就可以
|
新聞熱點
疑難解答