BBSxp修改大全,修改方法经典收藏大集合(2)

By admin at 2007-05-26 • 0人收藏 • 173人看过

==============================================
论坛分开显示的方法
==============================================
打开default.asp找到下面这段

<font face=Wingdings>v</font> <a href="ShowBBS.asp?menu=4">投票帖子</a>
<font face=Wingdings>v</font></td>
</tr>
</table>

<SCRIPT>valignbottom()</SCRIPT>
<br>
<SCRIPT>valigntop()</SCRIPT>


<SCRIPT>valignbottom()</SCRIPT>
<br>
<SCRIPT>valigntop()</SCRIPT>

删除

再往下找到
<tr class=a1 id=TableTitleLink><td colspan=7 height=25><b> <img src=images/1.gif> <a href=ShowForum.asp?forumid=<%=Rs1("id")%>><%=Rs1("bbsname")%></a></b></td></tr>


改成
</table><SCRIPT>valignbottom()</SCRIPT><br><SCRIPT>valigntop()</SCRIPT><table cellspacing="1" cellpadding="0" width="97%" align="center" border="0" class="a2">
<tr class=a1 id=TableTitleLink><td colspan=7 height=25><b> <img src=images/1.gif> <a href=ShowForum.asp?forumid=<%=Rs1("id")%>><%=Rs1("bbsname")%></a></b></td></tr>
就行了
==============================================
最强帖子调用
==============================================
<!-----首页一周新贴结束----->
<table cellspacing="1" cellpadding="4" width="97%" border="0" class="a2" align="center"><tr class="a1"><td valign="center" align="middle" width="33%">..::最新发表主题::..</td><td valign="center" align="middle" width="33%">..::本周最强人气::.. </td><td valign="center" align="middle" width="33%">..::本周最多回复::.. </td></tr><tr class="a4"><td><%
sql="select top 6 id,icon,topic from forum where deltopic<>1 order by id Desc"
rs.Open sql,Conn
Do While Not RS.EOF
response.write "<IMG src=images/brow/"&rs("icon")&".gif border=0> <a onclick=min_yuzi() target=message href=ShowPost.asp?id="&rs("id")&">"&left(""&rs("topic")&"",17)&"</a><br>"
RS.MoveNext
loop
RS.Close
%></td><td><%
sql="select top 6 id,icon,topic from forum where deltopic<>1 and posttime>"&SqlNowString&"-7 order by Views Desc,lasttime"
rs.Open sql,Conn
Do While Not RS.EOF
response.write "<IMG src=images/brow/"&rs("icon")&".gif border=0> <a onclick=min_yuzi() target=message href=ShowPost.asp?id="&rs("id")&">"&left(""&rs("topic")&"",17)&"</a><br>"
RS.MoveNext
loop
RS.Close
%></td><td><%
sql="select top 6 id,icon,topic from forum where deltopic<>1 and posttime>"&SqlNowString&"-7 order by replies Desc,lasttime"
rs.Open sql,Conn
Do While Not RS.EOF
response.write "<IMG src=images/brow/"&rs("icon")&".gif border=0> <a onclick=min_yuzi() target=message href=ShowPost.asp?id="&rs("id")&">"&left(""&rs("topic")&"",17)&"</a><br>"
RS.MoveNext
loop
RS.Close
%></td></tr></table>
<!-----首页一周新贴结束----->
==============================================
在线情况修改
==============================================
第一:
loading.asp文件修改

---这段代码:---
Set Rs=Conn.Execute(sql)

do while not rs.eof

if NO_count < 6 then
NO_count=NO_count+1
else
NO_count=1
end if


allline=""&allline&"<td width=16% style=word-break:break-all><img src="&rs("userface")&" width=16 height=16> <a href=Profile.asp?username="&rs("username")&">"&rs("username")&"</a></td>"

---改成如下代码:---

username=HTMLEncode(Request.Form("username"))
if username<>"" then whereusername=" where username='"&username&"'"
sql="select * from online "&whereip&" "&whereusername&" order by lasttime Desc"
rs.Open sql,Conn
do while not rs.eof
if NO_count < 6 then
NO_count=NO_count+1
else
NO_count=1
end if

if membercode<4 then
ips=split(rs("ip"),".")
ip=""&ips(0)&"."&ips(1)&".*.*"
else
ip=""&rs("ip")&""
end if


if rs("username")=empty then
username="<img src=images/man1.gif width=16 height=16 title=目前位置:『"&rs("bbsname")&"』"&ip&"> 游客"
elseif rs("eremite")=1 and membercode<4 then
username="<img src=images/noonlin.gif width=16 height=16 alt=隐身会员> 隐 身"
elseif rs("eremite")=5 then
username="<img src=images/ao1.gif width=16 height=16 alt=社区区长><a title=目前位置:『"&rs("bbsname")&"』"&ip&" href=Profile.asp?username="&rs("username")&" alt=查看["&rs("username")&"]个人信息>"&rs("username")&"</a>"
elseif rs("eremite")=4 then
username="<img src=images/ao.gif width=16 height=16 alt=管理员><a title=目前位置:『"&rs("bbsname")&"』"&ip&" href=Profile.asp?username="&rs("username")&" alt=查看["&rs("username")&"]个人信息>"&rs("username")&"</a>"
elseif rs("eremite")=3 then
username="<img src=images/gb(1).gif width=16 height=16 alt=论坛版主><a title=目前位置:『"&rs("bbsname")&"』"&ip&" href=Profile.asp?username="&rs("username")&" alt=查看["&rs("username")&"]个人信息>"&rs("username")&"</a>"
elseif rs("eremite")=2 then
username="<img src=images/messages1.gif width=16 height=16 alt=VIP用户><a title=目前位置:『"&rs("bbsname")&"』"&ip&" href=Profile.asp?username="&rs("username")&" alt=查看["&rs("username")&"]个人信息>"&rs("username")&"</a>"
else
username="<img src=images/messages2.gif width=16 height=16> <a title=目前位置:『"&rs("bbsname")&"』"&ip&" href=Profile.asp?username="&rs("username")&" alt=查看["&rs("username")&"]个人信息>"&rs("username")&"</a>"
end if

allline=""&allline&"<td width=12% style=word-break:break-all>"&username&"</td>"

第四:
Default.asp文件修改

---把以下这段在线统计代码:---

目前论坛总共有 <b><%=onlinemany%></b> 人在线。其中注册用户 <b><%=regonline%></b> 人,访客 <b><%=onlinemany-regonline%></b>
人。近日最高在线 <font color=red><b><%=Application(CacheName&"BestOnline")%></b></font> 人,发生在 <b><%=Application(CacheName&"BestOnlineTime")%></b> </td></tr><tr height="25" style="display:none" id="follow0"><td id="followTd0" align="left" class="a4" width="94%" colspan="5">
 Loading...</td></tr></table></td></tr></table>


---改成如下:---


目前论坛总共有 <b><%=onlinemany%></b> 人在线。其中注册用户 <b><%=regonline%></b> 人,访客 <b><%=onlinemany-regonline%></b>
人。近日最高在线 <font color=red><b><%=Application(CacheName&"BestOnline")%></b></font> 人,发生在 <b><%=Application(CacheName&"BestOnlineTime")%></b> <tr><td height="15">
<font color="#FF0000">名单图例</font>:<img src="images/ao1.gif"> 社区区长 ‖ <img src="images/ao.gif"> 管理员 ‖ <img src="images/gb(1).gif"> 论坛版主 ‖ <img src="images/messages1.gif"> VIP用户 ‖ <img src="images/messages2.gif"> 普通用户 ‖ <img src="images/man1.gif"> 游客/未登录用户 <br></td></tr>
<table width=760 border=0 cellspacing=0 cellpadding=0>
<tr height="25" style="display:none" id="follow0">
<td id="followTd0" align="left" class="a4" width="97%" colspan="5">
 Loading...</td>
</tr>
</table>
</TD></TR></TABLE></TABLE>

第三:
line.asp最底部加入:
<%
sql="Select membercode From [user] where username='"&Request.Cookies("username")&"' "
if membercode=5 then
conn.execute("update [online] set eremite=5 where username='"&Request.Cookies("username")&"'")
elseif membercode=4 then
conn.execute("update [online] set eremite=4 where username='"&Request.Cookies("username")&"'")
elseif membercode=3 then
conn.execute("update [online] set eremite=3 where username='"&Request.Cookies("username")&"'")
elseif membercode=2 then
conn.execute("update [online] set eremite=2 where username='"&Request.Cookies("username")&"'")
end if
%>
==============================================
在线统计,显示“访客”和自动展开


打开loading.asp找到以下代码

if Request("forumid")="0" then
sql="select * from online where username<>'' and eremite<>1"
else
sql="select * from online where forumid="&int(Request("forumid"))&" and username<>'' and eremite<>1"
end if

修改为:

if Request("forumid")="0" then
sql="select * from online"
else
sql="select * from online where forumid="&int(Request("forumid"))&""
end if

再往下找到以下代码

allline=""&allline&"<td width=16% style=word-break:break-all><img src="&rs("userface")&" width=16 height=16> <a href=Profile.asp?username="&rs("username")&">"&rs("username")&"</a></td>"

修改为:

if rs("userface") <> "" and rs("eremite") = "0" then
allline=""&allline&"<td width=16% style=word-break:break-all><img src=images/membercode/"&rs("userface")&".gif> <a href=Profile.asp?username="&rs("username")&" title=目前位置:『"&rs("bbsname")&"』"&rs("act")&" target=_blank>"&rs("username")&"</a></td>"
elseif rs("userface")<> "" and rs("eremite") = "1" then
allline=""&allline&"<td width=16% style=word-break:break-all><img src=images/membercode/0.gif> <a href="&rs("acturl")&" title=目前位置:『"&rs("bbsname")&"』"&rs("act")&" target=_blank>隐身</a></td>"
else
allline=""&allline&"<td width=16% style=word-break:break-all><img src=images/membercode/0.gif> <a href="&rs("acturl")&" title=目前位置:『"&rs("bbsname")&"』"&rs("act")&" target=_blank>访客</a></td>"
end if


自动展开

在deafault.asp中的 Loading.....</td></tr></table></td></tr></table>下面加上
<SCRIPT>loadThreadFollow(0,0)</SCRIPT>即可

如想各版面也自动展开,在showforum.asp的 Loading...</td></tr></tr></table>下面加上<SCRIPT>loadThreadFollow(0,0)</SCRIPT>即可

==============================================
在线情况展开
==============================================
ShowForum.asp
在统计下面加入
<SCRIPT>loadThreadFollow(0,0)</SCRIPT>
<SCRIPT>loadThreadFollow(0,<%=forumid%>)</SCRIPT>
===============================================
严格控制经验发放的
<!-- #include file="setup.asp" -->
<%
if Request.Cookies("username")=empty then error("<li>您还未<a href=login.asp>登录</a>社区")
if Request.Cookies("username")<>empty then
postnum=Conn.Execute("Select posttopic From [user] where username='"&Request.Cookies("username")&"'")(0)
timeneed=3600
sayway="每3600秒换取经验1点"

if postnum<1 then
error2("一张原帖都没有发过就想白赚经验?没门!")
end if
if postnum<=10 and postnum>=1 then
timeneed=7200
sayway="你的原帖小于10,只能每7200秒换取经验1点"
end if
if postnum>10 and postnum<=25 then
timeneed=4500
sayway="你的原帖小于25,只能每4500秒换取经验1点"
end if
if postnum>150 then
timeneed=2550
sayway="你的原帖已经大于150,为了奖励你对论坛的贡献,每2550秒换取经验1点"
end if
time11=fix(DateDiff("s",Request.Cookies("onlinetime"),Now()))-600
timelast=Conn.Execute("SELECT MAX(logtime) AS Expr1 FROM [log] WHERE username = '"&Request.Cookies("username")&"'")(0)
timediff=DateDiff("s",timelast,now())
postnum=Conn.Execute("Select posttopic From [user] where username='"&Request.Cookies("username")&"'")(0)
if membercode<3 then
if timediff<time11 then error2("你上次获取的时间是:"&timelast&",到现在还不足"&timeneed&"秒")
end if


''''''''''''''''''第一次来'''''''''''''''''''''''''''''
if DateDiff("s",Request.Cookies("onlinetime"),Now())>timeneed then
time1=fix(DateDiff("s",Request.Cookies("onlinetime"),Now())/timeneed)
if userlife > 90 then
experienceo=Conn.Execute("Select experience From [user] where username='"&Request.Cookies("username")&"'")(0)
conn.execute("update [user] set userlife=100,experience=experience+"&time1&",landtime='"&now()&"' where username='"&Request.Cookies("username")&"'")
else
conn.execute("update [user] set userlife=userlife+10,experience=experience+"&time1&",landtime='"&now()&"' where username='"&Request.Cookies("username")&"'")
end if

Response.Cookies("onlinetime")=now()
Response.Cookies("addmin")=0
succtitle=Request.Cookies("username")&"获得在线奖励"&time1&"点"
log(""&succtitle&"")
error2("成功!\n\n共增加 "&time1&" 点经验,原来经验 "&experienceo&" 点,现在 "&experienceo+time1&" 点。原因:"&sayway)
end if
''''''''''''''''''''''''''''
if DateDiff("s",Request.Cookies("onlinetime"),Now())<timeneed then
error2("你的在线时长["&DateDiff("s",Request.Cookies("onlinetime"),Now())&"秒]还不够获取经验,至少"&timeneed&"秒,原因:"&sayway)
end if

''''''''''''''''''''''''''''
end if
%>
==============================================
菜单在新窗口打开!
打开setup.asp找到下面代码

response.write "<div class=menuitems><a href="&rs1("url")&">"&rs1("name")&"</a></div>"

用下面代码替换:

response.write "<div class=menuitems><a target=_blank href="&rs1("url")&">"&rs1("name")&"</a></div>"


===============================================
版主列表的形式修改
<script language="JavaScript" type="text/JavaScript">
function jumpmaster(targ,selObj,restore){
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
</script>

<select name="m" size="1" style="width:80;" onChange="jumpmaster('parent',this,1)">
<option>版主列表</option>
<%
moderated=rs1("moderated")
master= Split(moderated, "|")
If moderated="" Then response.write"<option value=bzsq-sq.asp>版主申请</option>"
for i=0 to ubound(master)
if moderated<>"" then response.write"<option value=Profile.asp?username="&master(i)&" >"&master(i)&"</option> "
next
%>
</select>
================================================
当鼠标箭头位于哪一分论坛所在的单元格,该格的背景色就改变,这种特效特别能使单调的论坛列表具有动感,特推荐诸位区长采用!代码修改方法是:

在bbsxp.js文件中找到:

document.write("</td><td bgcolor=FFFFFF>")

把这行改为:

document.write("</td><td bgcolor=FFFFFF onMouseOut=\"bgColor='FFFFFF'\" onMouseOver=\"bgColor='FFF0F0'\">")

其中FFF0F0(淡红色)就是鼠标掠过该格时要变的颜色,可随意改(例如F0FFF0为淡绿色、F0F0FF为淡蓝色)

登录后方可回帖

登 录
信息栏
购买PHP虚拟主机 / VPS

Carbon Forum是一个基于话题的高性能轻型PHP论坛

下载地址:Carbon Forum v5.0.1
QQ群:12607708(QQ我不常上)

donate

手机支付宝扫描上方二维码可向本项目捐款

Loading...