[蚂蚁]leadbbs友情链接图片连续不间断滚动
官方原版leadbbs友情链接滚动完以后,会有一片空白,看着不舒服,因此就小修改了下,让图片连续的不间断滚动。如果您已经修改了,就别看了,免得说“早知道了,我早使用了”之类的话,先在主题后加个[原创],哈哈。演示地址:http://2201.x3.yunliao.com/bbs/boards.asp
修改方法:
打开文件:manage/sitemanage/sitelink.asp
搜索语句:
tempstr = tempstr & " <td class=tbhead><img src=images/null.gif width=2 height=3><br><b><font color=ffffff class=headfont>友情链接</font><b></td></tr>" & vbcrlf
'tempstr = tempstr & "<table width=100% border=0 cellspacing=1 cellpadding=7 align=center bgcolor=" & chr(60) & "%=def_bbs_darkcolor" & chr(37) & "> class=tbone>" & vbcrlf
tempstr = tempstr & "<tr bgcolor=<" & chr(37) & "=def_bbs_lightestcolor" & chr(37) & "> class=tbbg9>" & vbcrlf
tempstr = tempstr & " <td>" & vbcrlf
for sql = 0 to ubound(getdata,2)
if getdata(7,sql) = true or getdata(7,sql) = 1 then
getdata(7,sql) = 1
else
getdata(7,sql) = 0
end if
tempstr = tempstr & " " & vbcrlf
if getdata(2,sql) <> "" then tempstr = tempstr & "<a href=""" & htmlencode(getdata(2,sql)) & """ target=_blank>" & vbcrlf
if getdata(3,sql) <> "" then
tempstr = tempstr & "<img src=""" & htmlencode(getdata(3,sql)) & """ width=" & getdata(5,sql) & " height=" & getdata(6,sql) & " border=0 title=""" & htmlencode(getdata(1,sql)) & """ align=absmiddle>"
else
tempstr = tempstr & getdata(1,sql)
end if
if getdata(2,sql) <> "" then tempstr = tempstr & "</a>"
if getdata(7,sql) = 1 then
tempstr = tempstr & "<br><img src=images/null.gif height=4 width=2><br>" & vbcrlf
end if
next
tempstr = tempstr & " </td>" & vbcrlf
tempstr = tempstr & "</tr>" & vbcrlf
tempstr = tempstr & "</table>" & vbcrlf
tempstr = tempstr & "<" & chr(37) & " if gbl_tablebottomstring <> """" then " & chr(37) & "><table width=100% border=0 cellspacing=0 cellpadding=0 align=center><tr><td><" & chr(37) & "=gbl_tablebottomstring" & chr(37) & "></td></tr></table><" & chr(37) & " end if " & chr(37) & ">"
end if
==================================================================
替换为以下内容即可
==================================================================
tempstr = tempstr & " <td class=tbhead><img src=images/null.gif width=2 height=3><br><b><font color=ffffff class=headfont>友情链接</font><b></td></tr></table>" & vbcrlf
tempstr = tempstr & "<div id=demo style=overflow:hidden;height:50;width:<" & chr(37) & "=def_bbs_screenwidth" & chr(37) & ">>" & vbcrlf
tempstr = tempstr & "<table width=100% border=0 cellspacing=1 cellpadding=7 align=center bgcolor=" & chr(60) & "%=def_bbs_darkcolor" & chr(37) & "> class=tbone>" & vbcrlf
tempstr = tempstr & "<tr bgcolor=<" & chr(37) & "=def_bbs_lightestcolor" & chr(37) & "> class=tbbg9>" & vbcrlf
tempstr = tempstr & "<td id=demo1 valign=top><table width=100% border=0 cellspacing=0 cellpadding=0 align=center bgcolor=" & chr(60) & "%=def_bbs_darkcolor" & chr(37) & ">><tr bgcolor=<" & chr(37) & "=def_bbs_lightestcolor" & chr(37) & "> class=tbbg9>" & vbcrlf
for sql = 0 to ubound(getdata,2)
if getdata(7,sql) = true or getdata(7,sql) = 1 then
getdata(7,sql) = 1
else
getdata(7,sql) = 0
end if
if getdata(2,sql) <> "" then tempstr = tempstr & "<td><a href=""" & htmlencode(getdata(2,sql)) & """ target=_blank><img src=""" & htmlencode(getdata(3,sql)) & """ width=" & getdata(5,sql) & " height=" & getdata(6,sql) & " border=0 title=""" & htmlencode(getdata(1,sql)) & """ align=absmiddle></a></td>" & vbcrlf
if getdata(3,sql) <> "" then
else
tempstr = tempstr & getdata(1,sql)
end if
if getdata(2,sql) <> "" then tempstr = tempstr & ""
if getdata(7,sql) = 1 then
end if
next
tempstr = tempstr & "</tr></table></td>" & vbcrlf
tempstr = tempstr & "<td id=demo2 valign=top></td>" & vbcrlf
tempstr = tempstr & "</tr>" & vbcrlf
tempstr = tempstr & "</table>" & vbcrlf
tempstr = tempstr & "</div>" & vbcrlf
tempstr = tempstr & "<script>" & vbcrlf
tempstr = tempstr & "var speed=10" & vbcrlf
tempstr = tempstr & "demo2.innerhtml=demo1.innerhtml" & vbcrlf
tempstr = tempstr & "function marquee(){" & vbcrlf
tempstr = tempstr & "if(demo2.offsetwidth-demo.scrollleft<=0)" & vbcrlf
tempstr = tempstr & "demo.scrollleft-=demo1.offsetwidth" & vbcrlf
tempstr = tempstr & "else{" & vbcrlf
tempstr = tempstr & "demo.scrollleft++" & vbcrlf
tempstr = tempstr & "}" & vbcrlf
tempstr = tempstr & "}" & vbcrlf
tempstr = tempstr & "var mymar=setinterval(marquee,speed)" & vbcrlf
tempstr = tempstr & "demo.onmouseover=function() {clearinterval(mymar)}" & vbcrlf
tempstr = tempstr & "demo.onmouseout=function() {mymar=setinterval(marquee,speed)}" & vbcrlf
tempstr = tempstr & "</script>" & vbcrlf
tempstr = tempstr & "<" & chr(37) & " if gbl_tablebottomstring <> """" then " & chr(37) & "><table width=100% border=0 cellspacing=0 cellpadding=0 align=center><tr><td><" & chr(37) & "=gbl_tablebottomstring" & chr(37) & "></td></tr></table><" & chr(37) & " end if " & chr(37) & ">"
end if
'--------------end----------------
如有错误,请指示!
原帖地址:http://w.leadbbs.com/a/a.asp?b=8&id=2399472
页:
[1]