What this addon do :!:
Vshare script has 3 images and you can rollover those images at mouse over.
An example is at http://alotporn.com/index.php :wink:
How install it :?:
1. Copy this code and save it with the name rotator.js
Code:
var thumbs=new Array();
var stat=new Array();
var thumb=new Array();
function rotatethumb(i,str)
{ var loop=0;
if (stat[str])
{
while ((thumbs[str][i]==0 || i>=3) && loop<100)
{ if (i>=10) { i=0; }
else
{ i++;
}
loop++;
}
if (thumb[str][i].complete)
{ document.getElementById(str).src=thumb[str][i].src;
setTimeout("rotatethumb("+(i+1)+",'"+str+"')",500);
}
else
{ setTimeout("rotatethumb("+i+",'"+str+"')",20);
}
}
}
function loadthumb(url,str,j)
{ if (stat[str]) { thumb[str][j].src=url; }
}
function startr(str,ta,te)
{ stat[str]=1;
var num;
var first=1;
for(var j=0;j<3;j++)
{ if (thumbs[str][j]==1)
{ thumb[str][j]=new Image();
num=j+1;
if (first) { first=0; loadthumb(ta+num+te,str,j); }
else { setTimeout("loadthumb('"+ta+num+te+"','"+str+"',"+j+")",j*50); }
}
}
rotatethumb(0,str);
}
function endr(str)
{ stat[str]=0;
}
2. Upload rotator.js file to yoursite.com/js/rotator.js
3. Open templates\header.tpl
add:
Code:
<script language="JavaScript" type="text/javascript" src="{$baseurl}/js/rotator.js"></script>
4. open templates\video.tpl
Find this:
Replace with this:
That's it now go to "yoursite.com\recent\" and see the results. :wink:
Note:
Do the same thing with the index page and user profile page. The only difference is that you have to change the standards {$answers[i].VID} .
NOTE
If you do not have a quick server do not add this addon because the SQL will be very slow.
Bookmarks