Back to vBulletin Tips & Tricks

Countdown Timer
by nalexandre 17 May 2009
Rating: (1 vote - 4.00 average)

Info:

This is a little mod i made, because i was looking for a similar mod, but did not find anything, so i made this one. Hope someone use it!!

What does it do?

It put´s a countdown timer on the head of your forum.

Features:

Easy to use/install.

Installation:


My choice was at the top, but change it as you like.

Go to AdminCP>Styles & Templates>Header>Find "<!-- nav buttons bar -->" , right before paste this:

HTML Code:
<script LANGUAGE="JavaScript">
<!--
// by CMBP 
var now = new Date();
var event = new Date("[COLOR="Red"]Dec 31 2009 12:00:00[/COLOR]");
var seconds = (event - now) / 1000;
var minutes = seconds / 60;
var hours = minutes / 60;
var days = hours / 24;
ID=window.setTimeout("update();", 1000);
function update() {
now = new Date();
seconds = (event - now) / 1000;
seconds = Math.round(seconds);
minutes = seconds / 60;
minutes = Math.round(minutes);
hours = minutes / 60;
hours = Math.round(hours);
days = hours / 24;
days = Math.round(days);
document.form1.days.value = days;
document.form1.hours.value = hours;
document.form1.minutes.value = minutes;
document.form1.seconds.value = seconds;
ID=window.setTimeout("update();",1000);
}
// -->
</script>
<p><font face="Arial" size="3">Countdown To [COLOR="Red"]December 31, 2009, at 12:00[/COLOR]: </font></p>
<form name="form1"><p><font face="Arial" size="2">Days <input type="text" name="days" value="0" size="3"> Hours 
<input type="text" name="hours" value="0" size="4"> Minutes <input type="text" name="minutes" value="0"
size="7"> Seconds <input type="text" name="seconds" value="0" size="7"> </font> </p>
</form>
Redifine the target time to countdown as you wish " in red"

Screenshots:

See the example in attach.

Thank you.
Attached Images
File Type: bmp CT.bmp (140.1 KB, 332 views)

vblts.ru supports vBulletin®, 2022-2024