麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > CMS > 帝國Empire > 正文

帝國CMS添加騰訊圖片展示功能

2024-08-28 12:27:10
字體:
來源:轉載
供稿:網友

          1.修改eclasst_functions.php 添加以下紅色代碼

          //圖庫模型分頁標簽
          function sys_PhotoMorepage($tempid,$spicwidth=0,$spicheight=0){
          global $navinfor;
          $morepic=$navinfor['morepic'];
          if(empty($morepic))
          {
          return "";
          }
          //取得標簽
          $tempr=sys_ReturnBqTemp($tempid);
          if(empty($tempr['tempid']))
          {return "";}
          $rexp="rn";
          $fexp="::::::";
          $gs="";
          if($spicwidth)
          {$gs=" width='".$spicwidth."'";}
          if($spicheight)
          {$gs.=" height='".$spicheight."'";}
          $rstr="";
          $sdh="";
          $firstpic="";
          $optionstr="";
          $titleoption="";
          $listpage="";
          $nbsp="";
          $rr=explode($rexp,$morepic);
          $count=count($rr);

          //自加
          $pictitleabout="";
          $rstrb="";
          //


          for($i=0;$i<$count;$i++)
          {
          $j=$i+1;
          $fr=explode($fexp,$rr[$i]);
          $smallpic=$fr[0]; //小圖
          $bigpic=$fr[1]; //大圖
          if(empty($bigpic))
          {
          $bigpic=$smallpic;
          }
          $picname=htmlspecialchars($fr[2]); //名稱
          $showpic=ReplaceMorePagelistvar($tempr['listvar'],$picname,$bigpic);
          $sdh.=$nbsp."<a href='#ecms' onclick='GotoPhPage(".$j.");' title='".$pic|
          name."'><img src='".$smallpic."' alt='".$picname."' border=0".$gs."></a>";
          if($i==0)
          {
          $firstpic=$showpic;
          }
          $rstr.="photosr[".$j."]="".addslashes($showpic)."";
          ";
          $optionstr.="<option value=".$j.">第 ".$j." 頁</option>";
          $titleoption.="<option value=".$j.">".$j."、".$picname."</option>";
          $listpage.=$nbsp."<a href='#ecms' onclick='GotoPhPage(".$j.");' t
          itle='".$picname."'>".$j."</a>";
          $nbsp="&nbsp;";

          //自加
          $pictitleabout.="arrUrlName[".$i."]="".addslashes($picname)."";";
          $rstrb.="arrUrl[".$i."]="".addslashes($showpic)."";";
          //


          }
          echo ReplaceMorePagetemp($tempr['temptext'],$rstr,$sdh,$optionstr,$titleoption,$firstpic,$listpage,$pictitleabout,$rstrb);
          }

          //替換圖片集分頁模板
          function ReplaceMorePagetemp($temp,$rstr,$sdh,$select,$titleselect,$showpic,

          $listpage,$pictitleabout,$rstrb){
          $temp=str_replace("[!--photor--]",$rstr,$temp);
          $temp=str_replace("[!--smalldh--]",$sdh,$temp);
          $temp=str_replace("[!--select--]",$select,$temp);
          $temp=str_replace("[!--titleselect--]",$titleselect,$temp);
          $temp=str_replace("[!--listpage--]",$listpage,$temp);
          $temp=str_replace("<!--list.var1-->",$showpic,$temp);

          //自加
          $temp=str_replace("[!--pictitleabout--]",$pictitleabout,$temp);
          $temp=str_replace("[!--UrlName--]",$rstrb,$temp);
          //



          return $temp;
          }

          2.到后臺模板管理-標簽模板里添加一個標簽模板

          頁面模板內容(*)

          <script language="javascript" type="text/javascript" src="/JS/Common.js"></script>


          <style>
          img{ border:0; display:inline-block; }
          .float_left{float:left}
          .float_right{float:right}
          .showpic_ex{width:580px; background:#F4F4F4;}
          .photo_bar{padding:0 10px;height:35px;background:#EBEBEB}
          .photo_bar dd{float:left;margin:5px}
          .photo_bar dt{float:right;margin:5px}
          #imgBox{text-align:center;padding:15px 0}
          #photolist{height:80px;clear:both;background:#EBEBEB}
          #photolist .kz{margin:10px 0;}
          #photolist .list li{margin:5px 10px;float:left;height:70px;width:70px}
          </style>

          <div class="showpic_ex">
          <dl class="photo_bar">
          <dd><a href="javascript:SlidePlay();" id="play_pic"><img src="/Skin/Tag

          s/img2/photo_play.gif"


          id="SlideButton" align="absmiddle" /></a><input id="interval" type="hidden" v
          alue="5" name="interval"></dd>
          <dd><a href="javascript:;" id="prev_pic"><img src="/Skin/Tags/
          img2/photo_prev.gif" align="absmiddle" /></a></dd>
          <dd><a href="jaascript:;" id="next_pic"><img src="/Skin/Tags/i
          mg2/photo_next.gif" align="absmiddle" /></a></dd>
          <dd><select id="photo_select" onChange="changePic(this)">
          </select></dd>
          <dt><a href="/pic/"><img src="/Skin/Tags/img2/photo_enter.gi
          f" align="abs
          middle" /></a></dt>
          <dt><a href="javascript:;" id="show_pic" target="_blank"><i
          mg src="/Skin/
          Tags/img2/photo_showpic.gif"
          align="absmiddle" /></a></dt>
          </dl>
          <div id="imgBox"></div>
          <div id="photolist">
          <div class="kz float_left">
          <a href="javascript:;" id="prev_page"><img src="/Skin/Tags/img2
          /photo_left.gif" /></a>
          </div>
          <ul class="list" id="PhotoUrlList"></ul>
          <div class="kz float_right">
          <a href="javascript:;" id="next_page"><img src="/Skin/T
          ags/img2/ph
          oto_right.gif" /></a>
          </div>
          </div>
          </div>
          <script type="text/javascript">
          var Bof=1;
          var iplay=1;
          var IsPlaying=false;
          var PhotoIndex=1;
          var arrUrlName=new Array();
          var arrUrl=new Array();
          var idomain="/";
          [!--UrlName--]
          [!--pictitleabout--]

          var selectList="";
          for(var i=0;i<arrUrl.length;i++){
          $("photo_select").options[$("photo_select").length]=n
          ew Option((i+1) +"/"
          +arrUrl.length+ "張",i);
          }
          ViewPhoto('<!--list.var1-->',2);
          ShowUrlList(Bof);

          function changePic(id){
          var j = parseInt(id.options[id.selectedIndex].value);
          ViewPhoto(arrUrl[j],j+2);
          }

          function ViewPhoto(PhotoUrl,num){
          var strHtml;
          var FileExt=PhotoUrl.substr(PhotoUrl.lastIndexOf('.')+1).to
          LowerCase();
          if(FileExt=='gif'||FileExt=='jpg'||FileExt=='png'||FileExt=='bm
          p'||FileExt=='jpeg'){
          strHtml="<a href='javascript:nextpic("+num+");'><img s
          rc='"+PhotoUr
          l+"' onload='if(this.width>500) t
          his.width=500'></a>";
          document.getElementById('show_pic').href=PhotoUrl;
          document.getElementById('prev_pic').href="javascript:ne
          xtpic("+(num-2)+");";
          document.getElementById('next_pic').href="javascript:n
          extpic("+num+");";
          }else if(FileExt=='swf'){
          strHtml="<object classid='clsid:D27CDB6E-AE6D-11cf-9
          6B8-44455354
          0000' width='550' height='400' codebase='http://download.m
          acromedia.com}
          pub/shockwave/cabs/flash/sw
          flash.cab#version=5,0,0,0'><param n
          ame='movie' value='"+PhotoUrl+"'><param name='quality' v
          alue='high'><embe
          d src='"+PhotoUrl+"' plugins
          page='http://www.macromedia.com/shockwave/download/
          index.cgi?P1_Prod_
          Version=ShockwaveFlash' t
          ype='application/x-shockwave-flash' width='550' height='400
          '></embed></object>";
          document.getElementById('show_pic').href=PhotoUrl;
          document.getElementById('prev_pic').href="javascript:next
          pic("+(num-2)+");";
          document.getElementById('next_pic').href="javascript:nextp
          ic("+num+");";
          }else{
          strHtml=PhotoUrl;
          }
          var inum = num-1;
          iplay=num;
          if(inum<=6){
          ShowUrlList(1);
          }else if(inum<=12){
          ShowUrlList(2);
          }else if(inum<=18){
          ShowUrlList(3);
          }else if(inum<=24){
          ShowUrlList(4);
          }
          document.getElementById('imgBox').innerHTML=strHtml;
          }

          function SlidePlay(){
          var sTimer,url;
          if(IsPlaying==false){
          IsPlaying=true;
          document.getElementById('SlideButton').src=idomain
          +'Skin/Tags/im
          g2/photo_play1.gif';
          sTimer=setTimeout("ViewNext("+(iplay+1)+")",2000);
          }else{
          clearTimeout(sTimer);
          IsPlaying=false;
          document.getElementById('SlideButton').src=idomain+'S
          kin/Tags/img2
          /photo_play.gif';
          }
          }
          function ViewNext(i){
          if(IsPlaying==false){return false;}
          if(PhotoIndex<arrUrl.length){
          ViewPhoto(arrUrl[PhotoIndex],i);
          PhotoIndex+=1;
          iplay+=1
          }
          if(PhotoIndex>=arrUrl.length){
          PhotoIndex=0;
          iplay=2;
          }
          var iTimeout=parseInt(document.getElementById('interv
          al').value * 1000);
          if (isNaN(iTimeout)){
          iTimeout = 3000;
          }
          if(iTimeout<1000){iTimeout=5000;}
          sTimer=setTimeout("ViewNext("+iplay+")",iTimeout);
          $("photo_select").selectedIndex = i-2;
          }

          function nextpic(ix){
          var num = ix-1;
          for(var i=0;i<arrUrl.length;i++){
          if(num==i) ViewPhoto(arrUrl[i],(i+2));
          } //13 14
          if(num<arrUrl.length&&num>0)$("photo_select").selected
          Index = num;
          }


          function ShowUrlList(page){
          if(arrUrl.length<=1) return '';
          var dTotalPage=arrUrl.length/6;
          var TotalPage;
          var MaxPerPage=6;
          var changePage=false;
          if(arrUrl.length%MaxPerPage==0){TotalPage=Math.floor(
          dTotalPage);}
          else{TotalPage=Math.floor(dTotalPage)+1;}
          if(page<1) page=1;
          if(page>TotalPage) page=TotalPage;
          var strPage="";
          for(var i=(page-1)*MaxPerPage;i<arrUrl.length&&i<page*MaxP
          erPage;i++){
          //if(!changePage){
          // strPage+="<li class='thispic'><a href='javascript:;' onclick=V
          iewPhot
          o('"+arrUrl[i]+"','"+(i+2)+"')><img src='"+arrUrl[i]+"' border='0' width
          ='70' heig
          ht='70' /></a></li>";
          // ViewPhoto(arrUrl[i],i+2);
          // changePage=true;
          /

          發表評論 共有條評論
          用戶名: 密碼:
          驗證碼: 匿名發表
          主站蜘蛛池模板: 欧美一级黄色网 | 久久草草影视免费网 | 爽毛片 | 天天夜干 | 国产三级国产精品国产普男人 | 午夜精品福利视频 | 成人免费乱码大片a毛片视频网站 | 国产一区二精品区在线 | 亚洲一级片免费观看 | 麻豆19禁国产青草精品 | 欧美精品成人一区二区三区四区 | 欧美中文字幕在线视频 | 亚洲第五色综合网 | 天天草天天爱 | 中文字幕四区 | 欧美视屏一区二区 | 久久精品视频16 | 最新av免费网址 | 欧美亚洲综合网 | 亚洲一区二区三区精品在线观看 | 色淫影院| 99精品国产在热久久婷婷 | 成人福利视频导航 | 欧美一级黄色免费看 | 一区二区免费 | vidz 98hd| 黄色网战入口 | 婷婷久久综合九色综合色多多蜜臀 | 女教师~淫辱の动漫在线 | 国产羞羞网站 | av亚洲在线观看 | 日韩黄色一区 | 毛片大全 | 黄色香蕉视频 | 日本a级一区 | 欧美日韩成人一区二区 | 91精品国产综合久久久动漫日韩 | 色婷婷久久久亚洲一区二区三区 | 成人在线视频在线观看 | 亚洲精品一区二区三区免 | 久久精品视频日本 |