Accueil   Accueil    Forum   Forum    Download   Download    Livre d'or   Livre d'or    Contact   Contact    Liens Web   Liens Web

Integrer un script dans un theme - CMS KwsPHP - Le site clés en main

Colonne de gauche

Espace membre

Privé Masquer le formulaire de connexion


Se souvenir de moi ?


Mot de passe oublié

Forum

Sujets Importants

fleche basForum : Masquer l’entête

Accès rapide :

 

Effectuer une Recherche avancée OU


fleche basIntegrer un script dans un theme  [3 réponses]

fleche bas

nico08
starsj1.png
Newbie


avatar
Hors ligne

Nombre de posts: 17
Inscrit(e) le: 02 novembre 2010
Imprimer Permalien vendredi 19 novembre 2010 à 17:31  
Slt
hé oui c encore moi
Panneau haut
lol
Pancarte


j aimerais savoir quel fichier est a modifier pour integrer un script dans un theme
style des flocon de neige

Code PHP :
Pour copier le contenu exact du code,
Veuillez citer le message
  1. <?php  
  2. #####!!!#####
  3.  
  4.  
  5. <script language="JavaScript1.2">
  6.  
  7.   //Configure below to change URL path to the snow image
  8.   var snowsrc="http://www.sportingclubsedanais.0fees.net/themes/heliusNicoTest/images/snow.gif"
  9.   // Configure below to change number of snow to render
  10.   var no = 10;
  11.  
  12.   var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
  13.   var ie4up = (document.all) ? 1 : 0;
  14.   var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
  15.  
  16.   var dx, xp, yp;    // coordinate and position variables
  17.   var am, stx, sty;  // amplitude and step variables
  18.   var i, doc_width = 800, doc_height = 600;
  19.   
  20.   if (ns4up||ns6up) {
  21.     doc_width = self.innerWidth;
  22.     doc_height = self.innerHeight;
  23.   } else if (ie4up) {
  24.     doc_width = document.body.clientWidth;
  25.     doc_height = document.body.clientHeight;
  26.   }
  27.  
  28.   dx = new Array();
  29.   xp = new Array();
  30.   yp = new Array();
  31.   am = new Array();
  32.   stx = new Array();
  33.   sty = new Array();
  34.   
  35.   for (i = 0; i < no; ++ i) {  
  36.     dx[i] = 0;                        // set coordinate variables
  37.     xp[i] = Math.random()*(doc_width-50);  // set position variables
  38.     yp[i] = Math.random()*doc_height;
  39.     am[i] = Math.random()*20;         // set amplitude variables
  40.     stx[i] = 0.02 + Math.random()/10; // set step variables
  41.     sty[i] = 0.7 + Math.random();     // set step variables
  42.     if (ns4up) {                      // set layers
  43.       if (i == 0) {
  44.         document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><a href=\"http://www.sportingclubsedanais.0fees.net\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/layer>");
  45.       } else {
  46.         document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"><\/layer>");
  47.       }
  48.     } else if (ie4up||ns6up) {
  49.       if (i == 0) {
  50.         document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://www.sportingclubsedanais.0fees.net\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
  51.       } else {
  52.         document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
  53.       }
  54.     }
  55.   }
  56.   
  57.   function snowNS() {  // Netscape main animation function
  58.     for (i = 0; i < no; ++ i) {  // iterate for every dot
  59.       yp[i] += sty[i];
  60.       if (yp[i] > doc_height-50) {
  61.         xp[i] = Math.random()*(doc_width-am[i]-30);
  62.         yp[i] = 0;
  63.         stx[i] = 0.02 + Math.random()/10;
  64.         sty[i] = 0.7 + Math.random();
  65.         doc_width = self.innerWidth;
  66.         doc_height = self.innerHeight;
  67.       }
  68.       dx[i] += stx[i];
  69.       document.layers["dot"+i].top = yp[i];
  70.       document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
  71.     }
  72.     setTimeout("snowNS()", 10);
  73.   }
  74.  
  75.   function snowIE_NS6() {  // IE and NS6 main animation function
  76.     for (i = 0; i < no; ++ i) {  // iterate for every dot
  77.       yp[i] += sty[i];
  78.       if (yp[i] > doc_height-50) {
  79.         xp[i] = Math.random()*(doc_width-am[i]-30);
  80.         yp[i] = 0;
  81.         stx[i] = 0.02 + Math.random()/10;
  82.         sty[i] = 0.7 + Math.random();
  83.         doc_width = ns6up?window.innerWidth : document.body.clientWidth;
  84.         doc_height = ns6up?window.innerHeight : document.body.clientHeight;
  85.       }
  86.       dx[i] += stx[i];
  87.       if (ie4up){
  88.       document.all["dot"+i].style.pixelTop = yp[i];
  89.       document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
  90.       }
  91.       else if (ns6up){
  92.       document.getElementById("dot"+i).style.top=yp[i];
  93.       document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]);
  94.       }   
  95.     }
  96.     setTimeout("snowIE_NS6()", 10);
  97.   }
  98.  
  99.   if (ns4up) {
  100.     snowNS();
  101.   } else if (ie4up||ns6up) {
  102.     snowIE_NS6();
  103.   }
  104.  
  105. </script>
  106. <p><font face="verdana" size="1">Powered and Generated by </font><a href="http://www.sportingclubsedanais.0fees.net" target="_blank"><font face="verdana,arial,helvetica" size="1" color="black">http://www.<b>esp</b>.com</font></a>By nico@rdennes</p>
  107.  
  108. #####!!!#####
  109. ?>
Édité 1 fois - Dernière édition: 19/11/2010 à 17:50 Par Gothicae. Raison: Merci de faire attention et d'utiliser les balises php prévu à cet effet.



Infos CMS KwsPHP


Informations : Avant de poster un sujet sur le forum

Veuillez avant tout vérifiez la comparaison de vos fichiers sur votre site
Mon compte / Outils / Comparaison


La recherche avancée du forum (en ciblant au mieux les options de la recherche)
La Faq - La documentation - La documentation en vidéo - Le sujet "Install et Mise à jour"
Vous devez lire en priorité le topic de la 1.6 pour en découvrir ses fonctionnalités


Afficher



σGothicae
starsj6.png
Dieu
Ultra Méchant


avatar
Hors ligne

Nombre de posts: 1583 (0.22/Jour)
Inscrit(e) le: 13 avril 2007
Visiter son site
Imprimer Permalien vendredi 19 novembre 2010 à 17:49  
Avant tout, attention aux scripts trouvés sur le net, ils peuvent être potentiellement dangereux et KwsPHP ne peut en être tenu responsable.

Pour répondre à ta question, il faut le mettre en <head> et </head> dans le fichier header.php u thème.

Attention aussi ce genre de scripts fait ramer le site...

Comtois , rends toi! Neni ma foi! | http://www.design.bouliz.com | http://www.bouliz.com
Qui c'est les plus forts, évidemment c'est les verts!!!
userbar_112987970.png


nico08
starsj1.png
Newbie


avatar
Hors ligne

Nombre de posts: 17
Inscrit(e) le: 02 novembre 2010
Imprimer Permalien vendredi 19 novembre 2010 à 18:03  
merci de ta reponse aussi rapide


Imprimer Permalien vendredi 19 novembre 2010 à 18:35  
Slt,

Perso je prendrais tout le js que je mettrais dans un neige.js puis je l'inclurais depuis le header via une ligne de code. Au même endroit que tu l'indique gothicae.

Cette solution est mieux à mon gout mais chacun son truc..


fleche basIntegrer un script dans un theme  [3 réponses]