The Official Star Trek Movie Forum

The Official Star Trek Movie Forum > Star Trek > Comments & Suggestions > The time now is...
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 06-13-2008, 05:42 AM
Quark's Avatar
Quark Quark is offline
Rear Admiral
 
Join Date: Jan 2008
Location: Santa Monica, California
Posts: 2,653
Default The time now is...

This is just a little something that has been on my mind. You know the clock at the bottom of the page? Would it be possible to have the time updated without having to refresh the page?
__________________
*The word "dabo" means "I will give" in Latin, and "Gold" in Aramaic.

J.J. "Binks" Abrams is taking over sci-fi!
Fans Expendable
Reply With Quote
  #2  
Old 06-13-2008, 05:50 AM
Zardoz's Avatar
Zardoz Zardoz is offline
Federation Councillor
 
Join Date: Feb 2008
Location: Somewhere In The Future
Posts: 31,432
Default

Great suggestion!!
__________________
"High Priestesses Of Zardoz" By Eliza's Starbase Of Avatars Copyright 2009."
"Zardoz Speaks To You, His Choosen Trek Fans."
Reply With Quote
  #3  
Old 06-13-2008, 06:40 AM
Jed Starkiller's Avatar
Jed Starkiller Jed Starkiller is offline
Admiral
 
Join Date: May 2008
Location: Missouri
Posts: 4,515
Default

It seems to me that it should be possible with small java script... Programming my weak spot though.
__________________
"VOTE ZARDOZ/MENHEIM IN 2012"
Vice Floating God Head
Patron of Eliza's Avatar Lab
Founding member of The League of Extraordinary Oddballs
A new tech support site http://www.community.jvgeek.com
Reply With Quote
  #4  
Old 06-13-2008, 07:03 AM
Zardoz's Avatar
Zardoz Zardoz is offline
Federation Councillor
 
Join Date: Feb 2008
Location: Somewhere In The Future
Posts: 31,432
Default

Quote:
Originally Posted by Jed Starkiller View Post
It seems to me that it should be possible with small java script... Programming my weak spot though.
Same here.
__________________
"High Priestesses Of Zardoz" By Eliza's Starbase Of Avatars Copyright 2009."
"Zardoz Speaks To You, His Choosen Trek Fans."
Reply With Quote
  #5  
Old 06-13-2008, 09:11 AM
Chris Fawkes's Avatar
Chris Fawkes Chris Fawkes is offline
Captain
 
Join Date: Jan 2008
Location: Australia
Posts: 1,729
Default

Quote:
Originally Posted by Jed Starkiller View Post
It seems to me that it should be possible with small java script... Programming my weak spot though.
What is your specialty.

Hey do you build sites?
Reply With Quote
  #6  
Old 06-13-2008, 10:39 AM
Jed Starkiller's Avatar
Jed Starkiller Jed Starkiller is offline
Admiral
 
Join Date: May 2008
Location: Missouri
Posts: 4,515
Default

Chris I have done some before. Why whats up?
__________________
"VOTE ZARDOZ/MENHEIM IN 2012"
Vice Floating God Head
Patron of Eliza's Avatar Lab
Founding member of The League of Extraordinary Oddballs
A new tech support site http://www.community.jvgeek.com
Reply With Quote
  #7  
Old 06-13-2008, 11:23 AM
Deusdies Deusdies is offline
Ensign
 
Join Date: Apr 2008
Posts: 41
Default

Here are some:

Code:
<script type="text/javascript">
<!--

function updateClock ( )
{
  var currentTime = new Date ( );

  var currentHours = currentTime.getHours ( );
  var currentMinutes = currentTime.getMinutes ( );
  var currentSeconds = currentTime.getSeconds ( );

  // Pad the minutes and seconds with leading zeros, if required
  currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
  currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;

  // Choose either "AM" or "PM" as appropriate
  var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";

  // Convert the hours component to 12-hour format if needed
  currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;

  // Convert an hours component of "0" to "12"
  currentHours = ( currentHours == 0 ) ? 12 : currentHours;

  // Compose the string for display
  var currentTimeString = currentHours + ":" + currentMinutes + ":" + currentSeconds + " " + timeOfDay;

  // Update the time display
  document.getElementById("clock").firstChild.nodeValue = currentTimeString;
}

// -->
</script>
You will have to edit footer in your vBulletin template. Styles > Edit Template > Footer.

Now this is also necessary:

Code:
<body onload="updateClock(); setInterval('updateClock()', 1000 )">
Add this in header template. Beware not to rewrite whole <body> tag; there might be something put by vBulletin.

Of course, you will have to add custom CSS classes to clock JavaScript. You don't want it to be plain xD
__________________
I'm sorry, but English is not my primary language
Reply With Quote
  #8  
Old 06-13-2008, 11:27 AM
Jed Starkiller's Avatar
Jed Starkiller Jed Starkiller is offline
Admiral
 
Join Date: May 2008
Location: Missouri
Posts: 4,515
Default

See I knew it was easy!
__________________
"VOTE ZARDOZ/MENHEIM IN 2012"
Vice Floating God Head
Patron of Eliza's Avatar Lab
Founding member of The League of Extraordinary Oddballs
A new tech support site http://www.community.jvgeek.com
Reply With Quote
  #9  
Old 06-13-2008, 11:47 AM
Zardoz's Avatar
Zardoz Zardoz is offline
Federation Councillor
 
Join Date: Feb 2008
Location: Somewhere In The Future
Posts: 31,432
Default

Quote:
Originally Posted by Jed Starkiller View Post
See I knew it was easy!
Easy as nuclear fission!
__________________
"High Priestesses Of Zardoz" By Eliza's Starbase Of Avatars Copyright 2009."
"Zardoz Speaks To You, His Choosen Trek Fans."
Reply With Quote
  #10  
Old 06-13-2008, 12:50 PM
Jed Starkiller's Avatar
Jed Starkiller Jed Starkiller is offline
Admiral
 
Join Date: May 2008
Location: Missouri
Posts: 4,515
Default

A bit harder than Astrophysic's with a minor in worm hole theory.
__________________
"VOTE ZARDOZ/MENHEIM IN 2012"
Vice Floating God Head
Patron of Eliza's Avatar Lab
Founding member of The League of Extraordinary Oddballs
A new tech support site http://www.community.jvgeek.com
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:32 PM.


Forum theme courtesy of Mark Lambert
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright © 2009 by Paramount Pictures. STAR TREK and all related
marks and logos are trademarks of CBS Studios Inc. All Rights Reserved.