[蚂蚁]自定义区版横排显示及模板
问题帖子来源:[url=http://www.leadbbs.com/a/a.asp?b=30&id=2554907][color=#0000ff]http://www.leadbbs.com/a/a.asp?b=30&id=2554907[/color][/url]
[url=http://www.leadbbs.com/a/a.asp?b=30&id=2554370][color=#0000ff]http://www.leadbbs.com/a/a.asp?b=30&id=2554370[/color][/url]
原始修改提供者:wensui
原始修改参考帖:
boards.asp修改法地址:[url=http://w.leadbbs.com/a/a.asp?b=200&id=2044690][color=#0000ff]http://w.leadbbs.com/a/a.asp?b=200&id=2044690[/color][/url]
_boards.asp修改法地址:[url=http://w.leadbbs.com/a/a.asp?b=200&id=2045513][color=#0000ff]http://w.leadbbs.com/a/a.asp?b=200&id=2045513[/color][/url]
演示图片: http://family.179net.com/bbs/upload/2007/04/15/154752.jpg
[img]http://www.zhumeng.org/attachments/fileType/jpg.gif[/img]此主题相关图片
[url=http://www.zhumeng.org/attachments/2007/04/18/235016.jpg][img]http://www.zhumeng.org/attachments/2007/04/18/235016s.jpg[/img][/url]
作用:所有风格模板将带自定义横排版面,其他未横排版面使用风格自定义模板。
修改方法:
打开boards.asp文件。
1:删除以下蓝色语句,共三处:
a:
[color=blue]<%
if lmt_simplehomepage = 1 then
if getbinarybit(gbl_templetflag,1) = 1 then
server.execute("inc/templet/" & gbl_templetid & "_0.js")
else%>[/color]
b:
}<% [color=blue]end if
else[/color]
if getbinarybit(gbl_templetflag,2) = 1 then
server.execute("inc/templet/" & gbl_templetid & "_1.js")
else%>
c:
}<%[color=blue]end if[/color]
dim boardid,forumpass
2:添加横排版块模板:
搜索语句:
function displayboard(boardid,boardassort,boardname,assortname)
...............
...............
...............
if(num>4)num=0;
}
替换为:横排代码模板下载:[url=http://qjiao.w3.elkj.net/1.js][color=#0000ff]http://qjiao.w3.elkj.net/1.js[/color][/url]
[img]http://www.zhumeng.org/attachments/fileType/rar.gif[/img]此主题相关文件 [url=http://www.zhumeng.org/attachments/2007/04/18/235218.rar]235218.rar[/url]
也可以参考多栏模板代码
3:定义模板样式参数:
搜索语句:
response.write vbcrlf & "displayboard(" & boardid & "," & getdata(1,0) & ",""" & replace(replace(getdata(0,0),"\","\\"),"""","\""") & """,""" & replace(replace(getdata(14,0),"\","\\"),"""","\""") & """);"
替换为:
response.write vbcrlf & "displaysboard(" & boardid & "," & getdata(1,0) & ",""" & replace(replace(getdata(0,0),"\","\\"),"""","\""") & """,""" & replace(replace(replace(getdata(2,0),"\","\\"),"""","\"""),vbcrlf,"\n") & """,""" & replace(replace(getdata(3,0),"\","\\"),"""","\""") & """,""" & getdata(4,0) & """," & getdata(29,0) & "," & getdata(30,0) & ",""" & forumpass & """," & getdata(19,0) & ",""" & replace(replace(replace(getdata(20,0),"\","\\"),"""","\"""),"<","<") & """,""" & replace(replace(getdata(10,0),"\","\\"),"""","\""") & """," & getdata(9,0) & ",""" & replace(replace(getdata(14,0),"\","\\"),"""","\""") & """," & getdata(31,0) & "," & getdata(32,0) & ",""" & replace(replace(getdata(21,0),"\","\\"),"""","\""") & """,""" & getdata(22,0) & """,""" & getdata(23,0) & """,0,""" & getdata(27,0) & """,""" & replace(replace(replace(getdata(35,0),"\","\\"),"""","\"""),"<","<") & """);"
4:自定义横排显示的区版序号
搜索语句:if lmt_simplehomepage = 0 then
修改为:
if lmt_simplehomepage = 0 and getdata(1,0)<>[color=red]7[/color] and getdata(1,0)<>[color=red]11[/color] then
其中的“7”和“11”表示自定义区版序号,可任意定义,想横排显示哪个区就哪个区。需要显示更多只需要添加 and getdata(1,0)<>[color=red]11[/color]这句在其中就可以了。例如:
if lmt_simplehomepage = 0 and getdata(1,0)<>[color=red]7[/color] and getdata(1,0)<>[color=red]11[/color] and getdata(1,0)<>[color=red]15[/color] and getdata(1,0)<>[color=red]21[/color] then
5:附录该问题的其他未经横排显示的模板样式,请在后台模板参数中添加,将某风格选取该模板。
ssss1模板下载:[url=http://qjiao.w3.elkj.net/2.js][color=#0000ff]http://qjiao.w3.elkj.net/2.js[/color][/url]
[img]http://www.zhumeng.org/attachments/fileType/rar.gif[/img]此主题相关文件 [url=http://www.zhumeng.org/attachments/2007/04/18/235244.rar]235244.rar[/url]
也可参考ssss模板
如不想显示区斑竹,删除以下红色代码即可:
document.write("<table width=" + def_bbs_screenwidth + " border=0 cellspacing=0 cellpadding=5 align=center bgcolor=#cccccc><tr bgcolor=#666699><td class=tbhead><img src=images/null.gif width=2 height=3><br><a href=boards.asp?assort=" + boardassort + "><b><font color=white class=headfont>" + assortname + "</font></b></a></td>[color=red]<td align=right class=tbhead><img src=images/null.gif width=2 height=3><br><font color=white class=headfont>" + def_pointsname7 + ":[/color]");
[color=red]displayboardmastlist(assortmaster,5,1);[/color]
document.write("[color=red]</font></td>[/color]</tr></table>");
原帖地址:http://www.leadbbs.com/a/a.asp?b=30&id=2555436 boards.asp和_boards.asp不是一样么? 可崩溃 不知道用什么软件饿 = =\
页:
[1]