动网论坛教程:最后回复显示为贴子内容而不是主题的修改方法
2010-07-22 18:58:51 来源:WEB开发网想把首面各版面最后回复的主题改为贴子主题而不是贴子内容的:
savepost.asp中,如下的
If Action = 6 Then
topic=Replace(Replace(cutStr(toptopic,14),chr(10),""),"'","")
If topic="" Then
topic=Replace(cutStr(Content,14),chr(10),"")
Else
topic=Replace(cutStr(topic,14),chr(10),"")
End If
If ihaveupfile=1 Then Dvbbs.Execute("update dv_upfile set F_AnnounceID='"&RootID&"|"&AnnounceID&"',F_Readme='"&Replace(toptopic,"'","")&"',F_flag=0 where F_ID in ("&upfileinfo&")")
Else
If ihaveupfile=1 Then Dvbbs.Execute("update dv_upfile set F_AnnounceID='"&RootID&"|"&AnnounceID&"',F_Readme='"&Topic&"',F_flag=0 where F_ID in ("&upfileinfo&")")
End If
LastPost=Replace(username,"$","") & "$" & AnnounceID & "$" & DateTimeStr & "$" & Replace(cutStr(Content,20),"$","") & "$" & uploadpic_n & "$" & Dvbbs.UserID & "$" & RootID & "$" & Dvbbs.BoardID
LastPost=reubbcode(Replace(LastPost,"'",""))
改成:
If Action = 6 Then
topic=Replace(Replace(cutStr(toptopic,14),chr(10),""),"'","")
If topic="" Then
topic=Replace(cutStr(Content,14),chr(10),"")
Else
topic=Replace(cutStr(topic,14),chr(10),"")
End If
If ihaveupfile=1 Then Dvbbs.Execute("update dv_upfile set F_AnnounceID='"&RootID&"|"&AnnounceID&"',F_Readme='"&Replace(toptopic,"'","")&"',F_flag=0 where F_ID in ("&upfileinfo&")")
更多精彩
赞助商链接