评论留言加上邮箱和网址
作者:小戒 日期:2007-12-08
到
在其上插入一行,加以下代码
找到
修改为:
5.打开Plugins/GuestBook/guestbook.asp,找到按回车,插入以下代码:
找到
在上面插入以下代码
此默认为EMAIL和网址为选填,如果要为必填,请将上面的修
复制内容到剪贴板
程序代码
程序代码 if filterSpam(post_Message,"../../spam.xml") and stat_Admin=0 then
showmsg "留言发表错误信息","<b>留言中包含被屏蔽的字符</b><br/><a href=""javascript:history.go(-1);"">返回</a>","WarningIcon","plugins"
exit function
end if
showmsg "留言发表错误信息","<b>留言中包含被屏蔽的字符</b><br/><a href=""javascript:history.go(-1);"">返回</a>","WarningIcon","plugins"
exit function
end if
在其上插入一行,加以下代码
复制内容到剪贴板
程序代码
程序代码 if memName=empty and email<>"" and IsValidEmail(email)=false then
showmsg "留言发表错误信息","<b>邮箱格式错误</b><br/><a href=""javascript:history.go(-1);"">返回</a>","WarningIcon","plugins"
exit function
end if
if memName=empty and siteurl<>"" and siteurl<>"http://" and IsRightUrl(siteurl)=false then
showmsg "留言发表错误信息","<b>网址格式错误</b><br/><a href=""javascript:history.go(-1);"">返回</a>","WarningIcon","plugins"
exit function
end if
showmsg "留言发表错误信息","<b>邮箱格式错误</b><br/><a href=""javascript:history.go(-1);"">返回</a>","WarningIcon","plugins"
exit function
end if
if memName=empty and siteurl<>"" and siteurl<>"http://" and IsRightUrl(siteurl)=false then
showmsg "留言发表错误信息","<b>网址格式错误</b><br/><a href=""javascript:history.go(-1);"">返回</a>","WarningIcon","plugins"
exit function
end if
找到
复制内容到剪贴板
程序代码
程序代码 Conn.ExeCute("Insert INTO blog_book(book_Messager,book_face,book_IP,book_Content,book_HiddenReply,email,siteurl) VALUES ('"&username&"','"&face&"','"&getIP()&"','"&post_Message&"',"&hiddenreply&")")
修改为:
复制内容到剪贴板
程序代码
程序代码 Conn.ExeCute("Insert INTO blog_book(book_Messager,book_face,book_IP,book_Content,book_HiddenReply,email,siteurl) VALUES ('"&username&"','"&face&"','"&getIP()&"','"&post_Message&"',"&hiddenreply&",'"&email&"','"&siteurl&"')")
5.打开Plugins/GuestBook/guestbook.asp,找到
复制内容到剪贴板
程序代码
程序代码 <a href="member.asp?action=view&memName=<%=Server.URLEncode(GuestDB("book_Messager"))%>"><b><%=GuestDB("book_Messager")%></b></a> <span class="commentinfo">
复制内容到剪贴板
程序代码
程序代码<%
if trim(GuestDB("email"))<>"" then
response.write " <a href=mailto:"&trim(GuestDB("email"))&" target=_blank><img src=images/email1.gif border=0></a>"
else
response.write " <img src=images/noemail1.gif>"
end if
if trim(GuestDB("siteurl"))<>"" and trim(GuestDB("siteurl"))<>"http://" then
response.write " <a href="&trim(GuestDB("siteurl"))&" target=_blank><img src=images/url1.gif border=0></a>"
else
response.write " <img src=images/nourl1.gif>"
end if
%>
if trim(GuestDB("email"))<>"" then
response.write " <a href=mailto:"&trim(GuestDB("email"))&" target=_blank><img src=images/email1.gif border=0></a>"
else
response.write " <img src=images/noemail1.gif>"
end if
if trim(GuestDB("siteurl"))<>"" and trim(GuestDB("siteurl"))<>"http://" then
response.write " <a href="&trim(GuestDB("siteurl"))&" target=_blank><img src=images/url1.gif border=0></a>"
else
response.write " <img src=images/nourl1.gif>"
end if
%>
找到
复制内容到剪贴板
程序代码
程序代码 <tr><td align="right" width="70"><strong>验证码:</strong></td><td align="left" style="padding:3px;"><input name="validate" type="text" size="4" class="userpass" maxlength="4"/> <%=getcode()%></td></tr>
在上面插入以下代码
复制内容到剪贴板
程序代码
程序代码 <%if memName=empty then%><tr><td align="right" width="70"><strong>邮 箱:</strong></td><td align="left" style="padding:3px;"><input name="myblogemail" type="text" size="18" class="userpass" maxlength="24"/> 请填写您的邮箱.</td></tr><%end if%>
<%if memName=empty then%><tr><td align="right" width="70"><strong>网 址:</strong></td><td align="left" style="padding:3px;"><input name="myblogsiteurl" type="text" class="userpass" value="http://" size="18" maxlength="24"/> 请填写您的网址.</td></tr><%end if%>
<%if memName=empty then%><tr><td align="right" width="70"><strong>网 址:</strong></td><td align="left" style="padding:3px;"><input name="myblogsiteurl" type="text" class="userpass" value="http://" size="18" maxlength="24"/> 请填写您的网址.</td></tr><%end if%>
此默认为EMAIL和网址为选填,如果要为必填,请将上面的
复制内容到剪贴板
程序代码
程序代码if memName=empty and email<>"" and IsValidEmail(email)=false then
[本日志由 小戒 于 2008-05-27 05:25 AM 编辑]
上一篇: PJBLOG去掉最新評論及留言中ubb代碼的方法[本站原創]
下一篇: 留言评论邮件通知博主For pjblog2.6|2.7
文章来自:
Tags: 评论 留言 PJBLOG
相关日志:
评论: 0 | 引用: 0 | 查看次数: -
回复
|
|
]谢谢,我想加上QQ怎么改
我试下看看!
你这个方法修改是必填吗?评论会出错。
Server ?ԏont> ?펳 'ASP 0178 : 80070005'
Server.CreateObject ?Îʴ펳
/common/function.asp??А 8
?첩ȨϞʱ???ԠServer.CreateObject ?ĵ???ܡ??ܾ??ԏÎʡ?
Server ?ԏont> ?펳 'ASP 0178 : 80070005'
Server.CreateObject ?Îʴ펳
/common/function.asp??А 8
?첩ȨϞʱ???ԠServer.CreateObject ?ĵ???ܡ??ܾ??ԏÎʡ?
新版本pj blogcomm.asp代码部分修改了 行不通了哦 
小戒 于 回复
没测试过新版本。呵呵。
prefect! 支持
你的皮肤在1024x768下严重错位。
www.nextway.cn
www.nextway.cn
这样不错了,可以把信箱和主页文字去掉保留图片即可了~
不写邮箱和网址会提示...格式错误啊~
不写邮箱和网址会提示...格式错误啊~
邮箱和网址不要是必须项的为好啊~
要不会给访客带来麻烦,有心的人自然会写这些~
要不会给访客带来麻烦,有心的人自然会写这些~
可以把邮箱和网址以带链接的图片显示出来,效果更佳~
发表评论

