Adi | Date: Sunday, 2012-01-22, 9:03 PM | Message # 1 |
Group: Member
Messages: 179
|
Skripto aprašymas:
Skriptas leidžia vartotojui pakeisti svetainės foną pagal savo skonį, fonas
yra isiminamas cookiu ...
Įdiegimas:
Šita koda dedame į beleikoki Global block
Code <script type="text/javascript"> function okno(){ _uWnd.alert($("#okno1").html(),'Fono keitimas',{name:'24a', align:'left', w:420, h:400, tm:400000, icon:'http://ucozas.lt/change_fon/tip.png'}) };
function plat1(){ setCookie('platbg1','1','365'); eraseCookie('platbg2');eraseCookie('platbg3');eraseCookie('platbg4');eraseCookie('platbg5');eraseCookie('platbg6'); eraseCookie('platbg7'); eraseCookie('platbg8'); eraseCookie('platbg9'); $('body').css('background-image', 'url("http://ucozas.lt/change_fon/1.jpg")'); };
function plat2(){ setCookie('platbg2','1','365'); eraseCookie( 'platbg1' );eraseCookie( 'platbg3' );eraseCookie( 'platbg4' );eraseCookie( 'platbg5' );eraseCookie( 'platbg6' ); eraseCookie('platbg7'); eraseCookie('platbg8'); eraseCookie('platbg9'); $('body').css('background-image', 'url("http://ucozas.lt/change_fon/2.jpg")'); };
function plat3(){ setCookie('platbg3','1','365'); eraseCookie( 'platbg1' );eraseCookie( 'platbg2' );eraseCookie( 'platbg4' );eraseCookie( 'platbg5' );eraseCookie( 'platbg6' ); eraseCookie('platbg7'); eraseCookie('platbg8'); eraseCookie('platbg9'); $('body').css('background-image', 'url("http://ucozas.lt/change_fon/3.jpg")'); };
function plat4(){ setCookie('platbg4','1','365'); eraseCookie( 'platbg1' );eraseCookie( 'platbg2' );eraseCookie( 'platbg3' );eraseCookie( 'platbg5' );eraseCookie( 'platbg6' ); eraseCookie('platbg7'); eraseCookie('platbg8'); eraseCookie('platbg9'); $('body').css('background-image', 'url("http://ucozas.lt/change_fon/4.jpg")'); };
function plat5(){ setCookie('platbg5','1','365'); eraseCookie( 'platbg1' );eraseCookie( 'platbg2' );eraseCookie( 'platbg3' );eraseCookie( 'platbg4' );eraseCookie( 'platbg6' ); eraseCookie('platbg7'); eraseCookie('platbg8'); eraseCookie('platbg9'); $('body').css('background-image', 'url("http://ucozas.lt/change_fon/5.jpg")'); };
function plat6(){ setCookie('platbg6','1','365'); eraseCookie( 'platbg1' );eraseCookie( 'platbg2' );eraseCookie( 'platbg3' );eraseCookie( 'platbg4' );eraseCookie( 'platbg5' ); eraseCookie('platbg7'); eraseCookie('platbg8'); eraseCookie('platbg9'); $('body').css('background-image', 'url("http://ucozas.lt/change_fon/6.jpg")'); }; function plat7(){ setCookie('platbg7','1','365'); eraseCookie( 'platbg1' );eraseCookie( 'platbg3' );eraseCookie( 'platbg4' );eraseCookie( 'platbg5' );eraseCookie( 'platbg6' ); eraseCookie('platbg2'); eraseCookie('platbg8'); eraseCookie('platbg9'); $('body').css('background-image', 'url("http://ucozas.lt/change_fon/7.jpg")'); };
function plat8(){ setCookie('platbg8','1','365'); eraseCookie( 'platbg1' );eraseCookie( 'platbg3' );eraseCookie( 'platbg4' );eraseCookie( 'platbg5' );eraseCookie( 'platbg6' ); eraseCookie('platbg2'); eraseCookie('platbg7'); eraseCookie('platbg9'); $('body').css('background-image', 'url("http://ucozas.lt/change_fon/8.jpg")'); }; function plat9(){ setCookie('platbg9','1','365'); eraseCookie( 'platbg1' );eraseCookie( 'platbg3' );eraseCookie( 'platbg4' );eraseCookie( 'platbg5' );eraseCookie( 'platbg6' ); eraseCookie('platbg7'); eraseCookie('platbg8'); eraseCookie('platbg2'); $('body').css('background-image', 'url("http://ucozas.lt/change_fon/9.jpg")'); }; </script> <script src="http://ucozas.lt/change_fon/cookies.js"></script> <script> if(getCookie('platbg1')) { $('body').css('background-image', 'url("http://ucozas.lt/change_fon/1.jpg")'); }; if(getCookie( 'platbg2' )) { $('body').css('background-image', 'url("http://ucozas.lt/change_fon/2.jpg")'); }; if(getCookie( 'platbg3' )) { $('body').css('background-image', 'url("http://ucozas.lt/change_fon/3.jpg")'); }; if(getCookie( 'platbg4' )) { $('body').css('background-image', 'url("http://ucozas.lt/change_fon/4.jpg")'); }; if(getCookie( 'platbg5' )) { $('body').css('background-image', 'url("http://ucozas.lt/change_fon/5.jpg")'); }; if(getCookie( 'platbg6' )) { $('body').css('background-image', 'url("http://ucozas.lt/change_fon/6.jpg")'); }; if(getCookie( 'platbg7' )) { $('body').css('background-image', 'url("http://ucozas.lt/change_fon/7.jpg")'); }; if(getCookie( 'platbg8' )) { $('body').css('background-image', 'url("http://ucozas.lt/change_fon/8.jpg")'); }; if(getCookie( 'platbg9' )) { $('body').css('background-image', 'url("http://ucozas.lt/change_fon/9.jpg")'); }; </script> <div style="display: none;" id="okno1"> <img onclick="plat1()" src="http://ucozas.lt/change_fon/1.jpg" width="130px" height="120px"> <img onclick="plat2()" src="http://ucozas.lt/change_fon/2.jpg" width="130px" height="120px"> <img onclick="plat3()" src="http://ucozas.lt/change_fon/3.jpg" width="130px" height="120px"> <img onclick="plat4()" src="http://ucozas.lt/change_fon/4.jpg" width="130px" height="120px"> <img onclick="plat5()" src="http://ucozas.lt/change_fon/5.jpg" width="130px" height="120px"> <img onclick="plat6()" src="http://ucozas.lt/change_fon/6.jpg" width="130px" height="120px"> <img onclick="plat7()" src="http://ucozas.lt/change_fon/7.jpg" width="130px" height="120px"> <img onclick="plat8()" src="http://ucozas.lt/change_fon/8.jpg" width="130px" height="120px"> <img onclick="plat9()" src="http://ucozas.lt/change_fon/9.jpg" width="130px" height="120px"> </div>
O šį kodą dedame ten kur norime matyti nuorodą fonui pakeisti:
Code <a href="javascript://" onclick="okno();"><font size="4">Pakeisti svetainės fona</font></a>
|
|
|
|
Cammy | Date: Tuesday, 2012-04-03, 3:42 PM | Message # 2 |
Group: UcozBaze Team
Messages: 9
|
kas tas global block? ir kur ji rasti? as tik zinau block xD
|
|
|
|