It is currently Tue 27 Sep 2016 - 02:11 - créer un forum

[TUTO]Compte à rebours pour vos forums

Skip to content

Post new topic Reply to topic Goto page: <  1, 2, 3, 4, 5, 6, 7  >

[TUTO]Compte à rebours pour vos forums
Author Message
FeeLs





PostPosted: Sun 6 Apr 2008 - 13:31    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

PublicitéSupprimer les publicités ?
Previous post review:

Code: Sélectionner - Agrandir
<html>
<body>
<style style="text/css">

.lcdstyle{ /*Example CSS to create LCD countdown look*/
background-color:black;
color:yellow;
font: bold 18px MS Sans Serif;
padding: 3px;
}

.lcdstyle sup{ /*Example CSS to create LCD countdown look*/
font-size: 80%
}

</style>

<script type="text/javascript">

/***********************************************
* Dynamic Countdown script- © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function cdtime(container, targetdate){
if (!document.getElementById || !document.getElementById(container)) return
this.container=document.getElementById(container)
this.currentTime=new Date()
this.targetdate=new Date(targetdate)
this.timesup=false
this.updateTime()
}

cdtime.prototype.updateTime=function(){
var thisobj=this
this.currentTime.setSeconds(this.currentTime.getSeconds()+1)
setTimeout(function(){thisobj.updateTime()}, 1000) //update time every second
}

cdtime.prototype.displaycountdown=function(baseunit, functionref){
this.baseunit=baseunit
this.formatresults=functionref
this.showresults()
}

cdtime.prototype.showresults=function(){
var thisobj=this


var timediff=(this.targetdate-this.currentTime)/1000 //difference btw target date and current date, in seconds
if (timediff<0){ //if time is up
this.timesup=true
this.container.innerHTML=this.formatresults()
return
}
var oneMinute=60 //minute unit in seconds
var oneHour=60*60 //hour unit in seconds
var oneDay=60*60*24 //day unit in seconds
var dayfield=Math.floor(timediff/oneDay)
var hourfield=Math.floor((timediff-dayfield*oneDay)/oneHour)
var minutefield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour)/oneMinute)
var secondfield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour-minutefield*oneMinute))
if (this.baseunit=="hours"){ //if base unit is hours, set "hourfield" to be topmost level
hourfield=dayfield*24+hourfield
dayfield="n/a"
}
else if (this.baseunit=="minutes"){ //if base unit is minutes, set "minutefield" to be topmost level
minutefield=dayfield*24*60+hourfield*60+minutefield
dayfield=hourfield="n/a"
}
else if (this.baseunit=="seconds"){ //if base unit is seconds, set "secondfield" to be topmost level
var secondfield=timediff
dayfield=hourfield=minutefield="n/a"
}
this.container.innerHTML=this.formatresults(dayfield, hourfield, minutefield, secondfield)
setTimeout(function(){thisobj.showresults()}, 1000) //update results every second
}

/////CUSTOM FORMAT OUTPUT FUNCTIONS BELOW//////////////////////////////

//Create your own custom format function to pass into cdtime.displaycountdown()
//Use arguments[0] to access "Days" left
//Use arguments[1] to access "Hours" left
//Use arguments[2] to access "Minutes" left
//Use arguments[3] to access "Seconds" left

//The values of these arguments may change depending on the "baseunit" parameter of cdtime.displaycountdown()
//For example, if "baseunit" is set to "hours", arguments[0] becomes meaningless and contains "n/a"
//For example, if "baseunit" is set to "minutes", arguments[0] and arguments[1] become meaningless etc


function formatresults(){
if (this.timesup==false){//if target date/time not yet met
var displaystring=arguments[0]+" days "+arguments[1]+" hours "+arguments[2]+" minuts "+arguments[3]+"seconds left until "April 18, 2008 20:00:00"
}
else{ //else if target date/time met
var displaystring="Future date is here!"
}
return displaystring
}

function formatresults2(){
if (this.timesup==false){ //if target date/time not yet met
var displaystring="<span class='lcdstyle'>"+arguments[0]+" <sup>days</sup> "+arguments[1]+" <sup>hours</sup> "+arguments[2]+" <sup>minutes</sup> "+arguments[3]+" <sup>seconds</sup></span> left until this Christmas"
}
else{ //else if target date/time met
var displaystring="" //Don't display any text
alert("Christmas is here!") //Instead, perform a custom alert
}
return displaystring
}

</script>
<div id="countdowncontainer"></div>
<br />
<div id="countdowncontainer2"></div>

<script type="text/javascript">

var futuredate=new cdtime("countdowncontainer", "April 18, 2008 20:00:00")
futuredate.displaycountdown("days", formatresults)

</script>
</body>
</html>

<tr>
<td>
<div align="center"><br /><span class="copyright">{ADMIN_LINK}<br />

<!--
   We request you retain the full copyright notice below including the link to [url=http://www.phpbb.com]www.phpbb.com[/url].
   This not only gives respect to the large amount of time given freely by the developers
   but also helps build interest, traffic and use of phpBB 2.0. If you cannot (for good
   reason) retain the full copyright we request you at least leave in place the
   Powered by phpBB line, with phpBB linked to [url=http://www.phpbb.com]www.phpbb.com[/url]. If you refuse
   to include even this then support on our forums may be affected.

   The phpBB Group : 2002
// -->
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> &copy; 2001, 2005 phpBB Group<br />{TRANSLATION_INFO}<br />
<a href="http://www.mylimages.com/prive/index.php" target="_phpbb" class="copyright">Th&egrave;me r&eacute;alis&eacute; par <b>SGo</b></a></br>&nbsp;</br>&nbsp;</span></div>
      </td>
   </tr>
</table>

<!-- DEBUT DU SCRIPT -->
<style type="text/css">
.ejs_context_menuitems{padding-left:12px; padding-right:7px; }
</style><script language="JavaScript1.2">
/*
SCRIPT EDITE SUR L'EDITEUR JAVASCRIPT
http://www.editeurjavascript.com
*/
ejs_context_elemt = new Array;
ejs_context_elemt[0] = "Page précédente|history.go(-1)";
ejs_context_elemt[1] = "Page suivante|history.go(1)";
ejs_context_elemt[2] = "";
ejs_context_elemt[3] = 'Portail|document.location.href=\'http://lecafedemarseille.xooit.fr/portal.php\'';
ejs_context_elemt[4] = 'Forums|document.location.href=\'http://lecafedemarseille.xooit.fr/index.php\'';
ejs_context_elemt[5] = 'F.A.Q|document.location.href=\'http://lecafedemarseille.xooit.fr/faq.php\'';
ejs_context_elemt[6] = 'Recherche|document.location.href=\'http://lecafedemarseille.xooit.fr/search.php\'';
ejs_context_elemt[7] = 'Membres|document.location.href=\'http://lecafedemarseille.xooit.fr/memberlist.php\'';
ejs_context_elemt[8] = 'Groupes|document.location.href=\'http://lecafedemarseille.xooit.fr/groupcp.php\'';
ejs_context_elemt[9] = 'Profil|document.location.href=\'http://lecafedemarseille.xooit.fr/profile.php?mode=editprofile\'';
ejs_context_elemt[10] = '';
ejs_context_elemt[11] = 'Administration|document.location.href=\'http://lecafedemarseille.xooit.com/admin/index.php\'';
ejs_context_elemt[12] = 'Support|document.location.href=\'http://xooit.xooit.com\'';
ejs_context_elemt[13] = 'PhpBB.com|document.location.href=\'http://phpbb.com\'';
function ejs_context_position(e)
 {
 ejs_context_x = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft;
 ejs_context_y = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop;
 }

function ejs_context_open()
 {
 document.getElementById("ejs_context_box").style.top = ejs_context_y;
 document.getElementById("ejs_context_box").style.left = ejs_context_x;
 document.getElementById("ejs_context_ombre").style.top = ejs_context_y+2;
 document.getElementById("ejs_context_ombre").style.left = ejs_context_x+2;
 document.getElementById("ejs_context_box").style.visibility = "visible";
 document.getElementById("ejs_context_ombre").style.visibility = "visible";
 return(false);
 }

function ejs_context_close()
 {
 if (document.getElementById)
  {
  document.getElementById("ejs_context_box").style.top = 0;
  document.getElementById("ejs_context_box").style.left = 0;
  document.getElementById("ejs_context_ombre").style.top = 0;
  document.getElementById("ejs_context_ombre").style.left = 0;
  document.getElementById("ejs_context_box").style.visibility = "hidden";
  document.getElementById("ejs_context_ombre").style.visibility = "hidden";
  }
 }

function ejs_context_hl(mode, element)
 {
 if(mode == 1)
  {
  element.style.background = '#316AC5';
  element.style.color = '#ffffff';
  }
 else
  {
  element.style.background ='#ffffff';
  element.style.color = '#000000';
  }
 }

if(navigator.appName.substring(0,3) == "Net")
 document.captureEvents(Event.MOUSEMOVE);
</script>
<!-- FIN DU SCRIPT -->
<!-- DEBUT DU SCRIPT -->
<div id=ejs_context_box style="z-index:500;position:absolute;width:200px; border:1px solid #9D9DA1; background-color:#ffffff; font-family:Microsoft sans serif; font-size:12px; cursor:default; visibility:hidden;padding:3">
<script language="JavaScript">
/*
SCRIPT EDITE SUR L'EDITEUR JAVASCRIPT
http://www.editeurjavascript.com
*/
ejs_context_ombre_txt = '';
for(a=0;a<ejs_context_elemt.length;a++)
 {
 if(ejs_context_elemt[a].indexOf("|") > 0)
  {
  splited = new Array;
  splited = ejs_context_elemt[a].split("|");
  document.write('<div class="ejs_context_menuitems" onClick="'+splited[1]+'" onMouseOver="ejs_context_hl(1, this)" onMouseOut="ejs_context_hl(0, this)">'+splited[0]+'</div>');
  ejs_context_ombre_txt += '<div class="ejs_context_menuitems">'+splited[0]+'</div>';
  }
 else
  {
  document.write('<div class="ejs_context_menuitems" onClick="'+splited[1]+'" onMouseOver="ejs_context_hl(1, this)" onMouseOut="ejs_context_hl(0, this)"><hr width="195" size="1" color="9D9DA1" /></div>');
  ejs_context_ombre_txt += '<div class="ejs_context_menuitems"><hr width="195" size="1" color="9D9DA1" /></div>';
  }
 }
document.write('</div><div id=ejs_context_ombre style="z-index:400;position:absolute;width:200px; border:1px solid #9D9DA1; background-color:#9D9DA1; font-family:Microsoft sans serif; font-size:12px; color:#9D9DA1 ;cursor:default; visibility:hidden;padding:3">'+ejs_context_ombre_txt+'</div>');

// EVENEMENTS
document.onmousemove = ejs_context_position;
document.oncontextmenu = ejs_context_open;
document.onclick = ejs_context_close;
</script>
<!-- FIN DU SCRIPT -->
 


Rien ne s'affiche :/
Author Message
themalin
Membre


Offline
Membre

Joined: 19 Apr 2006
Posts: 8,897
Point(s): 9,101
Moyenne: 1.02
Mac Firefox (ou l'un de ses dérivés : Minefield/Pale Moon/...)

PostPosted: Sun 6 Apr 2008 - 19:42    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

si c'est sur le forum de ton profil tu as déjà plusieurs script

le fait d'avoir plusieurs script peut empecher le fonctionnement de certain
_______________________


Forum
Author Message
Myminicity


Offline
Guest




PostPosted: Thu 24 Apr 2008 - 11:42    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

à la place que ce soit écrit en anglais, on peut pas mettre un français?

Author Message
themalin
Membre


Offline
Membre

Joined: 19 Apr 2006
Posts: 8,897
Point(s): 9,101
Moyenne: 1.02
Mac Firefox (ou l'un de ses dérivés : Minefield/Pale Moon/...)

PostPosted: Thu 24 Apr 2008 - 12:20    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

que veux tu changer en français quel partie du texte
_______________________


Forum
Author Message
Myminicity


Offline
Guest




PostPosted: Thu 24 Apr 2008 - 12:30    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

Mettre "hour" en "heure, "day" en "jour".

Mettre "march" en "mars".

J'ai changé 2009 et j'ai mis 2008 mais ça me laisse toujours 2009.


Author Message
Myminicity


Offline
Guest




PostPosted: Thu 1 May 2008 - 22:27    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

J'ai mis mon compte à rebours dans overall_header.tpl et il ne s'affiche pas en haut de toutes les pages.

Si un Modérateur ou un Administrateur pourrait voir, ça serait sympas.


Author Message
themalin
Membre


Offline
Membre

Joined: 19 Apr 2006
Posts: 8,897
Point(s): 9,101
Moyenne: 1.02
Mac Firefox (ou l'un de ses dérivés : Minefield/Pale Moon/...)

PostPosted: Fri 2 May 2008 - 11:17    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

bonjour

si tu l'as mis dans ton header il est bien en haut de toute les pages
_______________________


Forum
Author Message
romainh6


Offline
Guest




PostPosted: Tue 23 Dec 2008 - 14:41    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

bonjour,

alors moi je l'ai inséré dans le overall_footer.tpl mais j'arrive pas à le voir

voici le code tel que je l'ai mis dans la template :

Quote:

<span class="copyright">
{ADMIN_LINK}

Powered by phpBB &copy; 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.{TRANSLATION_INFO}</span>



<html>
<body>

<style style="text/css">

.lcdstyle{ /*Example CSS to create LCD countdown look*/
background-color:black;
color:yellow;
font: bold 18px MS Sans Serif;
padding: 3px;
}

.lcdstyle sup{ /*Example CSS to create LCD countdown look*/
font-size: 80%
}

</style>

<script type="text/javascript">

/***********************************************
* Dynamic Countdown script- © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function cdtime(container, targetdate){
if (!document.getElementById || !document.getElementById(container)) return
this.container=document.getElementById(container)
this.currentTime=new Date()
this.targetdate=new Date(targetdate)
this.timesup=false
this.updateTime()
}

cdtime.prototype.updateTime=function(){
var thisobj=this
this.currentTime.setSeconds(this.currentTime.getSeconds()+1)
setTimeout(function(){thisobj.updateTime()}, 1000) //update time every second
}

cdtime.prototype.displaycountdown=function(baseunit, functionref){
this.baseunit=baseunit
this.formatresults=functionref
this.showresults()
}

cdtime.prototype.showresults=function(){
var thisobj=this


var timediff=(this.targetdate-this.currentTime)/1000 //difference btw target date and current date, in seconds
if (timediff<0){ //if time is up
this.timesup=true
this.container.innerHTML=this.formatresults()
return
}
var oneMinute=60 //minute unit in seconds
var oneHour=60*60 //hour unit in seconds
var oneDay=60*60*24 //day unit in seconds
var dayfield=Math.floor(timediff/oneDay)
var hourfield=Math.floor((timediff-dayfield*oneDay)/oneHour)
var minutefield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour)/oneMinute)
var secondfield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour-minutefield*oneMinute))
if (this.baseunit=="hours"){ //if base unit is hours, set "hourfield" to be topmost level
hourfield=dayfield*24+hourfield
dayfield="n/a"
}
else if (this.baseunit=="minutes"){ //if base unit is minutes, set "minutefield" to be topmost level
minutefield=dayfield*24*60+hourfield*60+minutefield
dayfield=hourfield="n/a"
}
else if (this.baseunit=="seconds"){ //if base unit is seconds, set "secondfield" to be topmost level
var secondfield=timediff
dayfield=hourfield=minutefield="n/a"
}
this.container.innerHTML=this.formatresults(dayfield, hourfield, minutefield, secondfield)
setTimeout(function(){thisobj.showresults()}, 1000) //update results every second
}

/////CUSTOM FORMAT OUTPUT FUNCTIONS BELOW//////////////////////////////

//Create your own custom format function to pass into cdtime.displaycountdown()
//Use arguments[0] to access "Days" left
//Use arguments[1] to access "Hours" left
//Use arguments[2] to access "Minutes" left
//Use arguments[3] to access "Seconds" left

//The values of these arguments may change depending on the "baseunit" parameter of cdtime.displaycountdown()
//For example, if "baseunit" is set to "hours", arguments[0] becomes meaningless and contains "n/a"
//For example, if "baseunit" is set to "minutes", arguments[0] and arguments[1] become meaningless etc


function formatresults(){
if (this.timesup==false){//if target date/time not yet met
var displaystring=arguments[0]+" jours "+arguments[1]+" heures "+arguments[2]+" minutes "+arguments[3]+"secondes left until May 21, 2009 00:00:00"}

else{ //else if target date/time met
var displaystring="Départ de la Balade du Morvan !!!"}
return displaystring}

function formatresults2(){
if (this.timesup==false){ //if target date/time not yet met
var displaystring="<span class='lcdstyle'>"+arguments[0]+" <sup>days</sup> "+arguments[1]+" <sup>hours</sup> "+arguments[2]+" <sup>minutes</sup> "+arguments[3]+" <sup>seconds</sup></span> left until this Christmas"}

else{ //else if target date/time met
var displaystring="" //Don't display any text
alert("Christmas is here!") //Instead, perform a custom alert}
return displaystring}

</script>

<script type="text/javascript">

var futuredate=new cdtime("countdowncontainer", "March 23, 2009 18:25:00")
futuredate.displaycountdown("days", formatresults)

</script>

</body>
</html>



j'ai fait quelques recherches, essayez plusieurs fois et rien n'y fait

je précise que je n'ai pas d'autres scripts sur le forum


Author Message
themalin
Membre


Offline
Membre

Joined: 19 Apr 2006
Posts: 8,897
Point(s): 9,101
Moyenne: 1.02
Mac Firefox (ou l'un de ses dérivés : Minefield/Pale Moon/...)

PostPosted: Tue 23 Dec 2008 - 14:46    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

bonjour

je ne sais pas si le code que tu as mis fonctionne encore
_______________________


Forum
Author Message
romainh6


Offline
Guest




PostPosted: Tue 23 Dec 2008 - 15:34    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

ok ceci expliquerait celà Crying or Very sad

Author Message
Mars.
Membre


Offline
Membre

Joined: 20 Jun 2008
Posts: 4
Point(s): 4
Moyenne: 1.00
Windows Vista ou 7 Internet Explorer Masculin Scorpion (23oct-21nov) 龍 Dragon

PostPosted: Sun 29 Mar 2009 - 09:01    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

Bonjour. J'ai voulu l'installer, j'ai bien mis le code avec le spoiler au milieu puis modifié le texte en rouge par la date que je souhaite, mais il n'y'a rien qui s'affiche, absolument rien. J'ai éssayé dans overall header et footeur.

Forum
Author Message
themalin
Membre


Offline
Membre

Joined: 19 Apr 2006
Posts: 8,897
Point(s): 9,101
Moyenne: 1.02
Mac Firefox (ou l'un de ses dérivés : Minefield/Pale Moon/...)

PostPosted: Sun 29 Mar 2009 - 11:41    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

bonjour

tu as pensé aussi à ajouter ce code juste après


 
Code: Sélectionner - Agrandir
<script type="text/javascript">

var futuredate=new cdtime("countdowncontainer", "March 23, 2009 18:25:00")
futuredate.displaycountdown("days", formatresults)

</script> 

_______________________


Forum
Author Message
Mars.
Membre


Offline
Membre

Joined: 20 Jun 2008
Posts: 4
Point(s): 4
Moyenne: 1.00
Windows Vista ou 7 Internet Explorer Masculin Scorpion (23oct-21nov) 龍 Dragon

PostPosted: Sun 29 Mar 2009 - 12:43    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

Oui et il n'y'a rien  undecided

Forum
Author Message
chris37
Membre


Offline
Membre

Joined: 24 Sep 2008
Posts: 69
Niveau:
Point(s): 77
Moyenne: 1.12
Windows Vista ou 7 Firefox (ou l'un de ses dérivés : Minefield/Pale Moon/...) Masculin Vierge (24aoû-22sep) 猪 Cochon

PostPosted: Sun 29 Mar 2009 - 14:02    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

bonjour

je te rassures, j'ai essayé ce matin ce tuto, et rien ne s'affichait non plus !! undecided
_______________________
Mon [Tuto] sur Xooit, ,Cliquez

Site CONTRE la réforme scolaire 2014
[/b]


Forum
Author Message
Master Fenix117


Offline
Guest




PostPosted: Sun 29 Mar 2009 - 15:40    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

Pareil pour moi en plus sa serai utile pour moi vu que mon forum et un forum "RPG" ...

Author Message
themalin
Membre


Offline
Membre

Joined: 19 Apr 2006
Posts: 8,897
Point(s): 9,101
Moyenne: 1.02
Mac Firefox (ou l'un de ses dérivés : Minefield/Pale Moon/...)

PostPosted: Sun 29 Mar 2009 - 18:47    Post subject: [TUTO]Compte à rebours pour vos forums Reply with quote

sinon essayer avec un autre code pris ici

http://www.editeurjavascript.com/
_______________________


Forum
Author Message
Contenu Sponsorisé





PostPosted: Today at 02:11    Post subject: [TUTO]Compte à rebours pour vos forums

Display posts from previous:   
Reply to topic Page 4 of 7 Goto page: <  1, 2, 3, 4, 5, 6, 7  >




Portal | Index | Administration Panel | Create a forum | Free support forum | Free forums directory | Report a violation | Conditions générales d'utilisation
Propulsé par p h p B B © 2016 p h p B B Group |
 
© 2003-2013 Xooit.com - Contact - Mentions légales - CGU - Charte - CNIL : 1381401