Loading v.2 » DataLife Engine Support

DLEVIET - DataLife Engine Support Home Page

Loading v.2

  • Author: admin;  
  • Views: 1742;  
  • Date: 16 May 2009;  
Loading v.2


Demo : DLEViet.com fellow

DO NOW

1. Creat file load.js with content(below code) and put it in folder templates/{current template}/dleimages/


// Loading version 2.0 from DLEViet.com
var ie45,ns6,ns4,dom;
if (navigator.appName=="Microsoft Internet Explorer") ie45=parseInt(navigator.appVersion)>=4;
else if (navigator.appName=="Netscape"){  ns6=parseInt(navigator.appVersion)>=5;  ns4=parseInt(navigator.appVersion)<5;}
dom=ie45 || ns6;

var timershow=false;
var curx=-200;
var cury=350;
// var win_w=window.innerWidth ? window.innerWidth : document.body.offsetWidth;

var win_w = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    win_w = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    win_w = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    win_w = document.body.offsetWidth;
  }
  
var mid_w=win_w/2;
var timershow1=window.setInterval("stayMiddle()",1);

function getobj(id) {
el = document.all ? document.all[id] :   dom ? document.getElementById(id) :   document.layers[id];
return el;
}

function show_Loading() {
    doituong = getobj('LoadingDiv');
    if (timershow) window.clearTimeout(timershow);
    timershow=window.setInterval("nshow()",1);
}

function hide_Loading() {
    doituong = getobj('LoadingDiv');
    if (timershow) window.clearTimeout(timershow);
    timershow=window.setInterval("nhide()",1);
}
// Loading version 2.0 from DLEViet.com
function moveobj(doituong,x,y) {
    doituong.style.left=x+"px"
    doituong.style.top=y+"px"
    curx=x;
    cury=y;
}
// Loading version 2.0 from DLEViet.com
function stayMiddle() {
    if (document.documentElement && document.documentElement.scrollTop)
        var pY =  document.documentElement.scrollTop;
    else if (document.body)
        var pY =  document.body.scrollTop;

    doituong = getobj('LoadingDiv');
    newy = cury+((pY-cury)/16)+12;
    moveobj(doituong,curx,newy);
}
// Loading version 2.0 from DLEViet.com
function nshow() {
    doituong = getobj('LoadingDiv');
    newx = curx+((mid_w-curx)/16)-7;
    moveobj(doituong,newx,cury);
}
function nhide() {
    doituong = getobj('LoadingDiv');
    newx = curx+((0-curx)/16)-15;
    moveobj(doituong,newx,cury);
}
// End
show_Loading();


2. Save this image Loading v.2 and put it in folder templates/{current template}/dleimages/

3. Open file main.tpl of current template

Find

{AJAX}


ABOVE add

You must register before you can view this text.


Next find

</html>


ABOVE add

You must register before you can view this text.


Finish
We encourage you to Register or Login to website under your name.

moutez

Posted 21 March 2010 05:14 Register: 21.03.2010
angry

kocan

Posted 13 May 2010 05:02 Register: 12.05.2010
hey admin error loading no hiden..box.!!???

babon

Posted 23 April 2011 17:25 Register: 23.04.2011
here is a small mistake by admin....


<!-- Loading version 2.0 from DLEViet.com -->
<script language="javascript" type="text/javascript">hide_Loading();</script>
<!-- / Loading version 2.0 from DLEViet.com -->



add this code ABOVE


</body>
</html>


I hope solve problem.

Thanks
Information
Members of Guest cannot leave comments.

Pagerank Update

    Updates Yandex SEO
    13.04.2012
    16.02.2012
    04.02.2012
    Updates Yandex search
    17.05.2012
    15.05.2012
    12.05.2012
    Updates Yandex Catalogue
    18.05.2012
    16.05.2012
    11.05.2012
    Updates Google
    03.05.2012
    06.02.2012
    08.11.2011

Find us on Facebook

Poll

How do you know DataLife Engine Support?

Search Engine
Other DLE Support websites
Forum
Friends
Others

Sponsor

Calendar

«    May 2012    »
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
Contact us in social network

Facebook

Twitter