修改3.6中以"|"分隔的主菜单的方法
用的3.6中的页面顶部的以"|"分隔的主菜单,把它改成下图的样子,将修改方法写出来,可能有朋友需要。
最后效果:

在function.asp约212行查找下面的内容
'页面显示类函数 Public Sub head()
dim strtmp,strrow,strcol,channelstr,i,j if Site_Setting(2)=1 then channelstr="| " Name="channel" If ObjIsEmpty() Then loadchannel() strrow=Split(value,"@@@") For i = 0 to UBound(strrow)-1 strcol=Split(strrow(i),"|||") '增频道打开方式 if strcol(3)=1 then channelstr=channelstr & "<a href=" & strcol(2) &" class=Channel target='_blank'>" else channelstr=channelstr & "<a href=" & strcol(2) &" class=Channel>" end if if strcol(1)="" then channelstr=channelstr & strcol(0) else channelstr=channelstr & "<img src="&strcol(1)&">" end if channelstr=channelstr & "</a> | " next else channelstr="" end if strtmp = Replace(mainhtml(2),"{$channel}",channelstr)
改为:
dim strtmp,strrow,strcol,channelstr,i,j if Site_Setting(2)=1 then channelstr="<table><tr><td class='topmenubg' width='60'>" Name="channel" If ObjIsEmpty() Then loadchannel() strrow=Split(value,"@@@") For i = 0 to UBound(strrow)-1 strcol=Split(strrow(i),"|||") '频道打开方式 if strcol(3)=1 then channelstr=channelstr & "<a href=" & strcol(2) &" class=Channel target='_blank'>" else channelstr=channelstr & "<a href=" & strcol(2) &" class=Channel>" end if if strcol(1)="" then channelstr=channelstr & strcol(0) else channelstr=channelstr & "<img src="&strcol(1)&">" end if if i<UBound(strrow)-1 then channelstr=channelstr & "</a></td><td width='5'></td><td class='topmenubg' width='60'>" else channelstr=channelstr & "</a></td></tr></table>" end if next else channelstr="" end if strtmp = Replace(mainhtml(2),"{$channel}",channelstr)
我新定义了一个class='topmenubg',内容是 .topmenubg { background-image: url('Skin/gu/topmenubg.GIF'); background-repeat: no-repeat; text-align:center }
|