Real time clock on threads - 11/01/2002 2:43 AM
Hi all,
A friend of mine that is a java guru managed to knock something for my threads so here it is for those who want to use it.
This hack displays the current server time on the top navigation bar - before the Admin link
Open ubbt_registerednav.tmlp
Find this:
and add BELOW it:
Voila!
You can repeat the same with the ubbt_unregisterednav.tmpl.
Warm regards
Nikos
A friend of mine that is a java guru managed to knock something for my threads so here it is for those who want to use it.
This hack displays the current server time on the top navigation bar - before the Admin link
Open ubbt_registerednav.tmlp
Find this:
code:
<? //UBBTREMARK
echo <<<UBBTPRINT
<table width="{$theme['tablewidth']}" align="center" class="tablesurround" cellpadding="1" cellspacing="1">
<tr>
<td>
<table width="100%" class="tableborders" cellpadding="{$theme['cellpadding']}" cellspacing="{$theme['cellspacing']}">
<tr>
<td align="center" class="menubar">
and add BELOW it:
code:
<script language="JavaScript">
if (document.all||document.getElementById)
document.write('<span id="ClockSpan"></span>')
function ThreadsClock()
{
Now = new Date();
Seconds = Now.getSeconds();
Minutes = Now.getMinutes();
Hours = Now.getHours()
if (Hours < 0) Hours+=24;
if (Hours > 23) Hours-=24;
var FinalTime = ((Hours < 10)?"0"+Hours:Hours) + ':' + ((Minutes < 10)?"0"+Minutes:Minutes) + ':' + ((Seconds < 10)?"0"+Seconds:Seconds);
if (document.all)
ClockSpan.innerHTML = 'Server Time: ' + FinalTime + ' | '
else if (document.getElementById)
document.getElementById("ClockSpan").innerHTML = 'Server Time: ' + FinalTime + ' | '
else if (document.layers)
{
document.ClockNetscape.document.ClockNetscape2.document.write('Server Time: ' + FinalTime + ' | ')
document.ClockNetscape.document.ClockNetscape2.document.close()
}
setTimeout('ThreadsClock()',1000);
}
window.onload=ThreadsClock
//-->
</script>
<ilayer id="ClockNetscape" width=100% height=35><layer id="ClockNetscape2" width=100% height=35 left=0 top=0"></layer></ilayer>
Voila!
You can repeat the same with the ubbt_unregisterednav.tmpl.
Warm regards
Nikos