|
主题:[分享] 解决幻灯显示文章字数问题,另添加了KS首页幻灯 [收藏主题] | 转到: |
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
下载修改后 KS_RefreshFunctionCls.asp 直接覆盖 ^-^ 由于文件大雨20K 我还不能传上去........ing 还有幻灯标签 里面的CSS, <!-- [此贴子已经被作者于2007-2-12 19:35:43编辑过] |
|
支持(0) | 反对(0) 顶端 底部 |
2 .添加KS首页幻灯方法 同样 打开 KS_Cls/KS_RefreshFunctionCls.asp 1. 99 行 (Else) 前面加入 elseif Cint(SlideType)=3 then If Not RS.Eof Then DIM TempContent KS_C_Slide = "<Script Language=""JavaScript"">" & vbCrLf KS_C_Slide = KS_C_Slide & "var sPicArr = new Array();"& vbCrLf N=0 Do While Not RS.Eof If ChannelID=1 Then PicUrl = Trim(RS("PicUrl")) Else PicUrl = Trim(RS("PhotoUrl")) TempTitle = KSCMS.GotTopic(RS("Title"), TitleLen) TempContent = KSCMS.GotTopic(RS("ArticleContent"), 100) LinkArrStr=KSCMS.GetInfoUrl(ChannelID,RS) if N=0 then dim PicUrl_0,TempTitle_0,TempContent_0,LinkArrStr_0 PicUrl_0 = PicUrl TempTitle_0 = TempTitle TempContent_0 = TempContent LinkArrStr_0 = LinkArrStr end if KS_C_Slide = KS_C_Slide & "sPicArr["&N&"] = new Array('"&PicUrl&"','"&TempTitle&"','"&TempContent&"','"&LinkArrStr&"');"& vbCrLf N=N+1 RS.MoveNext Loop KS_C_Slide=KS_C_Slide & "function GetObj(objName){" & vbcrlf KS_C_Slide=KS_C_Slide & "if(document.getElementById){" & vbcrlf KS_C_Slide=KS_C_Slide & "return eval('document.getElementById(""' + objName + '"")');" & vbcrlf KS_C_Slide=KS_C_Slide & "}else if(document.layers){" & vbcrlf KS_C_Slide=KS_C_Slide & "return eval(""document.layers['"" + objName +""']"");" & vbcrlf KS_C_Slide=KS_C_Slide & "}else{" & vbcrlf KS_C_Slide=KS_C_Slide & "return eval('document.all.' + objName);" & vbcrlf KS_C_Slide=KS_C_Slide & "}" & vbcrlf KS_C_Slide=KS_C_Slide & "}" & vbcrlf KS_C_Slide=KS_C_Slide & "var plPic = new Image();" & vbcrlf KS_C_Slide=KS_C_Slide & "var gIndex = 0;" & vbcrlf KS_C_Slide=KS_C_Slide & "function SlidePic(index){" & vbcrlf KS_C_Slide=KS_C_Slide & "gIndex = index;" & vbcrlf KS_C_Slide=KS_C_Slide & "if ('Microsoft Internet Explorer' == navigator.appName)" & vbcrlf KS_C_Slide=KS_C_Slide & "{" & vbcrlf KS_C_Slide=KS_C_Slide & "document.images[""slidePic""].filters.item(0).Apply();" & vbcrlf KS_C_Slide=KS_C_Slide & "}" & vbcrlf KS_C_Slide=KS_C_Slide & "document.images[""slidePic""].src = sPicArr[index][0];" & vbcrlf KS_C_Slide=KS_C_Slide & "document.images[""slidePic""].alt = sPicArr[index][1];" & vbcrlf KS_C_Slide=KS_C_Slide & "GetObj(""slidePicLink"").href = sPicArr[index][3];" & vbcrlf KS_C_Slide=KS_C_Slide & "GetObj(""slideTitle"").innerHTML = ""<a href='""+sPicArr[index][3]+""' target=_blank class=links title='全文'>""+sPicArr[index][1]+""</a>"";" & vbcrlf KS_C_Slide=KS_C_Slide & "GetObj(""slideContent"").innerHTML = "" "" + sPicArr[index][2] + "" <span class='uline'><a href='"" + sPicArr[index][3] + ""'>详细 »</a>""" & vbcrlf KS_C_Slide=KS_C_Slide & "if((index+1)<sPicArr.length) plPic.src = sPicArr[index+1][0];" & vbcrlf KS_C_Slide=KS_C_Slide & "for(var i=0;i<sPicArr.length;i++){" & vbcrlf KS_C_Slide=KS_C_Slide & "GetObj(""item""+i).className = ""itemOff"";" & vbcrlf KS_C_Slide=KS_C_Slide & "GetObj(""item""+i).onmouseover = function(){return false;}" & vbcrlf KS_C_Slide=KS_C_Slide & "GetObj(""item""+i).onmouseout = function(){return false;}" & vbcrlf KS_C_Slide=KS_C_Slide & "}" & vbcrlf KS_C_Slide=KS_C_Slide & "GetObj(""item""+index).className = ""itemOn"";" & vbcrlf KS_C_Slide=KS_C_Slide & "if ('Microsoft Internet Explorer' == navigator.appName)" & vbcrlf KS_C_Slide=KS_C_Slide & "{" & vbcrlf KS_C_Slide=KS_C_Slide & "document.images[""slidePic""].filters.item(0).play();" & vbcrlf KS_C_Slide=KS_C_Slide & "}" & vbcrlf KS_C_Slide=KS_C_Slide & "}" & vbcrlf KS_C_Slide=KS_C_Slide & "function NextPic(){" & vbcrlf KS_C_Slide=KS_C_Slide & "gIndex = ((gIndex+1)>=sPicArr.length?0:(gIndex+1));" & vbcrlf KS_C_Slide=KS_C_Slide & "SlidePic(gIndex);" & vbcrlf KS_C_Slide=KS_C_Slide & "}" & vbcrlf KS_C_Slide=KS_C_Slide & "function PrevPic(){" & vbcrlf KS_C_Slide=KS_C_Slide & "gIndex = ((gIndex-1)<0?(sPicArr.length-1):(gIndex-1));" & vbcrlf KS_C_Slide=KS_C_Slide & "SlidePic(gIndex);" & vbcrlf KS_C_Slide=KS_C_Slide & "}" & vbcrlf KS_C_Slide=KS_C_Slide & "var sid;" & vbcrlf KS_C_Slide=KS_C_Slide & "function inislide()" & vbcrlf KS_C_Slide=KS_C_Slide & "{" & vbcrlf KS_C_Slide=KS_C_Slide & "if(sid==null) sid = setInterval('NextPic()', "&ChangeTime&");" & vbcrlf KS_C_Slide=KS_C_Slide & "}" & vbcrlf KS_C_Slide=KS_C_Slide & "function pauseslide()" & vbcrlf KS_C_Slide=KS_C_Slide & "{" & vbcrlf KS_C_Slide=KS_C_Slide & "clearInterval(sid);" & vbcrlf KS_C_Slide=KS_C_Slide & "sid = null;" & vbcrlf KS_C_Slide=KS_C_Slide & "}" & vbcrlf KS_C_Slide=KS_C_Slide & "</SCRIPT>" & vbcrlf KS_C_Slide=KS_C_Slide & "<div id=""Slide"">" & vbcrlf KS_C_Slide=KS_C_Slide & "<div class=""pic""><a id=""slidePicLink"" href="""&LinkArrStr_0&""" "&OpenTypeStr&"><img border=""0"" src="""&PicUrl_0&""" width="""&PicWidth&""" height="""&PicHeight&""" id=""slidePic"" onMouseOver=""pauseslide();"" style=""FILTER: revealtrans(duration=2.0,transition=12);"" onMouseOut=""inislide();"" name=""slidePic""></a></div>" & vbcrlf KS_C_Slide=KS_C_Slide & "<script>document.getElementById(""slidePic"").src=sPicArr[0][0];</script>" & vbcrlf KS_C_Slide=KS_C_Slide & "<script>document.getElementById(""slidePicLink"").href=sPicArr[0][3];</script>" & vbcrlf KS_C_Slide=KS_C_Slide & "<div class=""num"">" & vbcrlf KS_C_Slide=KS_C_Slide & "<script language=""javascript"">" & vbcrlf KS_C_Slide=KS_C_Slide & "for(var i=0;i<sPicArr.length;i++){document.writeln(""<span id='item""+i+""' onClick='SlidePic(""+i+"");'>""+(i+1)+""</span> "");}" & vbcrlf KS_C_Slide=KS_C_Slide & "</script>" & vbcrlf KS_C_Slide=KS_C_Slide & "</div>" & vbcrlf KS_C_Slide=KS_C_Slide & "<div class=""text""><h3 id=""slideTitle""></h3>" & vbcrlf KS_C_Slide=KS_C_Slide & "<p id=""slideContent""></p>" & vbcrlf KS_C_Slide=KS_C_Slide & "<script language=""javascript""> GetObj(""slideTitle"").innerHTML=sPicArr[0][1];GetObj(""slideContent"").innerHTML = sPicArr[0][2] + "" <span><a href='"" + sPicArr[0][3] + ""'>详细 »</a>""</script>" & vbcrlf KS_C_Slide=KS_C_Slide & "</div>" & vbcrlf KS_C_Slide=KS_C_Slide & "<script language=""javascript"">inislide();</script>" & vbcrlf KS_C_Slide=KS_C_Slide & "</div> Else KS_C_Slide = "":RS.Close:Set RS = Nothing end if 2 . 127行 找到 Case 1:SqlStr = "SELECT TOP " & TopNum & " ID,PicUrl,Tid,Title,TitleType,TitleFontColor,TitleFontType,InfoPurview,ReadPoint,Fname,Changes FROM KS_Article Where " & Param & " Verific=1 AND DelTF=0 AND PicNews=1 AND Slide=1 And " & KSCMS.GetSpecialPara(SpecialID) & " ORDER BY ID Desc" 替换成 Case 1:SqlStr = "SELECT TOP " & TopNum & " ID,PicUrl,Tid,Title,TitleType,TitleFontColor,TitleFontType,InfoPurview,ReadPoint,Fname,Changes,ArticleContent FROM KS_Article Where " & Param & " Verific=1 AND DelTF=0 AND PicNews=1 AND Slide=1 And " & KSCMS.GetSpecialPara(SpecialID) & " ORDER BY ID Desc" 3. 在摸板里面直接使用函数标签 {$GetSlide(1,"0",true,220,180,2,"_blank",true,30,"",5000,3,"0")} 替换掉类识 {LB_首页幻灯片文章} 红色部分3请不要修改,其他根据自己要求修改即可 要是觉得这样不方便 找到\Admin\Include\Label\GetSlide.asp 195 行 If SlideType = 1 Then .Write ("<input name=""SlideType"" type=""radio"" value=""1"" checked>普通幻灯片 ") .Write ("<input name=""SlideType"" type=""radio"" value=""2"">Flash幻灯片") Else .Write ("<input type=""radio"" value=""1"" name=""SlideType"">普通幻灯片 ") .Write ("<input type=""radio"" value=""2"" name=""SlideType"" checked>Flash幻灯片") End If 替换成 If SlideType = 1 Then .Write ("<input name=""SlideType"" type=""radio"" value=""1"" checked>普通幻灯片 ") .Write ("<input name=""SlideType"" type=""radio"" value=""2"">Flash幻灯片") .Write ("<input name=""SlideType"" type=""radio"" value=""3"">自定义幻灯片1") .Write ("<input name=""SlideType"" type=""radio"" value=""4"">自定义幻灯片2")'留作添加下一个用 Else .Write ("<input type=""radio"" value=""1"" name=""SlideType"">普通幻灯片 ") .Write ("<input type=""radio"" value=""2"" name=""SlideType"" checked>Flash幻灯片") .Write ("<input name=""SlideType"" type=""radio"" value=""3"">自定义幻灯片1") .Write ("<input name=""SlideType"" type=""radio"" value=""4"">自定义幻灯片2")'留作添加下一个用 End If 就可以在后台直接添加标签 说明 以上行均为没有修改前 KS_Cls/KS_RefreshFunctionCls.asp 文件的绝对行,请细心修改.
[此贴子已经被作者于2007-2-12 19:32:34编辑过] |
|
支持(0) | 反对(0) 顶端 底部 |
<上一主题 | 下一主题 > |