给日志评论增加回复功能for pjblog (4/5凌晨更新,修改越权提交的BUG,危险)
作者:小戒 日期:2007-12-12
.2找到在之前插入找到将修改为:找到替换为:1.3找到:在下面插入(注意:如果没有做过我发布的《评论留言加上邮箱和网址(可防垃圾广告)》,请将下面这段代码中的“12,pcount”改成“10,pcount”,13改成11:1.4找到在下面插入(注意里面的12,按实际情况修改,可能为10)1.5找到在下面插入1.6找到在其上或其下插入如下代码:2。打开blogcomm.asp,在最后一个之前插入如下代码:
fu
复制内容到剪贴板
程序代码
程序代码<a href=""blogcomm.asp?action=del&commID="&blog_CommID&""" onclick=""if (!window.confirm('是否删除该评论?')) {return false}"">
复制内容到剪贴板
程序代码
程序代码<a href=""article.asp?action=Reply&commID="&blog_CommID&"&ID="&LogID&"#comm_"&blog_CommID&"""><img src=""Plugins/guestbook/reply.gif"" alt=""回复"" border=""0"" style=""margin-bottom:-3px""/></a>
复制内容到剪贴板
程序代码
程序代码<div id="MsgHead">
复制内容到剪贴板
程序代码
程序代码发表评论
复制内容到剪贴板
程序代码
程序代码<%
if action="Reply" then
response.write "回复评论"
else
response.write "发表评论"
end if
%>
if action="Reply" then
response.write "回复评论"
else
response.write "发表评论"
end if
%>
复制内容到剪贴板
程序代码
程序代码 <input name="action" type="hidden" value="post"/>
复制内容到剪贴板
程序代码
程序代码<%
if action="Reply" then
%>
<input name="action" type="hidden" value="Reply"/>
<input name="commID" type="hidden" value="<%=blog_CommID%>"/>
<%
else
%>
<input name="action" type="hidden" value="post"/>
<%
end if
%>
if action="Reply" then
%>
<input name="action" type="hidden" value="Reply"/>
<input name="commID" type="hidden" value="<%=blog_CommID%>"/>
<%
else
%>
<input name="action" type="hidden" value="post"/>
<%
end if
%>
复制内容到剪贴板
程序代码
程序代码 <div class="commentcontent" id="commcontent_<%=blog_CommID%>"><%=UBBCode(HtmlEncode(CheckStr(blog_CommContent)),commArr(4,Pcount),blog_commUBB,blog_commIMG,commArr(7,Pcount),commArr(9,Pcount))%></div>
复制内容到剪贴板
程序代码
程序代码 <%if len(commArr(12,Pcount))>0 then %>
<div class="commenttop"><img src="images/reply.gif" alt="" border="0" style="margin:0px 3px -3px 0px"/><b><%=blog_master%>回复</b> <span class="commentinfo">[<%=DateToStr(commArr(13,Pcount),"Y-m-d H:I A")%>]</span></div>
<div class="commentcontent"><%=UBBCode(HtmlEncode(commArr(12,Pcount)),0,0,0,1,1)%></div>
<%end if%>
<div class="commenttop"><img src="images/reply.gif" alt="" border="0" style="margin:0px 3px -3px 0px"/><b><%=blog_master%>回复</b> <span class="commentinfo">[<%=DateToStr(commArr(13,Pcount),"Y-m-d H:I A")%>]</span></div>
<div class="commentcontent"><%=UBBCode(HtmlEncode(commArr(12,Pcount)),0,0,0,1,1)%></div>
<%end if%>
复制内容到剪贴板
程序代码
程序代码 blog_CommID=commArr(0,Pcount)
blog_CommAuthor=commArr(2,Pcount)
blog_CommContent=commArr(1,Pcount)
blog_CommAuthor=commArr(2,Pcount)
blog_CommContent=commArr(1,Pcount)
复制内容到剪贴板
程序代码
程序代码 CommReplyContent=commArr(12,Pcount)
复制内容到剪贴板
程序代码
程序代码 UBB_TextArea_Height="150px;"
UBB_Tools_Items="bold,italic,underline"
UBB_Tools_Items=UBB_Tools_Items&"||image,link,mail,quote,smiley"
UBB_Tools_Items="bold,italic,underline"
UBB_Tools_Items=UBB_Tools_Items&"||image,link,mail,quote,smiley"
复制内容到剪贴板
程序代码
程序代码 if action="Reply" then
UBB_Msg_Value=UBBFilter(UnCheckStr(CommReplyContent))
end if
UBB_Msg_Value=UBBFilter(UnCheckStr(CommReplyContent))
end if
复制内容到剪贴板
程序代码
程序代码 if not stat_CommentAdd then
response.write ("你没有权限发表留言!")
response.write ("</div></div>")
exit sub
end if
response.write ("你没有权限发表留言!")
response.write ("</div></div>")
exit sub
end if
复制内容到剪贴板
程序代码
程序代码 if action="Reply" and not stat_Admin then
response.write ("你没有权限回复留言!")
response.write ("</div></div>")
exit sub
end if
response.write ("你没有权限回复留言!")
response.write ("</div></div>")
exit sub
end if
复制内容到剪贴板
程序代码
程序代码%>
fu
[本日志由 小戒 于 2008-09-18 08:47 PM 编辑]
上一篇: 留言评论邮件通知博主For pjblog2.6|2.7
下一篇: Sql Server 和 Access 操作数据库结构Sql语句
文章来自: 本站原创
Tags: 评论 留言 PJBLOG
相关日志:
评论: 16 | 引用: 0 | 查看次数: -
请问我照上述步骤修改了之后是可以用了,也确实把第2步中的***去掉了,
但为何时间显示是为 y-d-m 呢?请问是否我有哪个步骤改错了?

小戒 于 回复
但为何时间显示是为 y-d-m 呢?请问是否我有哪个步骤改错了?

我一直打不开你的图,升级到157后已经集成了此功能,请问你的是什么版本呢?
引用来自 weixing都按照步骤做了啊,之前功能是完全正常的,最近才出现这个问题的。而且期间我也没有对Blog做任何改动,也没装任何插件。
老大,装了AJAX评论的应该如何修改? 
Microsoft VBScript 编译器错误 错误 '800a0409'
未结束的字符串常量
/class/cls_article.asp,行 56
TempStr=TempStr&"<a href=""article.asp?action=Reply&commID="&blog_CommID&"&ID="&LogID&"#comm_"&blog_CommID&"""><img src=""Plugins/guestbook/reply.gif"" alt=""回复"" border=""0"" style=""margin-bottom:-3px""/></a>
小戒 于 回复
未结束的字符串常量
/class/cls_article.asp,行 56
TempStr=TempStr&"<a href=""article.asp?action=Reply&commID="&blog_CommID&"&ID="&LogID&"#comm_"&blog_CommID&"""><img src=""Plugins/guestbook/reply.gif"" alt=""回复"" border=""0"" style=""margin-bottom:-3px""/></a>
可能是错误断行了,后面少了个双引号。
修改完成后一点击日志就出错,出错原因为DATETIME,请问......
都按照步骤做了啊,之前功能是完全正常的,最近才出现这个问题的。而且期间我也没有对Blog做任何改动,也没装任何插件。
就是我对别人的评论回复后,系统提示成功了
但是在我评论的地方没有发现我的回复啊~这是什么情况
小戒 于 回复
但是在我评论的地方没有发现我的回复啊~这是什么情况
第1.3步改了吗?
发表评论


回复




我用的版本是PJBlog2 v2.7 Build05