貌似我这很久以前都修改这个,不记得第一个是在谁那看到的了,貌似自己也没整理出来,今天又看到有人问,所以写一下。
/FUNCTION/c_system_base.asp
搜索Function BlogReBuild_Comments()
将整段函数改为
'*********************************************************
' 目的:
'*********************************************************
Function BlogReBuild_Comments()
'plugin node
For Each sAction_Plugin_BlogReBuild_Comments_Begin in Action_Plugin_BlogReBuild_Comments_Begin
If Not IsEmpty(sAction_Plugin_BlogReBuild_Comments_Begin) Then Call Execute(sAction_Plugin_BlogReBuild_Comments_Begin)
If bAction_Plugin_BlogReBuild_Comments_Begin=True Then Exit Function
Next
Dim objRS
Dim objStream
Dim objArticle
'Comments
Dim strComments
Dim s
Dim i
Set objRS=objConn.Execute("SELECT
[log_ID],[comm_ID],[comm_Content],[comm_PostTime],[comm_Author] FROM
[blog_Comment] WHERE [log_ID]>0 ORDER BY [comm_PostTime]
DESC,[comm_ID] DESC")
If (Not objRS.bof) And (Not objRS.eof) Then
For i=1 to ZC_MSG_COUNT
s=objRS("comm_Content")
s=Replace(s,vbCrlf,"")
If (Len(s)>ZC_RECENT_COMMENT_WORD_MAX) And
(ZC_RECENT_COMMENT_WORD_MAX>(Len(ZC_MSG305)+1)) Then
s=Left(s,ZC_RECENT_COMMENT_WORD_MAX-(Len(ZC_MSG305)+1))&ZC_MSG305
Set objArticle=New TArticle
If objArticle.LoadInfoByID(objRS("log_ID")) Then
strComments=strComments & "" & objRS("comm_Author") & ":"+s+"
"
End If
Set objArticle=Nothing
objRS.MoveNext
If objRS.eof Then Exit For
Next
End If
objRS.close
Set objRS=Nothing
strComments=TransferHTML(strComments,"[no-asp]")
Call SaveToFile(BlogPath & "/include/comments.asp",strComments,"utf-8",True)
BlogReBuild_Comments=True
End Function[/code]
搜索Function BlogReBuild_GuestComments()
将整段函数改为:
[code=vb]'*********************************************************
' 目的:
'*********************************************************
Function BlogReBuild_GuestComments()
'plugin node
For Each sAction_Plugin_BlogReBuild_GuestComments_Begin in Action_Plugin_BlogReBuild_GuestComments_Begin
If Not IsEmpty(sAction_Plugin_BlogReBuild_GuestComments_Begin) Then
Call Execute(sAction_Plugin_BlogReBuild_GuestComments_Begin)
If bAction_Plugin_BlogReBuild_GuestComments_Begin=True Then Exit Function
Next
Dim objRS
Dim objStream
Dim objArticle
'Comments
Dim strComments
Dim s
Dim i
Set objRS=objConn.Execute("SELECT
[log_ID],[comm_ID],[comm_Content],[comm_PostTime],[comm_Author] FROM
[blog_Comment] WHERE [log_ID]=0 ORDER BY [comm_ID] DESC")
If (Not objRS.bof) And (Not objRS.eof) Then
For i=1 to ZC_MSG_COUNT
s=objRS("comm_Content")
s=Replace(s,vbCrlf,"")
If (len(s)>ZC_RECENT_COMMENT_WORD_MAX) And
(ZC_RECENT_COMMENT_WORD_MAX>(Len(ZC_MSG305)+1)) Then
s=Left(s,ZC_RECENT_COMMENT_WORD_MAX-(Len(ZC_MSG305)+1))&ZC_MSG305
strComments=strComments & "
" & objRS("comm_Author") & ":"+s+"
"
objRS.MoveNext
If objRS.eof Then Exit For
Next
End If
objRS.close
Set objRS=Nothing
strComments=TransferHTML(strComments,"[no-asp]")
Call SaveToFile(BlogPath & "/include/guestcomments.asp",strComments,"utf-8",True)
BlogReBuild_GuestComments=True
End Function
'*********************************************************
效果见本站,修改前注意备份。
转载请注明:鸟儿博客 » zblog评论和留言改成评论ID+评论内容模式