时间:2021-05-02
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.");' title='".$picname."'>".$j."</a>"; $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" value="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/img2/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.gif" align="absmiddle" /></a></dt> <dt><a href="javascript:;" id="show_pic" target="_blank"><img 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/Tags/img2/photo_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]=new 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).toLowerCase(); if(FileExt=='gif'||FileExt=='jpg'||FileExt=='png'||FileExt=='bmp'||FileExt=='jpeg'){ strHtml="<a href='javascript:nextpic("+num+");'><img src='"+PhotoUrl+"' onload='if(this.width>500) this.width=500'></a>";document.getElementById('show_pic').href=PhotoUrl;document.getElementById('prev_pic').href="javascript:nextpic("+(num-2)+");";document.getElementById('next_pic').href="javascript:nextpic("+num+");"; }else if(FileExt=='swf'){ strHtml="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='550' height='400' codebase='http://download.macromedia.com}pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0'><param name='movie' value='"+PhotoUrl+"'><param name='quality' value='high'><embed src='"+PhotoUrl+"' pluginspage='http:///shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='550' height='400'></embed></object>";document.getElementById('show_pic').href=PhotoUrl;document.getElementById('prev_pic').href="javascript:nextpic("+(num-2)+");";document.getElementById('next_pic').href="javascript:nextpic("+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/img2/photo_play1.gif'; sTimer=setTimeout("ViewNext("+(iplay+1)+")",2000); }else{ clearTimeout(sTimer); IsPlaying=false; document.getElementById('SlideButton').src=idomain+'Skin/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('interval').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 14if(num<arrUrl.length&&num>0)$("photo_select").selectedIndex = 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*MaxPerPage;i++){//if(!changePage){// strPage+="<li class='thispic'><a href='javascript:;' onclick=ViewPhoto('"+arrUrl[i]+"','"+(i+2)+"')><img src='"+arrUrl[i]+"' border='0' width='70' height='70' /></a></li>";// ViewPhoto(arrUrl[i],i+2);// changePage=true;/
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
如下图所示:帝国CMS7.5版对WAP模块进行升级,做展示类手机站更方便。帝国CMS7.5版WAP模块升级功能如下:1、WAP新增页面模式设置:支持设置栏目为列
最近在使用帝国CMS的时候碰到个问题,帝国CMS在添加分类的时候感觉没有dedecms的那样灵活设置。在帝国下面添加分类的时候往往会把目录路径做的很长,怎么样才
本文实例讲述了帝国CMS远程保存图片的方法。分享给大家供大家参考。具体实现方法如下:复制代码代码如下:补充:帝国CMS验证码不显示的解决方法:当帝国CMS验证码
一、功能效果轮播多图模块常用于展示公司环境、公司产品等,轮播的形式能让图片展示效果看起来更加生动。二、功能说明【版本】免费版及以上版本三、设置教程(一)添加模块
帝国CMS下的e/class/connect.php文件中包含了帝国CMS常用的一些核心功能函数,加深对connect.php文件中常用函数的了解对于帝国CMS