网页幻灯片轮播代码_怎么快速实现对幻灯片的统一修改

网页幻灯片轮播代码_怎么快速实现对幻灯片的统一修改   NetCMS有两种幻灯片显示方式:Flash幻灯片和轮换幻灯片。Flash幻灯片是通过将图片新闻中的图片合成Flash后再在页面上显示。轮换幻灯片则是使用脚本进行控制(准确地说,是使用VBScript)。   其实,这两种显示形式差不多,只不过Flash幻灯片是通过Flash实现图片的过渡效果,而轮换幻灯片是利用IE提供的Filter属性实现图片过渡效果的。   鉴于轮换幻灯片

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

    NetCMS有两种幻灯片显示方式:Flash幻灯片和轮换幻灯片。Flash幻灯片是通过将图片新闻中的图片合成Flash后再在页面上显示。轮换幻灯片则是使用脚本进行控制(准确地说,是使用VBScript)。

    其实,这两种显示形式差不多,只不过Flash幻灯片是通过Flash实现图片的过渡效果,而轮换幻灯片是利用IE提供的Filter属性实现图片过渡效果的。

    鉴于轮换幻灯片是通过脚本控制Img标记的Src属性及Div标记的Innerhtml属性来实现图片切换和标题切换的。因此就想实现在图片右边显示新闻导读,效果如下:

网页幻灯片轮播代码_怎么快速实现对幻灯片的统一修改

    轮换幻灯片的标签定义如下:

    [NT:Loop,NT:SiteID=0,NT:LabelType=NorFilt,NT:Number=10,NT:ClassID=0,NT:isSub=true,NT:TitleNumer=25,NT:WCSS=css,NT:ShowTitle=true,
NT:FlashSize=参数1|参数2,NT:Target=_blank][/NT:Loop]

    各参数的意义请参看NetCMS官方网站对此标签的说明(http://www.aspxcms.com/help/label/start.html#NorFilt)。

    现给其增加以下参数:

    NT:HashNaviContent:true或flase,是否显示导读。如果不显示导读,则与原来效果一致。

    NT:NaviContentWidth:导读部分的宽度(px)

    NT:NaviTitleCSS:导读部分标题的CSS样式

    NT:NaviCntCSS:导读部分内容的CSS样式

 

    对NorFilt标签的处理,是由NetCMS.Publish.LabelMass类中的Analyse_NorFilt()方法(NetCMS.Publish/Label/LabelMass_Method4.cs)进行处理的。现将改动后的Analyse_NorFilt()方法提供如下,增加或修改部分均做了注释:

        /// <summary>
        /// 轮换幻灯片
        /// </summary>
        /// <returns></returns>
        public string Analyse_NorFilt()
        {

            string str_NorFilt = “”;
            string str_ClassID = this.GetParamValue(“NT:ClassID”);
            string str_isSub = this.GetParamValue(“NT:isSub”);
            string str_TitleNumer = this.GetParamValue(“NT:TitleNumer”);
            string str_WCSS = this.GetParamValue(“NT:WCSS”);
            string str_ShowTitle = this.GetParamValue(“NT:ShowTitle”);
            string str_FlashSize = this.GetParamValue(“NT:FlashSize”);
            string str_Target = this.GetParamValue(“NT:Target”);

            // 以下由Whitewin于2009-4-21添加
            // 给NorFilt幻灯新闻增加右部的导读。
            string str_HashNaviContent = this.GetParamValue(“NT:HashNaviContent”);//获取导读标记
            string str_NaviContentWidth = this.GetParamValue(“NT:NaviContentWidth”); //获取导读部分宽度
            string str_NaviTitleCSS = this.GetParamValue(“NT:NaviTitleCSS”);   //获取导读部分标题样式
            string str_NaviCntCSS = this.GetParamValue(“NT:NaviCntCSS”);   // 获取导读部分内容文本样式
            // ——————————————————————————–

            string SqlCondition = ” Where [isRecyle]=0 And [isLock]=0 And [SiteID]='” + this.Param_SiteID + “‘ And [NewsType]=1 And SubString([NewsProperty],7,1)=’1′”;
            string SqlOrderBy = ” Order By [CreatTime] Desc”;

            #region 对栏目进行判断
            DataTable dt = null;
            string Sql = string.Empty;
            if (str_ClassID == null || str_ClassID == “-1”)
            {

                if (this._TemplateType == TempType.Class)
                {

                    if (str_isSub == “true”)
                        SqlCondition += ” And [ClassID] In (” + getChildClassID(this.Param_CurrentClassID) + “)”;
                    Sql = “select top ” + Param_Loop + ” * from [” + DBConfig.TableNamePrefix + “News] ” + SqlCondition + ” And ClassID='” + this.Param_CurrentClassID + “‘ ” + SqlOrderBy;
                }
                else
                {

                    Sql = “select top ” + Param_Loop + ” * from [” + DBConfig.TableNamePrefix + “News] ” + SqlCondition + SqlOrderBy;
                }
            }
            else if (str_ClassID == “0”)
            {

                Sql = “select top ” + Param_Loop + ” * from [” + DBConfig.TableNamePrefix + “News]” + SqlCondition + SqlOrderBy;
            }
            else
            {

                if (str_isSub == “true”)
                    SqlCondition += ” And [ClassID] In (” + getChildClassID(str_ClassID) + “)”;
                Sql = “select top ” + Param_Loop + ” * from [” + DBConfig.TableNamePrefix + “News]” + SqlCondition + SqlOrderBy;
            }
            dt = CommonData.DalPublish.ExecuteSql(Sql);
            #endregion 对栏目进行判断

            if (dt != null)
            {

                if (dt.Rows.Count < 2)
                {

                    str_NorFilt = “至少需要两条幻灯新闻才能正确显示幻灯效果”;
                    return str_NorFilt;
                }
                string str_FlashWidth = ” width=’200′”;
                string str_FlashHeight = ” height=’100′”;

                if (str_FlashSize != null)
                {

                    string[] arr_FlashSize = str_FlashSize.Split(‘|’);
                    str_FlashWidth = ” width='” + arr_FlashSize[0].ToString() + “‘”;
                    str_FlashHeight = ” height='” + arr_FlashSize[1].ToString() + “‘”;
                }
                if (str_WCSS != null)
                    str_WCSS = ” class='” + str_WCSS + “‘”;
                if (str_Target != null)
                    str_Target = ” target='” + str_Target + “‘”;

                string str_Imgstr = “”;     // 图片链接
                string str_Linkstr = “”;    // 新闻链接
                string str_Txtstr = “”;     // 标题链接
                string str_FirstTxt = “”;   // 第一次显示时的新闻标题

                // 以下由Whitewin于2009-4-21添加
                // 给NorFilt幻灯新闻增加右部的导读。
                string str_NaviCnt = “”;    // 导读新闻内容
                string str_FirstNaviCnt = “”;  // 第一次显示时的导读新闻内容
                string str_NaviTitle = “”;  // 导读新闻标题
                string str_FirstNaviTitle = “”; // 第一次显示时的导读新闻标题
                if (str_NaviTitleCSS != null)
                    str_NaviTitleCSS = ” class='” + str_NaviTitleCSS + “‘”;
                if (str_NaviCntCSS !=null)
                    str_NaviCntCSS = ” class='” + str_NaviCntCSS + “‘”;
                // ————————————————————

                for (int i = 0; i < dt.Rows.Count; i++)
                {

                    PubClassInfo ci = CommonData.GetClassById(dt.Rows[i][“ClassID”].ToString());

                    string str_PicUrl = RelpacePicPath(dt.Rows[i][“PicURL”].ToString());
                    string str_Link = getNewsURL(dt.Rows[i][“isDelPoint”].ToString(), dt.Rows[i][“NewsID”].ToString(), dt.Rows[i][“SavePath”].ToString(), ci.SavePath + “/” + ci.SaveClassframe, dt.Rows[i][“FileName”].ToString(), dt.Rows[i][“FileEXName”].ToString());
                    string str_Txt = dt.Rows[i][“NewsTitle”].ToString();
                    string str_NaviCntTxt = dt.Rows[i][“NaviContent”].ToString();

                    // 以下由Whitewin于2009-4-21添加
                    // 给NorFilt幻灯新闻增加右部的导读。
                    // 获取完整新闻标题,用作导读部分标题的提示
                    string uTitle = str_Txt;
                    // —————————————–

                    if (str_TitleNumer != null)
                        str_Txt = NetCMS.Common.Input.GetSubString(str_Txt, Convert.ToInt32(str_TitleNumer));

                    if (str_PicUrl != “” && str_PicUrl != null)
                    {

                        if (str_Imgstr == “”)
                        {

                            str_Imgstr += str_PicUrl;
                            str_Linkstr += str_Link;
                            str_Txtstr += “<a href='” + str_Link + “‘ ” + str_Target + ” ” + str_WCSS + “>” + str_Txt + “</a>”;
                            str_FirstTxt = str_Txtstr;
                            // 以下由Whitewin于2009-4-21添加
                            // 给NorFilt幻灯新闻增加右部的导读。
                            // 处理导读部分新闻标题
                            str_NaviTitle = “<a href='” + str_Link + “‘ title='” + uTitle +”‘ ” + str_Target + ” ” + str_NaviTitleCSS + “>” + str_Txt + “</a>”;
                            str_FirstNaviTitle = str_NaviTitle;
                            str_NaviCnt = str_NaviCntTxt + “<a href='” + str_Link + “‘ ” + str_Target + ” ” + “>” + “[详情]” + “</a>”;   //处理导读新闻内容
                            str_FirstNaviCnt = str_NaviCnt;
                            // ——————————————————————————–

                        }
                        else
                        {

                            str_Imgstr += “,” + str_PicUrl;
                            str_Linkstr += “,” + str_Link;
                            str_Txtstr += “,<a href='” + str_Link + “‘ ” + str_Target + ” ” + str_WCSS + “>” + str_Txt + “</a>”;
                            // 以下由Whitewin于2009-4-21添加
                            // 给NorFilt幻灯新闻增加右部的导读。
                            // 处理导读部分新闻标题
                            str_NaviTitle += “,<a href='” + “‘ title='” + uTitle + “‘ ” + str_Target + ” ” + str_NaviTitleCSS + “>” + str_Txt + “</a>”;
                            str_NaviCnt += “<#NaviContent>” + str_NaviCntTxt + “<a href='” + str_Link + “‘ ” + str_Target + ” ” + “>” + “[详情]” + “</a>”;    //处理导读新闻内容
                            // ——————————————————————————–
                        }
                    }
                }
                str_NorFilt += “<script language=/”vbscript/”>” + newLine;

                // 以下由Whitewin于2009-4-21修改
                // 给NorFilt幻灯新闻增加右部的导读。原句为:
                // str_NorFilt += “Dim FileList,FileListArr,TxtList,TxtListArr,LinkList,LinkArr” + newLine;
                // 增加导读内容数组的定义.注意导读内容中不能出现<#NaviContent>
                str_NorFilt += “Dim FileList,FileListArr,TxtList,TxtListArr,LinkList,LinkArr,NaviTitleList,NaviTitleArr,NaviCntList,NaviCntArr” + newLine;
                // ——————————————————————————–

                str_NorFilt += “FileList = /”” + str_Imgstr + “/”” + newLine;
                str_NorFilt += “LinkList = /”” + str_Linkstr + “/”” + newLine;
                str_NorFilt += “TxtList = /”” + str_Txtstr + “/”” + newLine;

                // 以下由Whitewin于2009-4-21添加
                // 给NorFilt幻灯新闻增加右部的导读。
                // 处理导读新闻
                str_NorFilt += “NaviCntList = /”” + str_NaviCnt + “/”” + newLine;
                str_NorFilt += “NaviCntArr = Split(NaviCntList,/”<#NaviContent>/”)” + newLine;
                str_NorFilt += “NaviTitleList = /”” + str_NaviTitle + “/”” + newLine;
                str_NorFilt += “NaviTitleArr = Split(NaviTitleList,/”,/”)” + newLine;
                // ——————————————————————————–

                str_NorFilt += “FileListArr = Split(FileList,/”,/”)” + newLine;
                str_NorFilt += “LinkArr = Split(LinkList,/”,/”)” + newLine;
                str_NorFilt += “TxtListArr = Split(TxtList,/”,/”)” + newLine;
                str_NorFilt += “Dim CanPlay” + newLine;
                str_NorFilt += “CanPlay = CInt(Split(Split(navigator.appVersion,/”;/”)(1),/” /”)(2))>5″ + newLine;
                str_NorFilt += “Dim FilterStr” + newLine;
                str_NorFilt += “FilterStr = /”RevealTrans(duration=2,transition=23)/”” + newLine;
                str_NorFilt += “FilterStr = FilterStr + /”;BlendTrans(duration=2)/”” + newLine;
                str_NorFilt += “If CanPlay Then” + newLine;
                str_NorFilt += “FilterStr = FilterStr + /”;progid:DXImageTransform.Microsoft.Fade(duration=2,overlap=0)/”” + newLine;
                str_NorFilt += “FilterStr = FilterStr + /”;progid:DXImageTransform.Microsoft.Wipe(duration=3,gradientsize=0.25,motion=reverse)/”” + newLine;
                str_NorFilt += “Else” + newLine;
                str_NorFilt += “Msgbox /”幻灯片播放具有多种动态图片切换效果,但此功能需要您的浏览器为IE5.5或以上版本,否则您将只能看到部分的切换效果。/”,64″ + newLine;
                str_NorFilt += “End If” + newLine;
                str_NorFilt += “Dim FilterArr” + newLine;
                str_NorFilt += “FilterArr = Split(FilterStr,/”;/”)” + newLine;
                str_NorFilt += “Dim PlayImg_M” + newLine;
                str_NorFilt += “PlayImg_M = 5 * 1000  ” + newLine;

                // 以下由Whitewin于2009-4-21添加
                // 给NorFilt幻灯新闻增加右部的导读。
                // 有导读时,轮换时间延长到原来的2倍
                if (str_HashNaviContent == “true”)
                    str_NorFilt += “PlayImg_M = 2 * PlayImg_M  ” + newLine;
                // ——————————————————————————–

                str_NorFilt += “Dim I” + newLine;

                str_NorFilt += “I = 1” + newLine;
                str_NorFilt += “Sub ChangeImg” + newLine;
                str_NorFilt += “Do While FileListArr(I)=/”/”” + newLine;
                str_NorFilt += “I = I + 1” + newLine;
                str_NorFilt += “If I>UBound(FileListArr) Then I = 0” + newLine;
                str_NorFilt += “Loop” + newLine;
                str_NorFilt += “Dim J” + newLine;
                str_NorFilt += “If I>UBound(FileListArr) Then I = 0” + newLine;
                str_NorFilt += “Randomize” + newLine;
                str_NorFilt += “J = Int(Rnd * (UBound(FilterArr)+1))” + newLine;
                str_NorFilt += “Img.style.filter = FilterArr(J)” + newLine;
                str_NorFilt += “Img.filters(0).Apply” + newLine;
                str_NorFilt += “Img.Src = FileListArr(I)” + newLine;
                str_NorFilt += “Img.filters(0).play” + newLine;
                str_NorFilt += “Link.Href = LinkArr(I)” + newLine;
                if (str_ShowTitle == “true”)
                {

                    str_NorFilt += “Txt.filters(0).Apply” + newLine;
                    str_NorFilt += “Txt.innerHTML = TxtListArr(I)” + newLine;
                    str_NorFilt += “Txt.filters(0).play” + newLine;
                }

                // 以下由Whitewin于2009-4-21添加
                // 给NorFilt幻灯新闻增加右部的导读。
                if (str_HashNaviContent == “true”)
                {

                    str_NorFilt += “NaviTitle.filters(0).Apply” + newLine;
                    str_NorFilt += “NaviTitle.innerHTML = NaviTitleArr(I)” + newLine;
                    str_NorFilt += “NaviTitle.filters(0).play” + newLine;

                    str_NorFilt += “NaviCnt.filters(0).Apply”+newLine;
                    str_NorFilt += “NaviCnt.innerHTML = NaviCntArr(I)”+newLine;
                    str_NorFilt += “NaviCnt.filters(0).play” + newLine;
                }
                // ——————————————————————————–

                str_NorFilt += “I = I + 1” + newLine;
                str_NorFilt += “If I>UBound(FileListArr) Then I = 0” + newLine;
                str_NorFilt += “TempImg.Src = FileListArr(I)” + newLine;
                str_NorFilt += “TempLink.Href = LinkArr(I)” + newLine;
                str_NorFilt += “SetTimeout /”ChangeImg/”, PlayImg_M,/”VBScript/”” + newLine;
                str_NorFilt += “End Sub” + newLine;
                str_NorFilt += “</SCRIPT>” + newLine;
                str_NorFilt += “<TABLE WIDTH=/”100%/” height=/”100%/” BORDER=/”0/” CELLSPACING=/”0/” CELLPADDING=/”0/”>” + newLine;
                str_NorFilt += “<TR ID=/”NoScript/”>” + newLine;
                str_NorFilt += “<TD Align=/”Center/” Style=/”Color:White/”>对不起,图片浏览功能需脚本支持,但您的浏览器已经设置了禁止脚本运行。请您在浏览器设置中调整有关安全选项。</TD>” + newLine;
                str_NorFilt += “</TR>” + newLine;

                // 以下由Whitewin于2009-4-21添加
                // 给NorFilt幻灯新闻增加右部的导读。
                // 将原有图片部分包含在表格中
                if (str_HashNaviContent == “true”)
                {

                    str_NorFilt += “<tr><td><table WIDTH=/”100%/” height=/”100%/” BORDER=/”0/” CELLSPACING=/”0/” CELLPADDING=/”0/”>” + newLine;
                    str_NorFilt += “<tr><td width=/”200px/”><table>” + newLine;
                }
                // ——————————————————————————–

                str_NorFilt += “<TR Style=/”Display:none/” ID=/”CanRunScript/”><TD HEIGHT=/”100%/” Align=/”Center/” vAlign=/”Center/”><a id=/”Link/” ” + str_Target + “><Img ID=/”Img/” ” + str_FlashWidth + ” ” + str_FlashHeight + ” Border=/”0/” ></a>” + newLine;
                str_NorFilt += “</TD></TR><TR Style=/”Display:none/”><TD><a id=TempLink ><Img ID=/”TempImg/” Border=/”0/”></a></TD></TR>” + newLine;
                if (str_ShowTitle == “true”)
                {

                    str_NorFilt += “<TR><TD HEIGHT=/”100%/” Align=/”Center/” vAlign=/”Top/”>” + newLine;
                    str_NorFilt += “<div ID=/”Txt/” style=/”PADDING-LEFT: 5px; Z-INDEX: 1; FILTER: progid:DXImageTransform.Microsoft.Fade(duration=1,overlap=0); POSITION:/” >” + str_FirstTxt + “</div>” + newLine;
                    str_NorFilt += “</TD></TR>” + newLine;
                }

                // 以下由Whitewin于2009-4-21添加
                // 给NorFilt幻灯新闻增加右部的导读。
                // 添加导读部分
                if (str_HashNaviContent == “true”)
                {

                    str_NorFilt += “</table></td><td valign=/”top/”><table WIDTH=/””+str_NaviContentWidth+”/” height=/”100%/” BORDER=/”0/” CELLSPACING=/”0/” CELLPADDING=/”0/” >” + newLine;
                    str_NorFilt += “<tr><td><div id=/”NaviTitle/” style=/”PADDING-LEFT: 5px; Z-INDEX: 1;  text-align:center; FILTER: progid:DXImageTransform.Microsoft.Fade(duration=1,overlap=0); POSITION:/”>” + str_FirstNaviTitle + “</div></td></tr>” + newLine;
                    str_NorFilt += “<tr><td>&nbsp;</td></tr>”;
                    str_NorFilt += “<tr><td><div id=/”NaviCnt/” style=/”PADDING-LEFT: 5px; Z-INDEX: 1; FILTER: progid:DXImageTransform.Microsoft.Fade(duration=1,overlap=0); POSITION:/”” + str_NaviCntCSS + “>” + str_FirstNaviCnt + “</div></td></tr></table></td></tr></table></td></tr>” + newLine;
                }
                // ——————————————————————————–

                str_NorFilt += “</TABLE>” + newLine;
                str_NorFilt += “<Script Language=/”VBScript/”>” + newLine;
                str_NorFilt += “NoScript.Style.Display = /”none/”” + newLine;
                str_NorFilt += “CanRunScript.Style.Display = /”/”” + newLine;
                str_NorFilt += “Img.Src = FileListArr(0)” + newLine;
                str_NorFilt += “Link.Href = LinkArr(0)” + newLine;
                str_NorFilt += “SetTimeout /”ChangeImg/”, PlayImg_M,/”VBScript/”” + newLine;
                str_NorFilt += “</Script>” + newLine;

                dt.Clear(); dt.Dispose();
            }
            else
            {

                str_NorFilt = “没有幻灯片”;
            }
            return str_NorFilt;
        }

    对NetCMS.Publish项目和NetCMS.Web重新生成后,将NetCMS.Web/Bin文件夹下的NetCMS.Publish.Dll文件复制到Web服务器对应的Bin文件夹下,替换掉原来的NetCMS.Publish.Dll文件即可。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/187533.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(1)
blank

相关推荐

  • A股30年,历史的拐点和暗示(大盘篇)

    A股30年,历史的拐点和暗示(大盘篇)来源:主动型量化作者:刘帅路

  • stardict 词典名

    stardict 词典名

  • QQ图片制作跳转_我要自己制作头像

    QQ图片制作跳转_我要自己制作头像QQ图片跳转加群QQ群里看到一个好像视频的图片,点开却变成一个加群的链接,直接到了这是QQ里的一种插件,类似QQ群机器人,只不过现在很难能找到了,去年有段时间很火,使用插件生成以后发到群内或者QQ聊天内,可以自定义图片和超链接,点击可以跳转图片只是一个预览而已,因为现在的扣扣发网址会自动加载页面的内容预览出来就是一个图片,这个图片是网站制作人员事先设置好的,类似文档的预览图也就是脸面。比如你你发一个加群的链接到群里,然后系统自动加载网页,顺便脸面图片也显示出来了。你点击图片后当然就跳转到加群

  • 比较好用的mysql可视化工具—–pycharm连接mysql图文教程

    比较好用的mysql可视化工具—–pycharm连接mysql图文教程1.mysql可视化工具常用的mysql可视化工具有很多,如:sqlyog、navicat等等,使用这些工具需要另外安装,有的还可能收费。这里推荐一个比较容易被大家忽略的mysql可视化工具,大多数学python的人,都会使用pycharm,不得不说pycharm的功能及其强大,pycharm本身也是一个功能很强的数据库可视化工具,换句话说,如果安装了pyharm,那根本没必要在安装其他可视化工具了!这里以pycharm链接mysql为例,记录一下详细过程,供大家参考!2.使用工具我使用的工具如下

  • Socketpair 简介「建议收藏」

    Socketpair 简介「建议收藏」socketpair-aslightgeneralizationofpipesusedfortwo-waystreamcommunication.以下内容来自:匠意雕码http://my.oschina.net/zengsai/blog/12583

    2022年10月14日
  • vue 路由参数刷新页面状态保持_参数顺序不同算重载吗

    vue 路由参数刷新页面状态保持_参数顺序不同算重载吗针对Vue相同路由不同参数的刷新问题

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号