|
楼主 |
发表于 2007-5-13 13:52:26
|
显示全部楼层
89、7.1首页显示今日到访的办法,加显示开关!
<p>################################################################</p><p><strong>1:修改INDEX.ASP</strong></p><p>找到<br/>TempStr = Replace(TempStr,"{$nonewpic}",template.pic(0))<br/>TempStr = Replace(TempStr,"{$isnewpic}",template.pic(1))<br/>TempStr = Replace(TempStr,"{$islockpic}",template.pic(2))<br/>下面添加<br/><br/>TempStr = Replace(TempStr,"{$show_today}",show_today()) '今日到访</p><p><br/><strong>2:到INDEX.ASP最后面在%>之前加入</strong></p><p>function show_today()<br/>dim TempStr,sql,rs,i<br/>sql="select UserName,LastLogin from [Dv_User] orders"<br/>set rs=Dvbbs.Execute(sql)<br/>If Not RS.Eof then<br/>SQL=Rs.GetRows(-1)<br/>rs.close:set rs=nothing<br/>for i=0 To Ubound(SQL,2)<br/>if FormatDateTime(sql(1,i),vbShortDate)=FormatDateTime</p><p>(date,vbShortDate) then<br/>TempStr=TempStr&"<a href=dispuser.asp?name="&sql(0,i)&" </p><p>target=""_blank"" title=查看"&sql(0,i)&"的个人资料>"<br/>TempStr=TempStr&""&sql(0,i)&"</a>"<br/><br/>TempStr=TempStr&"&nbsp;&nbsp;" <br/>end if<br/>next<br/>else<br/>TempStr=TempStr&"今日没有会员到访"<br/>end if<br/>show_today=TempStr<br/>end function</p><p><br/><br/><br/></p><p><br/><strong>3:然后风格界面模板总管理修改摸版<br/>[分页面模板(page_index)] 进入 界面风格<br/>在template.html(6)<br/>最上面添加</strong></p><p><br/><table cellpadding=3 cellspacing=1 align=center class=tableborder1><TR ><Th align=left>&nbsp;<img src="Skins/Default/plus.gif" onload=switchRuler(this)> 今日到访成员 </Th></TR><TR><br/><TD width=100% vAlign=middle class=tablebody1>{$show_today}</TD><br/></TR> </table><BR></p><p><strong>4:在Main.JS最后加入以下代码吧</strong></p><p>//烟神修改的今日来访自动隐藏!<br/>var default_RulerSts = "off" //默认参数设置"on"=打开 , "off"=关闭*<br/>function switchRuler(obj) //今日来访开关JS<br/>{<br/>var cn="ruler"+self.location.hostname.toString().replace(/\./g,"")<br/>var disp=getCookie(cn),isInit=0<br/>if(typeof(disp)!="string"||disp=="")disp=default_RulerSts=="off"?"none":"block"<br/>if(typeof(obj)=="object"){<br/>try{<br/>obj.onload = new Function("return false")<br/>obj.onclick = new Function("switchRuler()")<br/>obj.style.cursor = "hand"; obj.border="0"<br/>obj.align= "absmiddle" ; isInit=1;<br/>}<br/>catch(e){}<br/>}<br/>else{obj=window.event.srcElement;disp=disp=="none"?"block":"none"}<br/>try{<br/>var table=obj.parentElement.parentElement.parentElement.rows(1)<br/>table.style.display=disp<br/>obj.alt=(disp=="block"?"隐藏":"显示")+"今日来访"<br/>obj.src="Skins/Default/"+(disp=="block"?"nofollow.gif":"plus.gif")<br/>if(!isInit)setCookie(cn,disp,7) //设置保存7天<br/>}<br/>catch(e){}<br/>}</p><br style="CLEAR: both;"/> |
|