欢迎光临

木子屋

标题: Dvbbs V8.2.0 RC1修改：在楼主的贴子中标明&#34;[楼主]&#34;字样

作者: dnawo

日期: 2008-01-30 06:25 PM

分类: 程序修改

内容: 本次修改主要针对dispbbs.asp，修改的地方共有四处：
1.增加全局变量G_PostUserName
复制内容到剪贴板 程序代码Dim G_PostUserName
2.修改LoadTopicInfo函数(红色新增)
复制内容到剪贴板 程序代码Sub LoadTopicInfo()
AnnounceID = Dvbbs.CheckNumeric(Request("ID"))
If 0=AnnounceID Then Dvbbs.AddErrCode(30):Dvbbs.Showerr()
G_CurrentPage = Dvbbs.CheckNumeric(Request("star"))
If 0=G_CurrentPage Then G_CurrentPage=1
Skin=Request("Skin")
If Skin="" or Not IsNumeric(Skin) Then Skin=Dvbbs.Board_setting(42)
Dim Rs, SQL, iLockSet, iTopicMode, sMove
sMove = request("move")
iLockSet = Dvbbs.CheckNumeric(Dvbbs.Board_Setting(71))
SQL="Select top 1 TopicID,boardid,title,hits,isvote,child,pollid,LockTopic,PostTable,BoardID,TopicMode,DateAndTime,Expression,GetMoneyType,PostUserName From Dv_topic where "
If ""=sMove Then
SQL = SQL & ("topicID=" & AnnounceID)
Else
SQL = SQL & "BoardID=" & Dvbbs.BoardID & " and topicID"
If "next"=sMove Then
SQL = SQL & ("<" & AnnounceID & " order by topicID desc")
Else
SQL = SQL & (">" & AnnounceID & " order by topicID")
End If
End If
If Not IsObject(Conn) Then ConnectionDatabase
Set Rs=Dvbbs.iCreateObject("Adodb.RecordSet")
Rs.Open SQL,Conn,1,3
Dvbbs.SqlQueryNum=Dvbbs.SqlQueryNum+1
If Rs.eof or Rs.bof Then
If ""<>sMove Then
Response.Write "<script language=""javascript"">alert(""已经是最后一条主题了！"");history.go(-1);</script>"
Rs.Close
Set Rs=Nothing
Response.End
Else
Dvbbs.AddErrcode(32)
End If
Else
If CStr(Rs("BoardID"))<>CStr(Dvbbs.BoardID) Then Dvbbs.AddErrCode(29)
G_Hits = Dvbbs.CheckNumeric(Rs("hits"))
Rs("hits") = G_Hits+1
G_LockTopic = Rs("LockTopic")
If 0=G_LockTopic And iLockSet<>0 And Datediff("d", Rs("DateAndTime"),Now())>iLockSet Then
G_LockTopic = 1
Rs("LockTopic") = G_LockTopic
End If
On Error Resume Next
Rs.Update
If Err Then Err.Clear
G_TopicTitle = Rs("title")
G_IsVote = Rs("isvote")
G_Childs = Rs("child")
G_PollID = Rs("pollid")
G_Expression = Rs("Expression")
T_GetMoneyType = Rs("GetMoneyType")
TotalUsetable = Rs("PostTable")
iTopicMode = Rs("topicmode")
AnnounceID = Rs("TopicID")
G_PostUserName = Rs("PostUserName")
End If
Rs.Close
Set Rs=Nothing
Dvbbs.Showerr()
G_TopicTitle = Dvbbs.ChkBadWords(G_TopicTitle)
ReplyID = Dvbbs.CheckNumeric(Request("ReplyID"))
If 0=ReplyID Then ReplyID=AnnounceID
If iTopicMode<>1 Then G_TopicTitle=replace(G_TopicTitle, "<", "<")
Dvbbs.Stats = G_TopicTitle
G_Childs = G_Childs+1
Select Case iTopicMode
Case 2 G_TopicTitle = "<font color=""red"">"&G_TopicTitle&"</font>"
Case 3 G_TopicTitle = "<font color=""blue"">"&G_TopicTitle&"</font>"
Case 4 G_TopicTitle = "<font color=""green"">"&G_TopicTitle&"</font>"
Case Else
End Select
End Sub
3.增加一个函数IsPostUser
复制内容到剪贴板 程序代码Function IsPostUser(UserName)
If G_PostUserName=UserName Then
IsPostUser = "<font color=""red"">[楼主]</font>"
Else
IsPostUser = ""
End If
End Function
4.在ParseUserNode函数中找到如下部分并修改(红色新增)
复制内容到剪贴板 程序代码Case "richname"
s = G_UserList(26, i-1)
Select Case s
Case 0 s2= Dvbbs.mainsetting(9)
Case 1 s2= Dvbbs.mainsetting(7)
Case 2 s2= Dvbbs.mainsetting(7)
Case 3 s2= Dvbbs.mainsetting(5)
Case 4 s2= "red"
Case 5 s2= "red"
Case 6 s2= "gray"
Case 7 s2= Dvbbs.mainsetting(11)
Case 8 s2= "red"
Case Else s2= Dvbbs.mainsetting(5)
End Select
s=Split(Split(Application(Dvbbs.CacheName &"_groupsetting").documentElement.selectSingleNode("usergroup[@usergroupid='"& G_UserList(26, i-1) &"']/@groupsetting").text,",")(58),"§")
TPL_Echo "<span style=""width:105px;filter:glow(color='"&s2&"',strength='2');"">"&(s(0)&UserName&IsPostUser(UserName)&s(1)&"</span>")
OK，修改完毕！

+ 查看当前日志评论 (2)

登录

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 1.734 ms

返回

标题: Dvbbs V8.2.0 RC1修改：在楼主的贴子中标明&#34;[楼主]&#34;字样

你没有权限发表评论

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 1.734 ms

返回

标题: Dvbbs V8.2.0 RC1修改：在楼主的贴子中标明&#34;[楼主]&#34;字样

评论内容:

== dnawo 2009-05-21 08:38 AM ----

可参考《个人网站与动网整合步骤(支持PDO1.0)》一文。

== Rogue 2009-05-20 11:47 AM ----

木子，您好。我现在做一个asp.net2.0的网站，想把Dvbbs8.2SQL版的用户整合一下。不知道您能不能详细讲一下您的方法。谢谢！QQ：3849410 Email：384941@qq.com

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 3.844 ms

返回