Bonjour à tous
Voici un script pour mettre un compte a rebours sur votre forum. (il en existe d'autres)
Pour Xenforo
J'ai placé le code dans le template PAGE_CONTAINER après
source:blackmania
Voici un script pour mettre un compte a rebours sur votre forum. (il en existe d'autres)
Code:
<label id="Compte"></label>
<script type="text/JavaScript">
var Affiche=document.getElementById("Compte");
function Rebour() {
var date1 = new Date();
var date2 = new Date ("Jan 1 00:00:00 2015"); /*Date a modifier ici*/
var sec = (date2 - date1) / 1000;
var n = 24 * 3600;
if (sec > 0) {
j = Math.floor (sec / n);
h = Math.floor ((sec - (j * n)) / 3600);
mn = Math.floor ((sec - ((j * n + h * 3600))) / 60);
sec = Math.floor (sec - ((j * n + h * 3600 + mn * 60)));
Affiche.innerHTML = "Temps restant avant le 01/01/2015: " + j +" j "+ h +" h "+ mn +" min "+ sec + " s ";
window.status = "Temps restant avant: " + j +" j "+ h +" h "+ mn +" min "+ sec + " s ";
}
tRebour=setTimeout ("Rebour();", 1000);
}
Rebour();
</script>
Pour Xenforo
J'ai placé le code dans le template PAGE_CONTAINER après
Code:
Code:
<xen:hook name="page_container_content_title_bar">
<xen:if is="!{$noH1}">
source:blackmania