Post by (¯`•DregondRahl•._) on Oct 20, 2006 6:04:03 GMT -8
does what it says, adds a count down in your sig
GLOBAL FOOTER [NEAR TOP]
<script type="text/javascript">
<!--
//CountDown in Sig - DregondRahl
//donot edit this copyright or repost this code
function countDown( date, rndNum, countEnd) {
getDate = new Date();
getCount = new Date( date );
days = (getCount - getDate) / 1000 / 60 / 60 / 24;
countDays = Math.floor(days);
hours = (getCount - getDate) / 1000 / 60 / 60 - (24 * countDays);
countHours = Math.floor(hours);
minutes = (getCount - getDate) / 1000 /60 - (24 * 60 * countDays) - (60 * countHours);
countMins = Math.floor(minutes);
seconds = (getCount - getDate) / 1000 - (24 * 60 * 60 * countDays) - (60 * 60 * countHours) - (60 * countMins);
countSec = Math.round(seconds);
if((days<0)|(hours<0)|(minutes<0)|(seconds<0)){
countInfo = countEnd;
} else {
secs=(countSec==1)? " second.":" seconds.";
mins=(countMins==1)? " minute, ":" minutes, ";
hrs =(countHours==1)? " hour, ": " hours, ";
days =(countDays==1)? " day, ":" days, ";
countInfo = countDays + days + countHours + hrs + countMins + mins + countSec + secs;
}
eval("document.forms.form" + rndNum + ".cdown.value = countInfo;");
countStart = 'countDown("'+date+'","'+rndNum+'","'+countEnd+'");';
window.setTimeout(countStart, 1000);
}
var font = document.getElementsByTagName("font");
countReg = /\[countdown=(.+?)\](.+?)\[\/countdown\]/gi
for(i=0;i<font.length;i++){
var f = font.innerHTML;
if(f.match(countReg) && !location.href.match(/(headers|modify)/)){
var rndNum = Math.floor(Math.random() * 10000);
font.innerHTML = f.replace(countReg,"<form name='form"+rndNum+"'><input class='countbg' type=text value='' size=45 align ='center' name='cdown' ></form>");
countDown(RegExp.$1, rndNum, RegExp.$2 );
}
}
//-->
</script>
you have to just add something like this in your signature area
[countdown=Sept 20 2006 16:12:00]Event Over[/countdown]
red part is the date and specifc time
purple part is the message to say when the event is over.
it can be anything.
i also gave it a classname 'countbg' you can use any CSS to get the colors you want.
GLOBAL FOOTER [NEAR TOP]
<script type="text/javascript">
<!--
//CountDown in Sig - DregondRahl
//donot edit this copyright or repost this code
function countDown( date, rndNum, countEnd) {
getDate = new Date();
getCount = new Date( date );
days = (getCount - getDate) / 1000 / 60 / 60 / 24;
countDays = Math.floor(days);
hours = (getCount - getDate) / 1000 / 60 / 60 - (24 * countDays);
countHours = Math.floor(hours);
minutes = (getCount - getDate) / 1000 /60 - (24 * 60 * countDays) - (60 * countHours);
countMins = Math.floor(minutes);
seconds = (getCount - getDate) / 1000 - (24 * 60 * 60 * countDays) - (60 * 60 * countHours) - (60 * countMins);
countSec = Math.round(seconds);
if((days<0)|(hours<0)|(minutes<0)|(seconds<0)){
countInfo = countEnd;
} else {
secs=(countSec==1)? " second.":" seconds.";
mins=(countMins==1)? " minute, ":" minutes, ";
hrs =(countHours==1)? " hour, ": " hours, ";
days =(countDays==1)? " day, ":" days, ";
countInfo = countDays + days + countHours + hrs + countMins + mins + countSec + secs;
}
eval("document.forms.form" + rndNum + ".cdown.value = countInfo;");
countStart = 'countDown("'+date+'","'+rndNum+'","'+countEnd+'");';
window.setTimeout(countStart, 1000);
}
var font = document.getElementsByTagName("font");
countReg = /\[countdown=(.+?)\](.+?)\[\/countdown\]/gi
for(i=0;i<font.length;i++){
var f = font.innerHTML;
if(f.match(countReg) && !location.href.match(/(headers|modify)/)){
var rndNum = Math.floor(Math.random() * 10000);
font.innerHTML = f.replace(countReg,"<form name='form"+rndNum+"'><input class='countbg' type=text value='' size=45 align ='center' name='cdown' ></form>");
countDown(RegExp.$1, rndNum, RegExp.$2 );
}
}
//-->
</script>
you have to just add something like this in your signature area
[countdown=Sept 20 2006 16:12:00]Event Over[/countdown]
red part is the date and specifc time
purple part is the message to say when the event is over.
it can be anything.
i also gave it a classname 'countbg' you can use any CSS to get the colors you want.