给日志评论增加回复功能for pjblog (4/5凌晨更新,修改越权提交的BUG,危险)

.2找到
<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
%>
找到
              <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
%>              
1.3找到:
   <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>
在下面插入(注意:如果没有做过我发布的《评论留言加上邮箱和网址(可防垃圾广告)》,请将下面这段代码中的“12,pcount”改成“10,pcount”,13改成11:
       <%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%>
1.4找到
blog_CommID=commArr(0,Pcount)
       blog_CommAuthor=commArr(2,Pcount)
       blog_CommContent=commArr(1,Pcount)
在下面插入(注意里面的12,按实际情况修改,可能为10)
   CommReplyContent=commArr(12,Pcount)
1.5找到
       UBB_TextArea_Height="150px;"
       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
1.6找到
             if not stat_CommentAdd then
          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
2。打开blogcomm.asp,在最后一个之前插入如下代码:

fu

上一页  [1] [2] [3] [4]  下一页



[本日志由 小戒 于 2008-09-18 08:47 PM 编辑]
上一篇: 留言评论邮件通知博主For pjblog2.6|2.7
下一篇: Sql Server 和 Access 操作数据库结构Sql语句
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: 评论 留言 PJBLOG
相关日志:
评论: 16 | 引用: 0 | 查看次数: -
一切平凡
回复回复一切平凡[2008-09-14 09:45 PM | | | del]
抱歉,我重新把圖上傳了!麻煩請至下列開圖!

我用的版本是PJBlog2 v2.7 Build05
回复来自 小戒 的评论 小戒 于 2008-09-15 02:31 PM 回复
我还是没看到图。
一切平凡
回复回复一切平凡[2008-09-14 09:40 PM | | | del]
抱歉,此張圖片在http://bbs.pjhome.net/thread-27746-12-1.html可以看到!
我用的版本是PJBlog2 v2.7 Build05
一切平凡
回复回复一切平凡[2008-09-12 02:27 PM | | | del]
请问我照上述步骤修改了之后是可以用了,也确实把第2步中的***去掉了,
但为何时间显示是为 y-d-m 呢?请问是否我有哪个步骤改错了?



回复来自 小戒 的评论 小戒 于 2008-09-14 09:35 AM 回复
我一直打不开你的图,升级到157后已经集成了此功能,请问你的是什么版本呢?
jojo
回复回复jojo[2008-07-04 01:35 AM | | | del]
引用来自 weixing 引用来自 weixing
都按照步骤做了啊,之前功能是完全正常的,最近才出现这个问题的。而且期间我也没有对Blog做任何改动,也没装任何插件。
测试一下是否好用
牛喜喜
回复回复牛喜喜[2008-06-19 11:26 PM | | | del]
老大,装了AJAX评论的应该如何修改?
阿达
回复回复阿达[2008-05-09 11:12 AM | | | del]
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>

回复来自 小戒 的评论 小戒 于 05/09/2008 18:04:37 回复
可能是错误断行了,后面少了个双引号。
崇焱
回复回复崇焱[2008-04-16 07:38 PM | | | del]
修改完成后一点击日志就出错,出错原因为DATETIME,请问......
slim
回复回复slim[2008-04-16 10:15 AM | | | del]
博主,是不是应该将回复内容放在留言区域里更好呢
weixing
回复回复weixing[2008-04-07 11:07 PM | | | del]
都按照步骤做了啊,之前功能是完全正常的,最近才出现这个问题的。而且期间我也没有对Blog做任何改动,也没装任何插件。
weixing
回复回复weixing[2008-04-05 11:59 PM | | | del]
就是我对别人的评论回复后,系统提示成功了
但是在我评论的地方没有发现我的回复啊~这是什么情况
回复来自 小戒 的评论 小戒 于 06/04/2008 00:28:01 回复
第1.3步改了吗?
发表评论
昵 称:
密 码: 游客发言不需要密码.
邮 箱: 支持Gravatar头像.
网 址: 输入网址便于回访.
内 容:
验证码:
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.