|
原版boards.asp
176行:
=====================================================
if boardnum = -1 then
response.write "<table width=" & def_bbs_screenwidth & " border=0 cellspacing=1 cellpadding=6 align=center bgcolor=" & def_bbs_darkcolor & " class=tbone><tr bgcolor=" & def_bbs_lightestcolor & " class=tbbg9><td colspan=4>找不到任何版面</td></tr></table>"
else
---------------
下面加入:
jsboardname
-------------------------------------
===========================================================================
182行:
-----------------------
document.write("<tr height=20><td><a href=board/board.asp?boardid=" + boardid + ">" + boardname + "</a>");
---------------------------
下面加入:
----------------------------
document.write(" 子版:");
if(lowerboard!=""){
var lbdid;
lbdid = lowerboard.split(",");
for(var lbd=0;lbd<lbdid.length;lbd++){
var tmpbid = lbdid[lbd];
document.write("<a href=board/board.asp?boardid=" + tmpbid + ">" + board_name[tmpbid] + "</a> ");
}
}else{
document.write("无");
}
--------------------------------
文件末尾:
====================================================
main%>
------------------------
上面,
加入:
-----------------------
sub jsboardname
dim rs,sql
sql = "select boardid,boardname from leadbbs_boards where hiddenflag = 0 "
set rs = con.execute(sql)
gbl_dbnum = gbl_dbnum + 1
if not rs.eof then%>
<script language=javascript>
var board_name = new array();
var number=1,i,t=1;
function jsb(d0,d1)
{
if(d0==0)return;
board_name[d0] = d1
t+=1;
}
</script>
<script language=javascript>
<%
response.write "" & vbcrlf & "jsb("""
response.write rs.getstring(,,""",""",""");" & vbcrlf & "jsb(""","")
rs.close
set rs = nothing
response.write ""","""","""","""");"
%></script>
<%
else
rs.close
set rs = nothing
end if
end sub
-----------------------------------------
ok了.
可以实现无子版时什么也不显示,只要把下面这两句上下交换一下就可以了。
document.write(" 子版:");
if(lowerboard!=""){
一定要用默认模板才会显示,用其它的模板不行,不可能一次修改所有模板的.但你可以禁止其它模板使用他们自己的首页js
修改模板也显示子版:
修改模板的首页js,-----------------------
document.write("<tr height=20><td><a href=board/board.asp?boardid=" + boardid + ">" + boardname + "</a>");
---------------------------
下面加入:
----------------------------
document.write(" 子版:");
if(lowerboard!=""){
var lbdid;
lbdid = lowerboard.split(",");
for(var lbd=0;lbd<lbdid.length;lbd++){
var tmpbid = lbdid[lbd];
document.write("<a href=board/board.asp?boardid=" + tmpbid + ">" + board_name[tmpbid] + "</a> ");
}
}else{
document.write("无");
}
--------------------------------
http://w.leadbbs.com/a/a.asp?b=200&id=2102762 |
|