智能选股器自设条件:雪地裸跪求助:BBSXP论坛如何在首页设置每天发帖前三名?

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/11 00:45:43
BBSXP论坛如何在首页设置每天发帖前三名?

需要什么插件?如何设置?

不需要插件,只改Default.asp一个文件:
找到此处:
%>
</table>
<br>
→下面的那段红色代码都加到这之间!
<!-- #include file="inc/line.asp" --><%

<table class=a2 cellspacing=1 cellpadding=0 width=100% align=center border=0>
<tr class=a1 height=25 align=center>
<td width=33%>本周发帖状元</td><td width=33%>本周发帖榜眼</td><td width=33%>本周发帖探花</td>
</tr>
<tr class=a3 align=center>
<%
Count=Conn.Execute("Select Count(ID) From [BBSXP_Posts"&PostsTableName&"] Where PostTime>"&SqlNowString&"-7")(0)
ReDim Usr(Count),Num(Count),TopUsr(2),TopNum(2)
Sql="Select * From [BBSXP_Posts"&PostsTableName&"] Where PostTime>"&SqlNowString&"-7"
Rs.Open Sql,Conn,1
ii=0:UsrAll=""
Do While Not Rs.EOF
ii=ii+1
Usr(ii)=Rs("UserName")
UsrAll=UsrAll+Usr(ii)
Rs.MoveNext
Loop
Rs.Close

For ii=1 to Count
Leng=Len(UsrAll)
UsrAll=Replace(UsrAll,Usr(ii),"")
Num(ii)=(Leng-Len(UsrAll))/Len(Usr(ii))
Next

For ii=1 to Count
If TopNum(0)<Num(ii) then
TopNum(0)=Num(ii):TopUsr(0)=Usr(ii)
end if
Next

For ii=1 to Count
If TopNum(1)<Num(ii) and Usr(ii)<>TopUsr(0) then
TopNum(1)=Num(ii):TopUsr(1)=Usr(ii)
end if
Next

For ii=1 to Count
If TopNum(2)<Num(ii) and Usr(ii)<>TopUsr(0) and Usr(ii)<>TopUsr(1) then
TopNum(2)=Num(ii):TopUsr(2)=Usr(ii)
end if
Next

For ii=0 to 2
Set Rs1=Conn.Execute("[BBSXP_Users] where UserName='"&TopUsr(ii)&"'")
On Error Resume Next
Photo=Rs1("UserPhoto")
if Photo<>empty then
Check=Lcase(Right(Photo,3))
if Check<>"jpg" and Check<>"gif" then Photo=Rs1("Userface")
else
Photo=Rs1("Userface")
end if
ShowRank(Rs1("experience")) '注:6.0的用户不要括号里的红底色代码(即括号是空的!)
%>
<td>
<table width=100% cellpadding=2><tr>
<td width=45% align=center>
<img src="<%=Photo%>" onload='javascript:if(this.width>120)this.width=120;'></td>
<td width=55% valign=top>
<font style=FONT-SIZE:12pt><b><a href=Profile.asp?UserName=<%=TopUsr(ii)%>><%=TopUsr(ii)%></a></b></font><br>
<%=Rs1("UserHonor")%><br>
<img src=<%=RankIconUrl%>><br><br>
等级:<%=RankName%><br>
经验:<%=Rs1("Experience")%><br>
主帖:<%=Rs1("PostTopic")%><br>
回帖:<%=Rs1("PostRevert")%><br>
精华:<%=Rs1("GoodTopic")%><br><hr size=1>
本周共发<%=TopNum(ii)%>帖荣登三甲
</td></tr></table></td>
<%
Set Rs1=Nothing
Next
%>
</tr></table><br>

不会