Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Atsitiktinis youtube video

Parašė nesby· 2010 Bir. 7 18:06:02
#2

susitvarkiau, kam reikia ant javascripto stai jums kodas, ten(pirmam poste) ant php (man neveike).

sitas veikia, perdariau:
Javascript kodas:

<SCRIPT LANGUAGE="JavaScript">
function random_banner(){
var i=0;
banners = new Array();
banners[0] = 'GUze-oYsswI';
banners[1] = 'NY6UTnS6Z-A';
banners[2] = 'yj72e5q61Fs';
banners[3] = 'K-_qwaCFRes';
banners[4] = 'wnguwp9U3ec';

today = new Date();
i=today.getSeconds();
n=banners.length;
return banners[i-Math.round((i-1)/n)*n];
}

document.write('<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/' + random_banner() + '&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/' + random_banner() + '&hl=en&fs=1"" allowfullscreen="true" width="425" height="344"></embed></object>')

</SCRIPT>

Redagavo nesby· 2010 Bir. 7 18:06:45