首页调用精华新帖回复会员状态[神话推荐]

By 神话工作室 at 2007-06-09 • 0人收藏 • 1241人看过

最新注意:请将代码中 and ForumID<>3  去掉,一时疏忽。

演示地址:

http://www.tele6.com.cn/bbs

如图所示:

 

修改方法:只需要修改首页( Default.asp )即可。

一:打开 Default.asp 文件。

二:找到下列代码 (在27行-32行)

End If
Rs.Close


if GroupID>0 then

三:修改为

End If
Rs.Close

%>

<script language="javascript">
<!--
function shuaxintu(){
document.getElementById("img1").src=document.getElementById("img1").src+"?1";
}
function NewsDivChange(id,idx,allNum)
{
    style1="Menu_TabOne rt_sb_t_nv";
    style2="Menu_TabTwo rt_sb_t_nv";
    for(i=1;i<=allNum;i++)
    {
        document.getElementById("News"+id+"_title_"+i).className=style2;
        document.getElementById("News"+id+"_div_"+i).style.display="none";
    }
    document.getElementById("News"+id+"_title_"+idx).className=style1;
    document.getElementById("News"+id+"_div_"+idx).style.display="block";
   
}
-->
</script>
<style>
.Menu_TabOne{border:#FFFFFF 1px solid;;float:left;margin-right:5px;text-align:center;width:100px;padding:3px;}
.Menu_TabTwo{float:left;margin-right:5px;text-align:center;width:100px;padding:3px;}
</style>
<table width=100% align=center border=0 cellpadding=2 cellspacing=0>
<tr align=center>
<td width=30% valign=top>
<table width=100% align=center border=0 cellpadding=5 cellspacing=1  id=CommonListArea>
<tr id=CommonListTitle align=center>
<td><div class="Menu_TabOne" id="News1_title_1">
     <a href="ShowBBS.asp?menu=GoodTopic" onmouseover="return NewsDivChange('1','1',2);">最新精华主题</a></div>
    <div class="Menu_TabTwo" id="News1_title_2">
     <a href="ShowBBS.asp?menu=GoodTopic" onmouseover="return NewsDivChange('1','2',2);">全年最火主题</a></div></td></tr>
<tr id=CommonListCell align=center>
<td>
<div id="News1_div_1"><table width=99% align=center border=0 cellpadding=0 cellspacing=0><%
Sql="Select Top 10 * From [BBSXP_Threads] where IsApproved=1 and IsDel=0 and IsGood=1 order by ThreadID Desc"
Set Rs=Conn.Execute(sql)
Do While Not Rs.EOF
Topicq=ReplaceText(Rs("Topic"),"<[^>]*>","")
Response.Write "<tr height=18><td><IMG Src=images/Forum_nav.gif border=0> <a href=ShowPost.asp?ThreadID="&Rs("ThreadID")&" Title='"&Topicq&"'>"&Left(""&Topicq,18)&"</a></td></tr>"
Rs.MoveNext
Loop
Rs.Close
%></table></div><div id="News1_div_2" style="display:none;"><table width=99% align=center border=0 cellpadding=0 cellspacing=0><%
Sql="Select Top 10 * From [BBSXP_Threads] Where IsDel=0 Order by TotalReplies Desc,LastViewedDate"
Set Rs=Conn.Execute(sql)
Do While Not Rs.EOF
Topicq=ReplaceText(Rs("Topic"),"<[^>]*>","")
Response.Write "<tr height=18><td><IMG Src=images/Forum_nav.gif border=0> <a href=ShowPost.asp?ThreadID="&Rs("ThreadID")&" Title='"&Topicq&"'>"&Left(""&Topicq,18)&"</a></td></tr>"
Rs.MoveNext
Loop
Rs.Close
%></table></div></td></tr>
</table>
</td>
<td width=40% valign=top>
<table width=100% align=center border=0 cellpadding=5 cellspacing=1  id=CommonListArea>
<tr id=CommonListTitle align=center>
<td><div class="Menu_TabOne" id="News2_title_1">
     <a href="ShowBBS.asp" onmouseover="return NewsDivChange('2','1',3);">最新发表主题</a></div>
    <div class="Menu_TabTwo" id="News2_title_2">
     <a href="ShowBBS.asp" onmouseover="return NewsDivChange('2','2',3);">最新回复主题</a></div>
    <div class="Menu_TabTwo" id="News2_title_3">
     <a href="ShowBBS.asp" onmouseover="return NewsDivChange('2','3',3);">村民博客榜单</a></div></td></tr>
<tr id=CommonListCell align=center>
<td>
<div id="News2_div_1"><table width=99% align=center border=0 cellpadding=0 cellspacing=0>
<%
Sqlnew="Select Top 10 * From [BBSXP_Threads] Where IsDel=0 and ForumID<>3 Order by ThreadID Desc"
Set Rs=Conn.Execute(sqlnew)
Do While Not Rs.EOF
Topicq=ReplaceText(Rs("Topic"),"<[^>]*>","")
Response.write "<tr class=a3 height=18><td><IMG Src=images/Forum_nav.gif border=0> <a href=ShowPost.asp?ThreadID="&Rs("ThreadID")&" Title='"&Topicq&"'>"&Left(""&Topicq,20)&"</a></td><td align=right><a href=Profile.asp?username="&rs("PostAuthor")&">"&rs("PostAuthor")&"</a></td></tr>"
Rs.MoveNext
Loop
Rs.Close
%></table></div><div id="News2_div_2" style="display:none;"><table width=99% align=center border=0 cellpadding=0 cellspacing=0>
<%
Sqlnew="Select Top 10 * From [BBSXP_Threads] Where IsDel=0 and ForumID<>3 Order by Lasttime Desc,LastViewedDate"
Set Rs=Conn.Execute(sqlnew)
Do While Not Rs.EOF
Topicq=ReplaceText(Rs("Topic"),"<[^>]*>","")
Response.write "<tr class=a3 height=18><td><IMG Src=images/Forum_nav.gif border=0> <a href=ShowPost.asp?ThreadID="&Rs("ThreadID")&" Title='"&Topicq&"'>"&Left(""&Topicq,20)&"</a></td><td align=right><a href=Profile.asp?username="&rs("lastname")&">"&rs("Lastname")&"</a></td></tr>"
Rs.MoveNext
Loop
Rs.Close
%></table></div><div id="News2_div_3" style="display:none;"><table width=99% align=center border=0 cellpadding=0 cellspacing=0>
<%
Sqlblog="Select Top 10 * From [BBSXP_Users] where WebLog<>'' Order by UserActivityTime Desc"
Set Rs=Conn.Execute(sqlblog)
Do While Not Rs.EOF
%><tr class=a3 height=18><td> <IMG Src=images/Forum_nav.gif border=0> <a href=Profile.asp?UserName=<%=rs("username")%>><%=rs("username")%></a></td><td align="left"><a href="<%=rs("WebLog")%>" target="_blank"><%=left(rs("WebLog"),40)%>..</a></td></tr>
<%
Rs.MoveNext
Loop
Rs.Close
%></table>
 </div></td></tr>
</table>
</td>
<td width=30% valign=top>
<table width=100% align=center border=0 cellpadding=5 cellspacing=1  id=CommonListArea>
<tr id=CommonListTitle align=center>
<td><div class="Menu_TabOne" id="News3_title_1">
     <a href="Members.asp" onmouseover="return NewsDivChange('3','1',2);">优秀村民排行</a></div>
    <div class="Menu_TabTwo" id="News3_title_2">
     <a href="Members.asp" onmouseover="return NewsDivChange('3','2',2);">最近活动村民</a></div></td></tr>
<tr id=CommonListCell align=center>
<td><div id="News3_div_1"><table width=99% align=center border=0 cellpadding=0 cellspacing=0>
<%
Sqlblog="Select Top 10 * From [BBSXP_Users] Order by experience Desc"
Set Rs=Conn.Execute(sqlblog)
Do While Not Rs.EOF
%><tr class=a3 height=18><td> <IMG Src=images/Forum_nav.gif border=0> <a href=Profile.asp?UserName=<%=rs("username")%>><%=rs("username")%></a></td><td align="left"><%
ShowRank(rs("experience"))
%><img src="<%=RankIconUrl%>" alt="<%=rs("experience")%>" /> <%=rs("experience")%></td></tr>
<%
Rs.MoveNext
Loop
Rs.Close
%></table></div><div id="News3_div_2" style="display:none;"><table width=99% align=center border=0 cellpadding=0 cellspacing=0>
<%
Sqlblog="Select Top 10 * From [BBSXP_Users] Order by UserActivityTime Desc"
Set Rs=Conn.Execute(sqlblog)
Do While Not Rs.EOF
%><tr class=a3 height=18><td> <IMG Src=images/Forum_nav.gif border=0> <a href=Profile.asp?UserName=<%=rs("username")%>><%=rs("username")%></a></td><td align="left"><%=rs("UserActivityTime")%></td></tr>
<%
Rs.MoveNext
Loop
Rs.Close
%></table></div></td></tr>
</table>
</td>
</tr>
</table>

<%

if GroupID>0 then

 

四:或者直接下载文件覆盖

Default.rar

原贴地址http://bbs.yuzi.net/ShowPost.asp?ThreadID=722667

版权归

<DIV style="FLOAT: left">居小齐 </DIV><DIV style="FLOAT: right"></DIV>所有.

登录后方可回帖

登 录
信息栏

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

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

donate

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

粤公网安备 44030602003677号
粤ICP备17135490号

Loading...