- 如何在ecshop商品详情页用户评论取消E-MAIL邮箱验证的方法
发布时间:2010-06-24 类别:PHP技术 来源:侠客工作室 -
- 1
- 2
- 3
- 4
- 5
商品详情页用户评论取消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‘];
}
把这个注释掉就可以- ☆☆☆技术交流群:5684178☆☆☆
- 上一篇:ecshop首页调用最新评论+(增加显示评论时间)
- 下一篇:如何屏蔽ecshop SQL提示 让注入无能为力!