Сега се уча за ипб ако може по простичко да ми обясните.
Сняг във форума
#1
Публикувано 05 December 2008 - 21:26
Сега се уча за ипб ако може по простичко да ми обясните.
#2
Публикувано 05 December 2008 - 23:35
Едит:Tishu
Причина:Моля по-леко с тона
#3
Публикувано 06 December 2008 - 03:39
ех тоя грозния не спре да спами и тук ама и от тук ще те изгонят спокЕх тоя пагане бе :D Спирка няма :D
Едит:Tishu
Причина:Моля по-леко с тона
#4
Публикувано 06 December 2008 - 15:34
<script>
var snowsrc="http://hogwarts-images.hit.bg/js18561468.gif"
var no = 20;
var hidesnowtime = 0;
var snowdistance = "pageheight";
///////////Stop Config//////////////////////////////////
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;
if (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = iecompattest().clientWidth;
doc_height = iecompattest().clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
snowsrc=(snowsrc.indexOf("bg-rechnik.com")!=-1)? "http://bg-rechnik.com/snow.gif" : snowsrc
for (i = 0; i < no; ++ i) {
dx[i] = 0; // set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ie4up||ns6up) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src=\""+snowsrc+"\" \/><\/div>");
}
}
function snowIE_NS6() { // IE and NS6 main animation function
doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")? iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight;
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
}
dx[i] += stx[i];
document.getElementById("dot"+i).style.top=yp[i]+"px";
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";
}
snowtimer=setTimeout("snowIE_NS6()", 10);
}
function hidesnow(){
if (window.snowtimer) clearTimeout(snowtimer)
for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"
}
if (ie4up||ns6up){
snowIE_NS6();
if (hidesnowtime>0)
setTimeout("hidesnow()", hidesnowtime*1000)
}
</script>ПП: Това са падащи снежинки :D http://galactik-foot...dex.php?act=idx < виж за какво става въпрос :D
#5
Публикувано 06 December 2008 - 20:04
благодаря сложих го но го махнах пак защото мн бавно слизаше снега и някво лагваше , може ли да намериш друг сняг бял .. по ситни снежинки[i]Мисля,че се сещам или те разбирам малко какво ти е желанието.Така влизаш Admin Control Panel > Look & Feel > Edit Board Header & Footer Wrapper ( на скина,на който искаш да сложиш снегът xD ) и след тага <body> слагаш ето този код:
<script> var snowsrc="http://hogwarts-images.hit.bg/js18561468.gif" var no = 20; var hidesnowtime = 0; var snowdistance = "pageheight"; ///////////Stop Config////////////////////////////////// var ie4up = (document.all) ? 1 : 0; var ns6up = (document.getElementById&&!document.all) ? 1 : 0; function iecompattest(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } var dx, xp, yp; // coordinate and position variables var am, stx, sty; // amplitude and step variables var i, doc_width = 800, doc_height = 600; if (ns6up) { doc_width = self.innerWidth; doc_height = self.innerHeight; } else if (ie4up) { doc_width = iecompattest().clientWidth; doc_height = iecompattest().clientHeight; } dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); snowsrc=(snowsrc.indexOf("bg-rechnik.com")!=-1)? "http://bg-rechnik.com/snow.gif" : snowsrc for (i = 0; i < no; ++ i) { dx[i] = 0; // set coordinate variables xp[i] = Math.random()*(doc_width-50); // set position variables yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; // set amplitude variables stx[i] = 0.02 + Math.random()/10; // set step variables sty[i] = 0.7 + Math.random(); // set step variables if (ie4up||ns6up) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src=\""+snowsrc+"\" \/><\/div>"); } } function snowIE_NS6() { // IE and NS6 main animation function doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10; doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")? iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight; for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); } dx[i] += stx[i]; document.getElementById("dot"+i).style.top=yp[i]+"px"; document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px"; } snowtimer=setTimeout("snowIE_NS6()", 10); } function hidesnow(){ if (window.snowtimer) clearTimeout(snowtimer) for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden" } if (ie4up||ns6up){ snowIE_NS6(); if (hidesnowtime>0) setTimeout("hidesnow()", hidesnowtime*1000) } </script>
ПП: Това са падащи снежинки :D http://galactik-foot...dex.php?act=idx < виж за какво става въпрос :D
#6
Публикувано 07 December 2008 - 10:20
var snowsrc="http://hogwarts-images.hit.bg/js18561468.gif"- с твоя картинка
#7
Публикувано 08 December 2008 - 17:52
#8
Публикувано 26 December 2008 - 17:37
#9
Публикувано 26 December 2008 - 21:53
#10 Guest_madafakar_*
Публикувано 25 December 2011 - 18:01
#11
Публикувано 06 January 2014 - 23:37
не ми се получава
#12
Публикувано 07 January 2014 - 18:19
Здравей ....
ето един пример изпитан от мен:
Отиди до :
Admin CP -> Look & Feel -> Select Template ->Global Templates->globalTemplate
Намери:
{parse template="includeVars" group="global" params="$header_items"}
Веднага след него постави код:
<script src="{$this->settings['img_url']}/snow/snowstorm.js"></script>
Запази промените.
Отиди до FTP public_html/public/style_images/твоят скин и създай нова папка с име snow.
В ново създадената папка разархивирай и качи този .js файл:
snowstorm.zip 1.05K
0 Брой сваляния
Запази промените ....това е всичко.
1 потребител(и) четат тази тема
0 потребители, 1 гости, 0 анонимни




Уроци
