منتدى دعم PBBoard الرسمي
(نسخة قابلة للطباعة من الموضوع)
https://pbboard.info/forums/t13612
أنقر هنا لمشاهدة الموضوع بهيئته الأصلية

كود الثلوج المتساقطة علي خلفية المنتدي
فارس الظلام 16-06-2013 12:06 مساءً
بسم الله الرحمن الرحيم
السلام عليكم
كود الثلوج المتساقطة علي خلفية المنتدي

1.لوحة التحكم >> الإستايلات والقوالب >>التحكم بالقوالب >> الستايل >>footer
2.تعديل قالب footer
3.نبحث عن هذا الكود
CODE
<!-- actiodfn_find_addons_5 -->
</div>
</div>
</div>


.4 ثم نضيف هذا الكود بعده

CODE
<script type="text/javascript">
var snowsrc="snow.gif"
var no = 10;

var dx, xp, yp;
var am, stx, sty;
var i, doc_width = 800, doc_height = 600;

if (typeof window.innerWidth != 'undefined')
{
doc_width = window.innerWidth;
doc_height = window.innerHeight;
}
else
if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0)
{
doc_width = document.documentElement.clientWidth;
doc_height = document.documentElement.clientHeight;
}
else
{
doc_width = document.getElementsByTagName('body')[0].clientWidth;
doc_height = document.getElementsByTagName('body')[0].clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();

for (i = 0; i < no; ++ i)
{
dx[i] = 0;
xp[i] = Math.random()*(doc_width-50);
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();

if (i == 0)
{
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
}
else
{
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
}
}

function DoSnow()
{
for (i = 0; i < no; ++ i)
{
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("DoSnow()", 50);
}

setTimeout("DoSnow()", 500);

</script>



************************************
طريقة الرفع
***********************************
رافع مابدخل مجلد upload إلى داخل مجلد منتدك الرئيسي

لتغير عدد الثلوج المتساقطة
نبحث عن

CODE
var no = 10;


ونعدل الرقم عشرة باي رقم






للمعاينة
لآ تبخلو ععلينآ بردودكم وتقييمكمclap
<script type="text/javascript">

var snowsrc="snow.gif"
var no = 10;

var dx, xp, yp;
var am, stx, sty;
var i, doc_width = 800, doc_height = 600;

if (typeof window.innerWidth != 'undefined')
{
doc_width = window.innerWidth;
doc_height = window.innerHeight;
}
else
if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0)
{
doc_width = document.documentElement.clientWidth;
doc_height = document.documentElement.clientHeight;
}
else
{
doc_width = document.getElementsByTagName('body')[0].clientWidth;
doc_height = document.getElementsByTagName('body')[0].clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();

for (i = 0; i < no; ++ i)
{
dx[i] = 0;
xp[i] = Math.random()*(doc_width-50);
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();

if (i == 0)
{
document.write("<img data-cke-saved-src='"+snowsrc+"' src='"+snowsrc+"' border="0">");
}
else
{
document.write("<img data-cke-saved-src='"+snowsrc+"' src='"+snowsrc+"' border="0">");
}
}

function DoSnow()
{
for (i = 0; i < no; ++ i)
{
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("DoSnow()", 50);
}

setTimeout("DoSnow()", 500);

</script

[/code]
2. طريقة الرفع 

**********************
ارفع مابدخل ملف upload إلى داخل مجلد منتدك
 ***********************************
المعاي </span></script>
منتدى دعم PBBoard الرسمي

Copyright © 2009-2024 PBBoard® Solutions. All Rights Reserved