Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[疑难] 版主能不能把这个幻灯片弄到SS上显示?

[复制链接]
kecai 发表于 2008-6-10 16:33:47 | 显示全部楼层 |阅读模式
改了半天都不行,最终效果想是左边大图,右边3个小图,每个小图显示相册、新闻、下载的最新图片!并循环显示,点小图大图跟着变,现在是大图能和小图走,就是小图只有固定,不能循环!
目前的效果:

  1. 未命名.JPG
  2. <!-- 焦点图 begin -->
  3.                         <script type="text/javascript">
  4.                         var isIE = navigator.appVersion.indexOf("MSIE") != -1 ? true:false;
  5.                         var TimeOut=5000;              //每张图切换时间 (单位毫秒);
  6.                         var StartType="onmouseover";   //右侧缩略图触发动作
  7.                         var playButtonPic = "";
  8.                         var stopButtonPic = "";
  9.                         var playState = "play";
  10.                         var imgUrl=new Array();
  11.                         var imgSUrl=new Array();
  12.                         var imgLink=new Array();
  13.                         var imgtext=new Array();
  14.                         var imgAlt=new Array();
  15.                         var adNum=0;
  16.                         var theTimer;
  17.                        
  18.                         //===
  19.                         <!-- 一个月点击排行榜 -->
  20.                                 <!--{block name="spacenews" parameter="dateline/2592000/haveattach/1/showattach/1/order/i.viewnum DESC/showdetail/1/messagelen/180/messagedot/1/limit/0,1/cachetime/98800/subjectlen/30/cachename/hotnews/tpl/data"}-->
  21.                         <!--{loop $_SBLOCK[hotnews] $value}-->
  22.                         imgUrl[1]='$value[a_thumbpath]';
  23.                         imgSUrl[1]='$value[a_thumbpath]';
  24.                         imgtext[1]='$value[subject]';                                       
  25.                         imgLink[1]='$value[url]';
  26.                         imgAlt[1]='$value[subject]';
  27.                         <!--{/loop}-->
  28.                        
  29.                         <!--{block name="spaceimage" parameter="order/i.dateline DESC/limit/0,8/subjectlen/20/cachetime/27900/cachename/newimage/tpl/data"}-->
  30.                         <!--{loop $_SBLOCK['newimage'] $value}-->
  31.                         imgUrl[2]='http://ddddddd.jpg';
  32.                         imgSUrl[2]='http://ddddddd.jpg';
  33.                         imgtext[2]='<a href="http://xcvxcvxcvx/index.shtml" target="_blank">asdfasdf侠</a>';
  34.                         imgLink[2]='http://xxxx/index.shtml';
  35.                         imgAlt[2]='asdfasdf侠';
  36.                        
  37.                         imgUrl[3]='http://ddddddd.jpg';
  38.                         imgSUrl[3]='http://ddddddd.jpg';
  39.                         imgtext[3]='<a href="http://xcvxcvxcvx/index.shtml" target="_blank">asdfasdf侠</a>';
  40.                         imgLink[3]='http://xxxx/index.shtml';
  41.                         imgAlt[3]='asdfasdf侠';

  42.                         //===
  43.                        
  44.                         function changeimg(n){
  45.                                 adNum=n;
  46.                                 window.clearInterval(theTimer);
  47.                                 adNum=adNum-1;
  48.                                 nextAd();
  49.                         }
  50.                        
  51.                         function goUrl(){
  52.                         window.open(imgLink[adNum],'_blank');
  53.                         }
  54.                        
  55.                         var count=0;
  56.                         for (i=1;i<imgUrl.length;i++) {
  57.                                 if( (imgUrl[i]!="") && (imgLink[i]!="")&&(imgtext[i]!="")&&(imgAlt[i]!="") ) {
  58.                                         count++;
  59.                                 } else {
  60.                                         break;
  61.                                 }
  62.                         }
  63.                        
  64.                         function playTran(){
  65.                                 if (isIE){
  66.                                         imgInit.filters.revealTrans.play();
  67.                                 }
  68.                         }
  69.                        
  70.                         var key=0;
  71.                        
  72.                         function nextAd(){
  73.                                 if(adNum<(imgUrl.length-1)){
  74.                                         adNum++;
  75.                                 }else{
  76.                                         adNum=1;
  77.                                 }
  78.                                 if( key==0 ){
  79.                                         key=1;
  80.                                 } else if (isIE){
  81.                                         imgInit.filters.revealTrans.Transition=23;
  82.                                         imgInit.filters.revealTrans.apply();
  83.                                         playTran();
  84.                                 }
  85.                                
  86.                                 document.images.imgInit.src=imgUrl[adNum];
  87.                                 document.images.imgInit.alt=imgAlt[adNum];
  88.                                 document.getElementById('FIJ_R_IB_'+adNum).className='id_FIJ_R_ImgBlk_On';
  89.                                
  90.                                 for (var i=1;i<=count;i++){
  91.                                         if (i!=adNum){
  92.                                                 document.getElementById('FIJ_R_IB_'+i).className='id_FIJ_R_ImgBlk';
  93.                                         }
  94.                                 }
  95.                                
  96.                                 document.getElementById('focustext').innerHTML=imgtext[adNum];
  97.                                 document.getElementById('imgLink').href=imgLink[adNum];
  98.                                 theTimer=setTimeout("nextAd()", TimeOut);
  99.                         }
  100.                         function playControl(){
  101.                                 if(playState == "play"){ //停止
  102.                                         document.getElementById("playButton").src = stopButtonPic;
  103.                                         clearTimeout(theTimer);
  104.                                         playState = "stop";
  105.                                 }else{ //播放
  106.                                         document.getElementById("playButton").src = playButtonPic;
  107.                                         theTimer=setTimeout("nextAd()", TimeOut);
  108.                                         playState = "play";
  109.                                 }
  110.                         }
  111.                         document.write('<div id="FocusImg_JS">');
  112.                         document.write('        <div id="FIJ_L">');
  113.                         document.write('                <span><a id="imgLink" href="'+imgLink[1]+'" target="_blank"><img style="FILTER: revealTrans(duration=1,transition=5);" src="" name="imgInit" width="310" height="300" alt="'+imgAlt[1]+'" /></a></span>');
  114.                         document.write('        </div>');
  115.                         document.write('        <div id="FIJ_R">');
  116.                        
  117.                         for(var i=1;i<imgUrl.length;i++){
  118.                                 document.write('                <div id="FIJ_R_IB_'+i+'" class="id_FIJ_R_ImgBlk"><a href="javascript:;" '+ StartType +'="javascript:changeimg('+i+')" title="'+imgAlt[i]+'"><img width="100" height="100" src="'+imgSUrl[i]+'" alt="'+imgAlt[i]+'"/></a>');
  119.                                 document.write('        </div>');
  120.                         }
  121.                        
  122.                         document.write('</div>                <p id="focustext">'+imgtext[1]+'</p>');                       
  123.                         document.write('</div>');
  124.                         nextAd();
  125.                         </script>
  126.                 <!-- 焦点图 end -->
复制代码

[ 本帖最后由 kecai 于 2008-6-10 16:38 编辑 ]
回复

使用道具 举报

 楼主| kecai 发表于 2008-6-10 16:39:16 | 显示全部楼层
请大家多看看,帮帮忙!
回复

使用道具 举报

 楼主| kecai 发表于 2008-6-10 18:01:31 | 显示全部楼层
顶!!!
回复

使用道具 举报

shrdgrp 发表于 2008-6-10 18:27:58 | 显示全部楼层
:) 谢谢 支持
回复

使用道具 举报

 楼主| kecai 发表于 2008-6-10 19:50:00 | 显示全部楼层
  1. <!-- 一个月点击排行榜 -->
  2.                                 <!--{block name="spacenews" parameter="dateline/2592000/haveattach/1/showattach/1/order/i.viewnum DESC/showdetail/1/messagelen/180/messagedot/1/limit/0,2/cachetime/98800/subjectlen/30/cachename/hotnews/tpl/data"}-->
  3.                 <!--最新图片-->
  4.                 <!--{block name="spaceimage" parameter="order/i.dateline DESC/limit/0,6/subjectlen/14/cachetime/12000/cachename/newimage/tpl/data"}-->
  5.         <!--论坛图片附件-->
  6.                 <!--{block name="bbsattachment" parameter="filetype/image/t_lastpost/2592000/order/t.replies DESC/limit/0,10/cachetime/49900/cachename/picthread/tpl/data"}-->
复制代码
两端代码
  1.                         <!--{eval $i=0;}-->
  2.                         <!--{loop $_SBLOCK['picnews'] $key $value}-->
  3.                         imgUrl[1]="$value[a_thumbpath]";
  4.                         imgSUrl[1]="$value[a_thumbpath]";
  5.                         imgtext[1]="$value[subject]";                                       
  6.                         imgLink[1]="$value[url]";
  7.                         imgAlt[1]="$value[subject]";
  8.                 <!--{eval $i++;}-->
  9.                 <!--{/loop}-->
  10.                 <!--{eval $i=0;}-->
  11.                 <!--{loop $_SBLOCK['newimage'] $value}-->
  12.                         imgUrl[2]="$value[a_thumbpath]";
  13.                         imgSUrl[2]="$value[a_thumbpath]";
  14.                         imgtext[2]="$value[subject]";                                       
  15.                         imgLink[2]="$value[url]";
  16.                         imgAlt[2]="$value[subject]";
  17.                 <!--{eval $i++;}-->
  18.                 <!--{/loop}-->
  19.                
  20.                 <!--{eval $i=0;}-->
  21.                 <!--{loop $_SBLOCK['picthread'] $key $value}-->
  22.                         imgUrl[$i]="$value[a_thumbpath]";
  23.                         imgSUrl[$i]="$value[a_thumbpath]";
  24.                         imgtext[$i]="$value[subject]";                                       
  25.                         imgLink[$i]="$value[url]";
  26.                         imgAlt[$i]="$value[subject]";
  27.                 <!--{eval $i++;}-->
  28.                 <!--{/loop}-->
复制代码
最后产生:undefined
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-15 03:24 , Processed in 0.112755 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表