Премини към съдържанието
  • Добре дошли!

    Добре дошли в нашите форуми, пълни с полезна информация. Имате проблем с компютъра или телефона си? Публикувайте нова тема и ще намерите решение на всичките си проблеми. Общувайте свободно и открийте безброй нови приятели.

    Моля, регистрирайте се за да публикувате тема и да получите пълен достъп до всички функции.

     

Сняг в логото на сайта ? Как ?


Гости ¦•••SHERIFA•••¦

Препоръчан отговор

Гости ¦•••SHERIFA•••¦

Значи искам като отварят сайта ми и логото като гледат да вали сняг... Как ще стане този номер ? Гледах някакви .php файлове, намерих файлове, дето вали уж ама не мога да го наглася:

function PicData( $whichpic ) {

global $mklib;

   

switch( $whichpic )

{

      case 1:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"80\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas1.jpg\">";

      break;

      case 2:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"82\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas2.jpg\">";

      break;

      case 3:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"174\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas3.jpg\">";

      break;

      case 4:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"187\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas4.jpg\">";

      break;

      case 5:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"141\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas5.jpg\">";

      break;

      case 6:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"89\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas6.jpg\">";

      break;

      case 7:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"156\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas7.jpg\">";

      break;

      case 8:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"183\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas8.jpg\">";

      break;

      case 9:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"89\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas9.jpg\">";

      break;

      case 10:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"138\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas10.jpg\">";

      break;

      case 11:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"86\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas11.jpg\">";

      break;

      case 12:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"184\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas12.jpg\">";

      break;

      case 13:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"112\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas13.jpg\">";

      break;

      case 14:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"89\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas14.jpg\">";

      break;

      case 15:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"130\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas15.jpg\">";

      break;

      case 16:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"170\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas16.jpg\">";

      break;

      case 17:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"183\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas17.jpg\">";

      break;

      case 18:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"199\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas18.jpg\">";

      break;

      case 19:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"98\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas19.jpg\">";

      break;

      case 20:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"147\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas20.jpg\">";

      break;

      case 21:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"116\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas21.jpg\">";

      break;

      case 22:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"119\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas22.jpg\">";

      break;

      case 23:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"185\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas23.jpg\">";

      break;

      case 24:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"98\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas24.jpg\">";

      break;

      case 25:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" width=\"130\" height=\"147\"><param name=\"grph\" value=\"$mklib->siteurl/mkportal/images/christmas/christmas25.jpg\">";

      break;

}

}

Искам да сложа във main файла ( в случай ми е tpl_main.php намиращ се в htdocs\mkportal\templates\christmas\tpl_main.php ) логото, което по оригинал е така:

function view_logo() {

global $mklib;

return <<<EOF

<!-- begin logostrip -->

 

<tr>

<td id="mklogostrip" style="background-image: url('$mklib->images/sf_logo.jpg')" width="100%">

          <a href="$mklib->siteurl/index.php"><img src="$mklib->images/logo.gif" border="0" alt="" /></a>

          </td>

</tr>

<!-- end logostrip -->

EOF;

}

Къде ли не не слагах това:

      return "<applet code=\"alcsnow\" codebase=\"$mklib->siteurl\" codebase=\"$mklib->siteurl\" width=\"460\" height=\"110\"<param name=\"grph\" value=\"$mklib->siteurl/mkportal/templates/images/logo.gif\">";

}

}

В www директорията файла, който всъщност изпълнява да вали сняг e alcsnow.class ( гледам срещу него: Date Modified - 15.05.1996 12:26 )

И все не става или забива или изобщо не зарежда главната страница. Някъде трябва да се човъркне нещо, базикне и за това рекох да дойда тук и да ви пиша, гледам в другите теми отговаряте и ще можете да ми помогнете ! cool.gif

Линк към този отговор
Сподели в други сайтове
Значи искам като отварят сайта ми и логото като гледат да вали сняг... Как ще стане този номер ? Гледах някакви .php файлове, намерих файлове, дето вали уж ама не мога да го наглася:

<{POST_SNAPBACK}>

Доколкото мога да си извадя разни изводи - това нещо си е Java Applet, просто се разписва с PHP скрипт. Не може да се разбере много от примерите които си дал ...

Линк към този отговор
Сподели в други сайтове
Гости ¦•••SHERIFA•••¦

Писал съм, че някои файлове бачкат, а при направата на нов не става... Ако знаеш друг начин можеш да ми го напишеш в тази тема.

Линк към този отговор
Сподели в други сайтове
  • 2 седмици по-късно...
Гости ¦•••SHERIFA•••¦

Значи намерих сайт в който има инструкции кое как да стане... Обаче описанието е направено за .html и .htm файлове ( с <body> ), докато .php няма такова. А искам да го сложа в index.php - някой ако знае как става, много ще съм му благодарен ! :B

Линк към този отговор
Сподели в други сайтове

Ето ти един Java Script. Дано ти свърши работа. Трябва само да си намериш гифче със снежинка и да го сложиш в същата папка, където ти е страницата. И гифчето да е с име snow.gif. :)

<script language="JavaScript1.2">

<!--

//Original script by Altan ([email protected]), copyright 1999 Altan d.o.o.

// http://www.altan.hr/snow/index.html

// Modified by Paul Anderson, copyright 2001 CNET Builder.com

var snowflake = "snow.gif";

var no = 19; // number of snowflakes on the screen

var speed = 1; // smaller numbers make the snow fall faster

var dx, xp, yp; // coordinate and position variables

var am, stx, sty; // amplitude and step variables

var obj, i, doc_width = 800, doc_height = 600;

function winSize() {

doc_width = window.innerWidth?window.innerWidth:document.body.clientWidth;

doc_height = window.innerHeight?window.innerHeight:document.body.clientHeight;

}

dx = new Array();

xp = new Array();

yp = new Array();

am = new Array();

stx = new Array();

sty = new Array();

winSize();

document.write("<STYLE type=\"text/css\">.flake {position:absolute;top:-200;}</STYLE>");

for (i = 0; i < no; i++) {

dx = 0; // set coordinate variables

xp = Math.random()*(doc_width-30) +10; // set position variables

yp = Math.random()*doc_height;

am = Math.random()*20; // set amplitude variables

stx = 0.02 + Math.random()/10; // set step variables

sty = 0.7 + Math.random(); // set step variables

document.write("<div id=\"dot"+ i +"\" class=\"flake\"><img src=\"");

document.write(snowflake + "\" border=\"0\"></div>");

}

function snowMove(id,left,top) {

obj = document.getElementById?document.getElementById(id).style:

document.all?document.all[id].style:

document.layers?document.layers[id]:null;

if (obj) {

obj.left=left;

obj.top=top;

}

}

function snow() {

winSize();

doc_scroll = (window.pageYOffset!=null)?window.pageYOffset:document.body.scrollTop;

for (i = 0; i < no; ++ i) { // iterate for every dot

yp += sty;

if (yp > doc_height+doc_scroll-50) {

xp = Math.random()*(doc_width-am-30);

yp = doc_scroll;

stx = 0.02 + Math.random()/10;

sty = 0.7 + Math.random();

}

dx += stx;

snowMove("dot"+i,xp+am*Math.sin(dx),yp);

}

setTimeout("snow()", speed);

}

window.onload=snow;

// -->

</script>

Весели празници и щастлива Нова Година!!!


Линк към този отговор
Сподели в други сайтове

Този код при мене работи ........

print("<link rel=\"stylesheet\" href=\"../snowSilver.css\" type=\"text/css\">

<script>

// Set the number of snowflakes (more than 30 - 40 not recommended)

var snowmax=35

// Set the colors for the snow. Add as many colors as you like

var snowcolor=new Array(\"#aaaacc\",\"#ddddFF\",\"#ccccDD\")

// Set the fonts, that create the snowflakes. Add as many fonts as you like

var snowtype=new Array(\"Arial Black\",\"Arial Narrow\",\"Times\",\"Comic Sans MS\")

// Set the letter that creates your snowflake (recommended:*)

var snowletter=\"*\"

// Set the speed of sinking (recommended values range from 0.3 to 2)

var sinkspeed=2

// Set the maximal-size of your snowflaxes

var snowmaxsize=30

// Set the minimal-size of your snowflaxes

var snowminsize=10

// Set the snowing-zone

// Set 1 for all-over-snowing, set 2 for left-side-snowing

// Set 3 for center-snowing, set 4 for right-side-snowing

var snowingzone=1

///////////////////////////////////////////////////////////////////////////

// CONFIGURATION ENDS HERE

///////////////////////////////////////////////////////////////////////////

// Do not edit below this line

var snow=new Array()

var marginbottom

var marginright

var timer

var i_snow=0

var x_mv=new Array();

var crds=new Array();

var lftrght=new Array();

var browserinfos=navigator.userAgent

var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)

var ns6=document.getElementById&&!document.all

var opera=browserinfos.match(/Opera/)

var browserok=ie5||ns6||opera

function randommaker(range) {

rand=Math.floor(range*Math.random())

return rand

}

function initsnow() {

if (ie5 || opera) {

marginbottom = document.body.clientHeight

marginright = document.body.clientWidth

}

else if (ns6) {

marginbottom = window.innerHeight

marginright = window.innerWidth

}

var snowsizerange=snowmaxsize-snowminsize

for (i=0;i<=snowmax;i++) {

crds = 0;

lftrght = Math.random()*15;

x_mv = 0.03 + Math.random()/10;

snow=document.getElementById(\"s\"+i)

snow.style.fontFamily=snowtype[randommaker(snowtype.length)]

snow.size=randommaker(snowsizerange)+snowminsize

snow.style.fontSize=snow.size

snow.style.color=snowcolor[randommaker(snowcolor.length)]

snow.sink=sinkspeed*snow.size/5

if (snowingzone==1) {snow.posx=randommaker(marginright-snow.size)}

if (snowingzone==2) {snow.posx=randommaker(marginright/2-snow.size)}

if (snowingzone==3) {snow.posx=randommaker(marginright/2-snow.size)+marginright/4}

if (snowingzone==4) {snow.posx=randommaker(marginright/2-snow.size)+marginright/2}

snow.posy=randommaker(2*marginbottom-marginbottom-2*snow.size)

snow.style.left=snow.posx

snow.style.top=snow.posy

}

movesnow()

}

function movesnow() {

for (i=0;i<=snowmax;i++) {

crds += x_mv;

snow.posy+=snow.sink

snow.style.left=snow.posx+lftrght*Math.sin(crds);

snow.style.top=snow.posy

if (snow.posy>=marginbottom-2*snow.size || parseInt(snow.style.left)>(marginright-3*lftrght)){

if (snowingzone==1) {snow.posx=randommaker(marginright-snow.size)}

if (snowingzone==2) {snow.posx=randommaker(marginright/2-snow.size)}

if (snowingzone==3) {snow.posx=randommaker(marginright/2-snow.size)+marginright/4}

if (snowingzone==4) {snow.posx=randommaker(marginright/2-snow.size)+marginright/2}

snow.posy=0

}

}

var timer=setTimeout(\"movesnow()\",50)

}

for (i=0;i<=snowmax;i++) {

document.write(\"<span id='s\"+i+\"' style='position:absolute;top:-\"+snowmaxsize+\"'>\"+snowletter+\"</span>\")

}

if (browserok) {

window.onload=initsnow

}

</script>");

Линк към този отговор
Сподели в други сайтове

Това е кода за SnowSilver.css

/* General page style. The scroll bar colours only visible in IE5.5+ */

body { background-image: url(images/snowflakes.gif); border: none; scrollbar-3dlight-color: #D1D7DC; scrollbar-arrow-color: #006699; scrollbar-darkshadow-color: #98AAB1; scrollbar-face-color: #DEE3E7; scrollbar-highlight-color: #FFFFFF; scrollbar-shadow-color: #DEE3E7; scrollbar-track-color: #EFEFEF }

/* General font families for common tags */

font,th,td,p { font-family: Verdana, Arial, Helvetica, sans-serif }

a:link,a:active,a:visited { color : #006699; }

a:hover { text-decoration: underline; color : #DD6900; }

hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}

/* This is the border line & background colour round the entire page */

.bodyline { background-color: #FFFFFF; border: 1px #98AAB1 solid; }

/* This is the outline round the main forum tables */

.forumline { background-color: #FFFFFF; border: 2px #006699 solid; }

/* Main table cell colours and backgrounds */

td.row1 { background-color: #EFEFEF; }

td.row2 { background-color: #DEE3E7; }

td.row3 { background-color: #D1D7DC; }

/*

This is for the table cell above the Topics, Post & Last posts on the index.php page

By default this is the fading out gradiated silver background.

However, you could replace this with a bitmap specific for each forum

*/

td.rowpic {

background-color: #FFFFFF;

background-image: url(images/cellpic2.jpg);

background-repeat: repeat-y;

}

/* Header cells - the blue and silver gradient backgrounds */

th {

color: #FFA34F; font-size: 11px; font-weight : bold;

background-color: #006699; height: 25px;

background-image: url(images/cellpic3.gif);

}

td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {

background-image: url(images/cellpic1.gif);

background-color:#D1D7DC; border: #FFFFFF; border-style: solid; height: 28px;

}

/*

Setting additional nice inner borders for the main table cells.

The names indicate which sides the border will be on.

Don't worry if you don't understand this, just ignore it :-)

*/

td.cat,td.catHead,td.catBottom {

height: 29px;

border-width: 0px 0px 0px 0px;

}

th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.t

CornerR {

font-weight: bold; border: #FFFFFF; border-style: solid; height: 28px; }

td.row3Right,td.spaceRow {

background-color: #D1D7DC; border: #FFFFFF; border-style: solid; }

th.thHead,td.catHead { font-size: 12px; border-width: 1px 1px 0px 1px; }

th.thSides,td.catSides,td.spaceRow { border-width: 0px 1px 0px 1px; }

th.thRight,td.catRight,td.row3Right { border-width: 0px 1px 0px 0px; }

th.thLeft,td.catLeft { border-width: 0px 0px 0px 1px; }

th.thBottom,td.catBottom { border-width: 0px 1px 1px 1px; }

th.thTop { border-width: 1px 0px 0px 0px; }

th.thCornerL { border-width: 1px 0px 0px 1px; }

th.thCornerR { border-width: 1px 1px 0px 0px; }

/* The largest text used in the index page title and toptic title etc. */

.maintitle,h1,h2 {

font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif;

text-decoration: none; line-height : 120%; color : #000000;

}

/* General text */

.gen { font-size : 12px; }

.genmed { font-size : 11px; }

.gensmall { font-size : 10px; }

.gen,.genmed,.gensmall { color : #000000; }

a.gen,a.genmed,a.gensmall { color: #006699; text-decoration: none; }

a.gen:hover,a.genmed:hover,a.gensmall:hover { color: #DD6900; text-decoration: underline; }

/* The register, login, search etc links at the top of the page */

.mainmenu { font-size : 11px; color : #000000 }

a.mainmenu { text-decoration: none; color : #006699; }

a.mainmenu:hover{ text-decoration: underline; color : #DD6900; }

/* Forum category titles */

.cattitle { font-weight: bold; font-size: 12px ; letter-spacing: 1px; color : #006699}

a.cattitle { text-decoration: none; color : #006699; }

a.cattitle:hover{ text-decoration: underline; }

/* Forum title: Text and link to the forums used in: index.php */

.forumlink { font-weight: bold; font-size: 12px; color : #006699; }

a.forumlink { text-decoration: none; color : #006699; }

a.forumlink:hover{ text-decoration: underline; color : #DD6900; }

/* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */

.nav { font-weight: bold; font-size: 11px; color : #000000;}

a.nav { text-decoration: none; color : #006699; }

a.nav:hover { text-decoration: underline; }

/* titles for the topics: could specify viewed link colour too */

.topictitle { font-weight: bold; font-size: 11px; color : #000000; }

a.topictitle:link { text-decoration: none; color : #006699; }

a.topictitle:visited { text-decoration: none; color : #5493B4; }

a.topictitle:hover { text-decoration: underline; color : #DD6900; }

/* Name of poster in viewmsg.php and viewtopic.php and other places */

.name { font-size : 11px; color : #000000;}

/* Location, number of posts, post date etc */

.postdetails { font-size : 10px; color : #000000; }

/* The content of the posts (body of text) */

.postbody { font-size : 12px;}

a.postlink:link { text-decoration: none; color : #006699 }

a.postlink:visited { text-decoration: none; color : #5493B4; }

a.postlink:hover { text-decoration: underline; color : #DD6900}

/* Quote & Code blocks */

.code {

font-family: Courier, 'Courier New', sans-serif; font-size: 11px; color: #006600;

background-color: #FAFAFA; border: #D1D7DC; border-style: solid;

border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px

}

.quote {

font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #444444; line-height: 125%;

background-color: #FAFAFA; border: #D1D7DC; border-style: solid;

border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px

}

/* Copyright and bottom info */

.copyright { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #444444; letter-spacing: -1px;}

a.copyright { color: #444444; text-decoration: none;}

a.copyright:hover { color: #000000; text-decoration: underline;}

/* Form elements */

input,textarea, select {

color : #000000;

font: normal 11px Verdana, Arial, Helvetica, sans-serif;

border-color : #000000;

}

/* The text input fields background colour */

input.post, textarea.post, select {

background-color : #FFFFFF;

}

input { text-indent : 2px; }

/* The buttons used for bbCode styling in message post */

input.button {

background-color : #EFEFEF;

color : #000000;

font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif;

}

/* The main submit button option */

input.mainoption {

background-color : #FAFAFA;

font-weight : bold;

}

/* None-bold submit button */

input.liteoption {

background-color : #FAFAFA;

font-weight : normal;

}

/* This is the line in the posting page which shows the rollover

help line. This is actually a text box, but if set to be the same

colour as the background no one will know :yanim:

*/

.helpline { background-color: #DEE3E7; border-style: none; }

Линк към този отговор
Сподели в други сайтове
  • 5 седмици по-късно...

И аз се мъчих да намеря и успях ето какво трябва да направите:

Отваряте main файла от папката на вашият стайл

<!-- begin footer -->

<!-- you can add your credits here  -->
Тук поставяте този код
<script type="text/javascript">


/******************************************

* Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html)

* Visit Dynamic Drive DHTML code library (http://www.dynamicdrive.com/) for full source code

* Last updated Nov 9th, 05' by DD. This notice must stay intact for use

******************************************/

  

  //Configure below to change URL path to the snow image

  var snowsrc="snow.gif"

  // Configure below to change number of snow to render

  var no = 10;

  // Configure whether snow should disappear after x seconds (0=never):

  var hidesnowtime = 0;

  // Configure how much snow should drop down before fading ("windowheight" or "pageheight")

  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("dynamicdrive.com")!=-1)? "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) {

      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 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>

След това в вашата root директория(http://www.domeina.com/org/net/biz/t.n) постаряте снежинката която изберете трябва да се казва сnow.gif

Линк към този отговор
Сподели в други сайтове

Добавете отговор

Можете да публикувате отговор сега и да се регистрирате по-късно. Ако имате регистрация, влезте в профила си за да публикувате от него.

Гост
Напишете отговор в тази тема...

×   Вмъкнахте текст, който съдържа форматиране.   Премахни форматирането на текста

  Разрешени са само 75 емотикони.

×   Съдържанието от линка беше вградено автоматично.   Премахни съдържанието и покажи само линк

×   Съдържанието, което сте написали преди беше възстановено..   Изтрий всичко

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Добави ново...

Информация

Поставихме бисквитки на устройството ви за най-добро потребителско изживяване. Можете да промените настройките си за бисквитки, или в противен случай приемаме, че сте съгласни с нашите Условия за ползване