BBS|论坛

注册

 

发新话题 回复该主题

四图轮播效果插件 [复制链接] 查看:3332回复:7

1#
好几年没来过风讯论坛了,昨晚有人找我给写个插件代码,又捡起来了。时间仓促,慌乱中写了这个插件,多批评。 插件实现效果: 可以从任何栏目调用4幅选了 幻灯 的新闻,进行展示。 效果图: 1 最终实现的前台效果图
您所在的用户组无法下载或查看附件
如下链接http://www.ptdj.com.cn/flash.asp 2 后台增加后的插件效果图
您所在的用户组无法下载或查看附件
,多了个 四图切换 3 网站最后的效果图
您所在的用户组无法下载或查看附件
需要覆盖的主核心文件:
您所在的用户组无法下载或查看附件
需要配合的js文件:
您所在的用户组无法下载或查看附件
发上来 让大家 嘲笑下 呵呵。 另外感谢 QQ 名为 IT自由人 的兄弟,感谢风讯开发团队。 n久没上来了, AD 一下, 鄙人QQ:22484708
最后编辑dsd007 最后编辑于 2010-07-24 22:50:04
分享 转发
TOP
2#

回复: 四图轮播效果插件

回复3#ray1106呵呵所以一时取舍不了啊火狐有时不知道为啥安完插件重启很慢
TOP
3#

回复: 四图轮播效果插件

回复3#ray1106呵呵所以一时取舍不了啊火狐有时不知道为啥安完插件重启很慢
TOP
4#

这个是个好东西,下了研究下
TOP
5#

看看 ,不错。
The future is in wow gold my hands.
TOP
6#

好东西,顶起来
汇聚网络力量,专注网站建设!
TOP
7#

这个打开太慢了吧。。郁闷死
TOP
8#

Response.write GetWeather("苏州","Sina")



Function GetWeather(CityStr,SiteKey)
dim Rurl,TakenHTML
if SiteKey="Sohu" then
  Rurl="http://weather.news.sohu.com/hd.php"
else
  Rurl="http://weather.sina.com.cn/images/figureWeather/map/eastOfChina.html"
end if
TakenHTML = GetPageContent(Rurl)
Response.Flush
Select case SiteKey
case "Sina"
  GetWeather=GetContent(TakenHTML,"drawcitys(' 城市:"&CityStr&"市 <br>","'); return true;",0)
case "Sohu"
  GetWeather=GetContent(TakenHTML,"城市:"&CityStr&"",""">",0)
case else
  GetWeather=GetContent(TakenHTML,"drawcitys(' 城市:"&CityStr&"市 <br>","'); return true;",0)
end Select
End Function

Function GetPageContent(Url)
Dim HTTPObj
On Error Resume Next
Set HTTPObj = Server.CreateObject("Microsoft.XMLHTTP")
With HTTPObj
  .Open "Get", Url, False, "", ""
  .Send
End With
if HTTPObj.Readystate <> 4 then
  Set HTTPObj = Nothing
  GetPageContent = False
  Exit Function
end if
GetPageContent = ResponseStrToStr(HTTPObj.ResponseBody)
Set HTTPObj = Nothing
End Function

Function ResponseStrToStr(BodyStr)
Dim ADOStreamObj
Set ADOStreamObj = Server.CreateObject("ADODB.Stream")
ADOStreamObj.Type = 1
ADOStreamObj.Mode = 3
ADOStreamObj.Open
ADOStreamObj.Write BodyStr
ADOStreamObj.Position = 0
ADOStreamObj.Type = 2
ADOStreamObj.Charset = "GB2312"
ResponseStrToStr = ADOStreamObj.ReadText
ADOStreamObj.Close
Set ADOStreamObj = Nothing
End Function
Function GetContent(Str,StartStr,LastStr,Flag)
Dim SearchIndex
On Error Resume Next
if Instr(LCase(Str),LCase(StartStr)) > 0 then
  Select Case Flag
   Case 0
    GetContent = Right(Str,Len(Str) - Instr(LCase(Str),LCase(StartStr)) - Len(StartStr) + 1)
    SearchIndex = Instr(LCase(GetContent),LCase(LastStr))
    if SearchIndex <= 0 then
     GetContent = ""
    else
     GetContent = Left(GetContent,SearchIndex - 1)
    end if
   Case 1
    GetContent = Right(Str,Len(Str) - Instr(LCase(Str),LCase(StartStr)) + 1)
    GetContent = Left(GetContent,Instr(LCase(GetContent),LCase(LastStr)) + Len(LastStr) - 1)
   Case 2
    GetContent = Right(Str,Len(Str) - Instr(lcase(Str),LCase(StartStr))-Len(StartStr) + 1)
   Case else
    GetContent = ""
  End Select
else
  GetContent = ""
end if
if Err.Number <> 0 then GetContent = ""
End Function
TOP
发新话题 回复该主题