Thứ Tư, 4 tháng 1, 2012

Code tạo popup cho ecmall

 Hướng dẫn luôn nha! Anh em copy cái code đó về.
Sau đó vào thư mục: /themes/mall/default
Tìm và mở file: header.html
Tìm đến dòng:
</head>
Copy đoạn code đó thêm lên trên cái dòng đó. Xong save lại.

Ra thư mục gốc của website, tạo một thư mục mang tên images Rồi up 3 file ảnh tui đính kèm bên dưới.
       

 <!--<editmode></editmode>-->
<style type="text/css">
        * html div#fl813691 {position: absolute; overflow:hidden;
        top:expression(eval(document.compatMode &&
        document.compatMode=='CSS1Compat') ?
        documentElement.scrollTop
        +(documentElement.clientHeight-this.clientHeight)
        : document.body.scrollTop
        +(document.body.clientHeight-this.clientHeight)); z-index:1000000}
        #fl813691{font: 12px Arial, Helvetica, sans-serif; color:#666; position:fixed; _position: absolute; right:0; bottom:0; height:250px;}
        #eb951855{width:328px; padding-right:7px; background:url(/images/fullborder_bg_right1.gif) no-repeat right top;}
        #cob263512{background:url(/images/fullborder_bg1.gif) no-repeat left top; height:250px; padding-left:7px;}
        #coh963846{color:#fff;display:block; height:20px; line-height:20px; font-size:11px; width:328px;}
        #coh963846 a{color:#fff;text-decoration:none;}
        #coc67178{float:right; padding:0; margin:0; list-style:none; overflow:hidden; height:20px;}
        #coc67178 li{display:inline;}
        #coc67178 li a{background-image:url(/images/button.gif); background-repeat:no-repeat; width:30px; height:0; padding-top:15px; overflow:hidden; float:left;}
        #coc67178 li a.close{background-position: 0 0;}
        #coc67178 li a.close:hover{background-position: 0 -15px;}
        #coc67178 li a.min{background-position: -30px 0;}
        #coc67178 li a.min:hover{background-position: -30px -15px;}
        #coc67178 li a.max{background-position: -60px 0;}
        #coc67178 li a.max:hover{background-position: -60px -15px;}
        #co453569{display:block; margin:0; padding:0; height:150px;background-color:#ececec; border-style:solid; border-width:1px; border-color:#111 #999 #999 #111; line-height:1.6em; overflow:hidden;}
    </style>
   <div style="height: 141px; z-index:100;" id="fl813691">
        <div id="eb951855">
            <div id="cob263512">
                <div id="coh963846">

                    <ul id="coc67178">
                        <li style="display: inline;" id="pf204652hide"><a class="min" href="javascript:pf204652clickhide();" title="">
                            ?n</a></li>
                        <li id="pf204652show" style="display: none;"><a class="max" href="javascript:pf204652clickshow();" title="">Xem </a></li>
                      <!-- <li id="pf204652close"><a class="close" href="javascript:pf204652clickclose();" title="">
                            ng</a></li> -->
                    </ul>
                    Hotline:<strong> 0932 .644 .911 - 09.789.153.79</strong>

                </div>
              <div id="co453569">
                    <div><img src="/images/Movie3.gif" /></div>
                  <!--  <div> &nbsp;Mua ngay <strong>(04) 3766. 6666</strong> ext  <strong>1112-1113-1114-1115 </strong></div>
                   <div> &nbsp;Hotline: <strong> 0932 .644 .911 - 09.789.153.79</strong></div> -->
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        pf204652bottomLayer = document.getElementById('fl813691');
        var pf204652IntervalId = 0;
        var pf204652maxHeight = 92;//Chieu cao khung quang cao
        var pf204652minHeight = 20;
        var pf204652curHeight = 0;
        function pf204652show(){
            pf204652curHeight += 2;
            if(pf204652curHeight > pf204652maxHeight){
                clearInterval(pf204652IntervalId);
            }
            pf204652bottomLayer.style.height = pf204652curHeight+'px';
        }
        function pf204652hide(){
            pf204652curHeight -= 3;
            if(pf204652curHeight < pf204652minHeight){
                clearInterval(pf204652IntervalId);
            }
            pf204652bottomLayer.style.height=pf204652curHeight+'px';
        }
        pf204652IntervalId=setInterval('pf204652show()',5);
        function pf204652clickhide(){
            document.getElementById('pf204652hide').style.display='none';
            document.getElementById('pf204652show').style.display='inline';
            pf204652IntervalId=setInterval('pf204652hide()',5);
        }
        function pf204652clickshow(){
            document.getElementById('pf204652hide').style.display='inline';
            document.getElementById('pf204652show').style.display='none';
            pf204652IntervalId=setInterval('pf204652show()',5);
        }
        function pf204652clickclose(){
            document.body.style.marginBottom = '0px';
            pf204652bottomLayer.style.display = 'none';
        }
    </script>
    <script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-22470606-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

Bài viết mới

Các bài viết mới được cập nhật

Bài viết được xem nhiều

Các bài viết nổi bật