Welcome, Guest. Please Login or Register.
May 01, 2025, 07:59:27 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Language Specific User Help  |  Español  |  Preparando la navidad en mi foro « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Preparando la navidad en mi foro  (Read 1198 times)
ZonaMax
Noobie
*
Posts: 35


Preparando la navidad en mi foro
« on: November 24, 2003, 05:22:13 PM »
Reply with quote

Versión de YaBB SE: 1.5.4
Versión de PHP:
Versión de MySQL:
Plataforma del Servidor: Unix, Linux, or BSD
Enlace al Foro: http://www.atlantisdigital.org/forun/

Descripción del Problema:
Quote<script language="JavaScript1.2">

/******************************************
* Nieve Script - HTML.Dynamico 2001
******************************************/
 

 // Configure para cambiar el URL path de la imagen
 var snowsrc="snow.gif"
 // Configure para cambiar la cantidad de nieve
 var no = 10;

 var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
 var ie4up = (document.all) ? 1 : 0;
 var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

 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 (ns4up||ns6up) {
   doc_width = self.innerWidth;
   doc_height = self.innerHeight;
 } else if (ie4up) {
   doc_width = document.body.clientWidth;
   doc_height = document.body.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 = 0;                        // set coordinate variables
   xp = Math.random()*(doc_width-50);  // 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
   if (ns4up) {                      // set layers
     if (i == 0) {
       document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><a><img src='"+snowsrc+"' border=\"0\"><\/a><\/layer>");
     } else {
       document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"><\/layer>");
     }
   } else 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><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 snowNS() {  // Netscape main animation function
   for (i = 0; i < no; ++ i) {  // iterate for every dot
     yp += sty;
     if (yp > doc_height-50) {
       xp = Math.random()*(doc_width-am-30);
       yp = 0;
       stx = 0.02 + Math.random()/10;
       sty = 0.7 + Math.random();
       doc_width = self.innerWidth;
       doc_height = self.innerHeight;
     }
     dx += stx;
     document.layers["dot"+i].top = yp;
     document.layers["dot"+i].left = xp + am*Math.sin(dx);
   }
   setTimeout("snowNS()", 10);
 }

 function snowIE_NS6() {  // IE and NS6 main animation function
   for (i = 0; i < no; ++ i) {  // iterate for every dot
     yp += sty;
     if (yp > doc_height-50) {
       xp = Math.random()*(doc_width-am-30);
       yp = 0;
       stx = 0.02 + Math.random()/10;
       sty = 0.7 + Math.random();
       doc_width = ns6up?window.innerWidth : document.body.clientWidth;
       doc_height = ns6up?window.innerHeight : document.body.clientHeight;
     }
     dx += stx;
     if (ie4up){
     document.all["dot"+i].style.pixelTop = yp;
     document.all["dot"+i].style.pixelLeft = xp + am*Math.sin(dx);
     }
     else if (ns6up){
     document.getElementById("dot"+i).style.top=yp;
     document.getElementById("dot"+i).style.left=xp + am*Math.sin(dx);
     }  
   }
   setTimeout("snowIE_NS6()", 10);
 }

 if (ns4up) {
   snowNS();
 } else if (ie4up||ns6up) {
   snowIE_NS6();
 }

</script>

Vereis intento introducir este Java en el indice del foro sin obtener el resultado deseado, me podeis decir por favor si por algun motivo el foro no acepta mencionado script, ya que lo pongo en el web que esta en HTML y funciona sin problema alguno.

Gracias.
SalU2
Logged
ZonaMax
Noobie
*
Posts: 35


Re:Preparando la navidad en mi foro
« Reply #1 on: November 24, 2003, 09:13:37 PM »
Reply with quote

Solo decir que probe con este otro y tampoco me funciono y no le ecuentro la explicacion...

Salu2



Quote<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Original:  Altan ([email protected]) -->
<!-- Web Site:  http://www.altan.hr/snow -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var no = 25; // snow number
var speed = 2; // smaller number moves the snow faster
var snowflake = "YaBBImages/snow3.gif";

var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
var ie4up = (document.all) ? 1 : 0;
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 (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.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 = 0;                        // set coordinate variables
xp = Math.random()*(doc_width-50);  // 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
if (ns4up) {                      // set layers
if (i == 0) {
document.write("<layer name="dot"+ i +"" left="15" ");
document.write("top="15" visibility="show"><img src="");
document.write(snowflake + "" border="0"></layer>");
} else {
document.write("<layer name="dot"+ i +"" left="15" ");
document.write("top="15" visibility="show"><img src="");
document.write(snowflake + "" border="0"></layer>");
  }
} else if (ie4up) {
if (i == 0) {
document.write("<div id="dot"+ i +"" style="POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;"><img src="");
document.write(snowflake + "" border="0"></div>");
} else {
document.write("<div id="dot"+ i +"" style="POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;"><img src="");
document.write(snowflake + "" border="0"></div>");
     }
  }
}
function snowNS() {  // Netscape main animation function
for (i = 0; i < no; ++ i) {  // iterate for every dot
yp += sty;
if (yp > doc_height-50) {
xp = Math.random()*(doc_width-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx += stx;
document.layers["dot"+i].top = yp;
document.layers["dot"+i].left = xp + am*Math.sin(dx);
}
setTimeout("snowNS()", speed);
}
function snowIE() {  // IE main animation function
for (i = 0; i < no; ++ i) {  // iterate for every dot
yp += sty;
if (yp > doc_height-50) {
xp = Math.random()*(doc_width-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx += stx;
document.all["dot"+i].style.pixelTop = yp;
document.all["dot"+i].style.pixelLeft = xp + am*Math.sin(dx);
}
setTimeout("snowIE()", speed);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
// End -->
</script>
Logged
Omar Bazavilvazo
YaBB SE Developer
YaBB God
*****
Posts: 2153


I never said I would stay to the end...

WWW
Re:Preparando la navidad en mi foro
« Reply #2 on: November 24, 2003, 10:45:52 PM »
Reply with quote

lo agregaste en template.php?
Logged

Greetings from México!
http://omarbazavilvazo.com
Mi foro Español-Japonés
http://hablajapones.org
http://hablajapones.org/index.php/japones/tutoriales/b16.php

NO me manden IM para soporte o dudas
...Leo los foros como todos...
pacolls
Full Member
***
Posts: 168


Camelot Foro

Re:Preparando la navidad en mi foro
« Reply #3 on: November 25, 2003, 07:08:14 AM »
Reply with quote

Te has fijado si da algun error de Script el navegador?  ???
Logged

ZonaMax
Noobie
*
Posts: 35


Re:Preparando la navidad en mi foro
« Reply #4 on: November 25, 2003, 09:28:29 AM »
Reply with quote

Lo 1º Gracias a los dos por responder

X Omar,como siempre un placer entablar conversacion contigo, decir que si lo agregue en Template.php

X Pacolls,como siempre gracias por estar siempre al pie del cañon, ya te lo he dicho muchas veces pero lo hago una vez mas aqui publicamente, gracias amigo, en cuanto a tu prgunta decir que no he detectado ningun error en el explorer.

Salu2
Logged
Omar Bazavilvazo
YaBB SE Developer
YaBB God
*****
Posts: 2153


I never said I would stay to the end...

WWW
Re:Preparando la navidad en mi foro
« Reply #5 on: November 25, 2003, 04:40:41 PM »
Reply with quote

Lo probé en mi plantilla, puse el script y funciona.

SOLO funciona en IE, parece, no en Mozilla.

« Last Edit: November 25, 2003, 04:41:00 PM by Omar Bazavilvazo » Logged

Greetings from México!
http://omarbazavilvazo.com
Mi foro Español-Japonés
http://hablajapones.org
http://hablajapones.org/index.php/japones/tutoriales/b16.php

NO me manden IM para soporte o dudas
...Leo los foros como todos...
Omar Bazavilvazo
YaBB SE Developer
YaBB God
*****
Posts: 2153


I never said I would stay to the end...

WWW
Re:Preparando la navidad en mi foro
« Reply #6 on: November 25, 2003, 04:42:59 PM »
Reply with quote

Mi template.php
Logged

Greetings from México!
http://omarbazavilvazo.com
Mi foro Español-Japonés
http://hablajapones.org
http://hablajapones.org/index.php/japones/tutoriales/b16.php

NO me manden IM para soporte o dudas
...Leo los foros como todos...
ZonaMax
Noobie
*
Posts: 35


Re:Preparando la navidad en mi foro
« Reply #7 on: November 25, 2003, 07:25:51 PM »
Reply with quote

NO lo consigo, lo he puesto aqui  http://www.atlantisdigital.org/   y como veis funciona lo he puesto aqui tambien http://www.atlantisdigital.org/forun/index.php  y tambien funciono aunque lo he quitado pues es un poco precipitada la fecha, pero lo pongo en el template que tengo preparado para la Navidad y no consigo que funcione......

Puede ser por una animacion en Flash que tengo en el tenplate de navidad, es que por muchas vueltas que le doy no le encuentro la razon para que no funcione.

Seguire haciendo pruebas ... Salu2
Logged
pacolls
Full Member
***
Posts: 168


Camelot Foro

Re:Preparando la navidad en mi foro
« Reply #8 on: November 25, 2003, 07:56:19 PM »
Reply with quote

Probado con Flash y funciona perfectamente el script que te pase yo  ::), el de los macarrones  ;D.

Creo que deberias descargar el problema de que fuera el flash  ;)
Logged

Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Language Specific User Help  |  Español  |  Preparando la navidad en mi foro « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.139 seconds with 21 queries.