新聞中心
zen cart模版首頁banner圖片修改成flash的方法
這是一個(gè)技巧性文章,小編的美工不過關(guān),今天逛帖子的時(shí)候,發(fā)現(xiàn)一個(gè)將zen cart模版banner圖片改成flash的方法。很使用,整理列子內(nèi)容,歸納要點(diǎn)發(fā)出,供站長(zhǎng)參考。 把banner圖片改成flash的效果:跟lightinthebox一樣,后面更換圖片,前面flash效果 實(shí)現(xiàn)方法如下(以下代碼在無憂主機(jī)php虛擬主機(jī)環(huán)境下調(diào)試無錯(cuò)誤):
自動(dòng)切換圖片實(shí)現(xiàn)flash效果的腳本,腳本可以加到需要顯示圖片的模板中,例如插入?
\includes\templates\(your_template)\templates\tpl_index_default.php?
文件的<div?class="centerColumn"?id="indexDefault">?的下一行
?
<div align=center><script type="text/javascript">
imgUrl1="/includes/templates/zencart/images/banner3.jpg"; imgtext1="#" imgLink1=escape("#");
imgUrl2="/includes/templates/zencart/images/banner4.jpg"; imgtext2="#" imgLink2=escape("#");
imgUrl3="/includes/templates/zencart/images/banner5.jpg"; imgtext3="#" imgLink3=escape("#");
imgUrl4="/includes/templates/zencart/images/banner6.jpg"; imgtext4="#" imgLink4=escape("#");
imgUrl5="/includes/templates/zencart/images/banner7.jpg"; imgtext5="#" imgLink5=escape("#");
var focus_width=820? ?
var focus_height=134 var text_height=0 var swf_height = focus_height+text_height
var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3 var links=imgLink1+"|"+imgLink2+"|"+imgLink3 var texts=imgtext1+"|"+imgtext2+"|"+imgtext3
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="/includes/templates/zencart/images/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#ffffff">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">'); document.write('<embed src="/includes/templates/zencart/images/focus.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#ffffff" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');? document.write('</object>');
</script></div>
純Linux環(huán)境下高端免備案[香港獨(dú)立IP地址]?php空間,僅僅只需199元一年起。商務(wù)中國域名核心代理直銷50元注冊(cè)國際頂級(jí)域名。本文地址:http://www.gle-technology.com/zencart/3486.html