天行健,君子以自强不息~ 地势坤,君子以厚德载物~
27 Mar
'*********************************************************
' 目的:
'*********************************************************
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 & "<li><a href="""& objArticle.Url & "#cmt" & objRS("comm_ID") & """ title=""" & objRS("comm_PostTime") & """>" & objRS("comm_Author") & ":"+s+"</a></li>"
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搜索Function BlogReBuild_GuestComments()'*********************************************************
' 目的:
'*********************************************************
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 & "<li><a href="""& ZC_BLOG_HOST & "guestbook.asp" & "#cmt" & objRS("comm_ID") & """ title=""" & objRS("comm_PostTime") & """>" & objRS("comm_Author") & ":"+s+"</a></li>"
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
'*********************************************************效果见本站,修改前注意备份。
zp1214
2009-3-27 12:59:27 1回复留言
zp1214
2009-3-27 13:01:03 2回复留言
zp1214
2009-3-27 13:59:53 3回复留言
simonhere
2009-3-27 17:01:32 4回复留言
wulinfo
2009-3-27 19:06:17 5回复留言
haphic
2009-4-3 14:46:55 6回复留言
wzyakai
2009-4-14 1:10:26 7回复留言
n8频道
2010-1-20 17:59:45 8回复留言
kiakia
2010-9-2 10:49:58 9回复留言
Leave a reply
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。(支持有建树的评论,谢绝灌水。)