评论回复(免修改数据库) For PJblog3

到:
    If post_DisKEY = 1 Then post_DisKEY = 0 Else post_DisKEY = 1
在下面插入:
    '是否管理员可见
    If Comm_IsLegal = 1 Then Comm_IsLegal = 1 Else Comm_IsLegal = 0


找到:
    AddComm = Array(Array("blog_ID", post_logID), Array("comm_Content", post_Message), Array("comm_Author", username), Array("comm_DisSM", post_DisSM), Array("comm_DisUBB", post_DisUBB), Array("comm_DisIMG", post_disImg), Array("comm_AutoURL", post_DisURL), Array("comm_PostIP", getIP), Array("comm_AutoKEY", post_DisKEY))


修改为:
    AddComm = Array(Array("blog_ID", post_logID), Array("comm_Content", post_Message&"[Reply_JieLiao]"&Comm_IsLegal), Array("comm_Author", username), Array("comm_DisSM", post_DisSM), Array("comm_DisUBB", post_DisUBB), Array("comm_DisIMG", post_disImg), Array("comm_AutoURL", post_DisURL), Array("comm_PostIP", getIP), Array("comm_AutoKEY", post_DisKEY))


打开Template下的static.htm
找到:
                      <input name="log_DisKey" type="checkbox" id="label7" value="1" />
                      禁止自动转换关键字</label>

在下面插入:
                    <label for="label8"><input name="Comm_IsLegal" type="checkbox" id="label8" value="1" />是否管理员可见</label>


打开common下的chche.asp,找到:
    If action<>2 Then
        Dim Comment_Item_Len
        If UBound(blog_Comment, 1) = 0 Then
            NewComment = ""
            Exit Function
        End If
        Comment_Item_Len = UBound(blog_Comment, 2)
        dim url
        For i = 0 To Comment_Item_Len
            If blog_postFile = 2 Then
                   url = SiteURL&"article/"&blog_Comment(1, i)&".htm#comm_"&blog_Comment(0, i)
              else
                   url = SiteURL&"article.asp?id="&blog_Comment(1, i)&"#comm_"&blog_Comment(0, i)
            end if
            NewComment = NewComment&"<a class=""sideA"" href="""&url&""" title="""&blog_Comment(2, i)&" 于 "&blog_Comment(4, i)&" 发表评论"&Chr(10)&CCEncode(CutStr(DelQuote(blog_Comment(3, i)), 100))&""">"&CCEncode(CutStr(DelQuote(blog_Comment(3, i)), 25))&"</a>"
      
        Next

        For i = 0 To Comment_Item_Len
        Next
,在For之前插入一句
Dim Comm_content
把这中间一段的代码全部换成(不包括这两句):
            Comm_content = Split(blog_Comment(3, i),"[Reply_JieLiao]")   '用[Reply_JieLiao]作分隔符,取消原来的增加字段.
            
            If blog_postFile = 2 Then
                   url = SiteURL&"article/"&blog_Comment(1, i)&".htm#comm_"&blog_Comment(0, i)
              else
                   url = SiteURL&"article.asp?id="&blog_Comment(1, i)&"#comm_"&blog_Comment(0, i)
            end if
            If Comm_content(1)=1 then
                NewComment = NewComment&"<a class=""sideA"" href="""&url&""" title="""&blog_Comment(2, i)&" 于 "&blog_Comment(4, i)&" 发表评论"&Chr(10)&CCEncode(CutStr(DelQuote(Comm_content(0)), 100))&""">博主可见</a>"
            Else
                NewComment = NewComment&"<a class=""sideA"" href="""&url&""" title="""&blog_Comment(2, i)&" 于 "&blog_Comment(4, i)&" 发表评论"&Chr(10)&CCEncode(CutStr(DelQuote(Comm_content(0)), 100))&""">"&CCEncode(CutStr(DelQuote(Comm_content(0)), 25))&"</a>"
            End If

下载文件 update
下载文件 update1

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



[本日志由 小戒 于 2008-08-28 02:42 AM 编辑]
上一篇: eval(function(p,a,c,k,e,d)系列加密解密javascript程序
下一篇: 让你的侧边栏区分动静态 For PJblog3
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: 评论 回复 PJBLOG
相关日志:
评论: 8 | 引用: 0 | 查看次数: -
hyphon
回复回复hyphon[2009-03-02 04:31 PM | | | del]
引用来自 jessicamiao 引用来自 jessicamiao
额?还是需要转成全静态的啊?

挺不错的~
mildnes
回复回复mildnes[2008-10-30 05:07 PM | | | del]
修改了后,就是cls_article出错
第一处是
Microsoft VBScript 编译器错误 错误 '800a040e' <br/><br/>'loop' 语句缺少 'do' <br/><br/>/class/cls_article.asp,行 325 <br/><br/>Loop第二处是

引用内容 引用内容
Microsoft VBScript 编译器错误 错误 '800a0411'

名称重定义

/class/cls_article.asp,行 333

Dim urlLink




回复来自 小戒 的评论 小戒 于 2008-10-30 08:09 PM 回复
应该是修改错误。不过157版本已经自带了此功能了。如果还没升级的话建议升级。
jessicamiao
回复回复jessicamiao[2008-08-19 08:26 PM | | | del]
额?还是需要转成全静态的啊?
半岛饭盒
回复回复半岛饭盒[2008-08-13 01:33 PM | | | del]
哎。。为什么我改过了还是出错的呢。。。麻烦博主能把改过的文件发一份吗。。不知道是不是自己改错了。。
回复来自 小戒 的评论 小戒 于 2008-08-13 14:51:53 回复
请问提示什么错误?正常情况下是没有问题的。
残阳博客
回复回复残阳博客[2008-08-11 06:10 PM | | | del]
广告挡住了很多文字  看不明白那写的什么   无法更改
回复来自 小戒 的评论 小戒 于 2008-08-11 18:26:54 回复
广告没有遮住文字。放心修改吧。
ilank
回复回复ilank[2008-08-10 11:19 AM | | | del]
很强,也很复杂,支持一下
feiyang
回复回复feiyang[2008-08-04 04:36 AM | | | del]
恩,隐隐约约发先这个问题~


还有个问题是为什么我的游客评论不了呢?

会员正常,留言板也正常。

我可能改错了哪里,但找了很久找不到啊,

请指点一下

ilmusic.cn
回复来自 小戒 的评论 小戒 于 04/08/2008 11:53:17 回复
测试了,正常.
十年博客
回复回复十年博客[2008-07-28 09:03 AM | | | del]
不错
发表评论
昵 称:
密 码: 游客发言不需要密码.
邮 箱: 支持Gravatar头像.
网 址: 输入网址便于回访.
内 容:
验证码:
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.