Previous Thread
Next Thread
Print Thread
Rate Thread
#238126 02/25/2003 2:12 PM
Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
Mod Name / Version - Menubar Clock 1.0

Description - This modification shows the user's local time in the menu bar.

Working Under - UBB.Threads 6.2

Pre-requisites - none

Author - Lisa_P

Credits - dman for requesting

Files Altered - ubbt.inc.php, ubbt_registered.tmpl, ubbt_unregistered.tmpl

Database Altered - none

New Files - none

NOTE: Prints out a user's local date and time in the menu bar, prints out the server's local time for unregistered.

I personally don't care for the way it looks; I'd probably mess with it more to get it to look a little nicer if I wasn't supposed to be getting ready for school.
Attachments
70846-menubar_clock.txt (0 Bytes, 50 downloads)


[:"red"]Lisa[/]
Sponsored Links
JacquiL #238127 02/25/2003 2:16 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Thank you Lisa!

JacquiL #238128 02/25/2003 2:25 PM
Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
Here's a pic
Attachments
70854-menubar_clock.gif (0 Bytes, 25 downloads)


[:"red"]Lisa[/]
JacquiL #238129 02/25/2003 5:03 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
heheh, nice


- Allen wavey
- What Drives You?
Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Installed and working great. Thanks! Although, in the registered.tmpl I added the time after the "Mark All Read" option instead of after the $members_link.

Sponsored Links
JacquiL #238131 02/25/2003 11:43 PM
Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
For those who want a clock that updates itself, and shows the user's own computer time, but is in javascript and not php, try this:

In ubbt_registerednav.tmpl and ubbt_unregisterednav.tmpl, find this:

Code
<br />$members_link<br /> |<br /><a href = "$phpurl/markallread.php?Cat=$Cat" $target>{$ubbt_lang['MARKALL']}</a><br /></td><br /></tr><br />$tbclose<br />



and change it to this:

Code
<br />$members_link<br /> |<br /><a href = "$phpurl/markallread.php?Cat=$Cat" $target>{$ubbt_lang['MARKALL']}</a><br /><div id="Clock" class="menubar">&nbsp</div><br /><script><br />function tick() {<br />  var hours, minutes, seconds, ap;<br />  var intHours, intMinutes, intSeconds;<br />  var today;<br />  today = new Date();<br />  intHours = today.getHours();<br />  intMinutes = today.getMinutes();<br />  intSeconds = today.getSeconds();<br />  if (intHours == 0) {<br />     hours = "12:";<br />     ap = "A.M.";<br />  } else if (intHours < 12) { <br />     hours = intHours+":";<br />     ap = "A.M.";<br />  } else if (intHours == 12) {<br />     hours = "12:";<br />     ap = "P.M.";<br />  } else {<br />     intHours = intHours - 12<br />     hours = intHours + ":";<br />     ap = "P.M.";<br />  }<br />  if (intMinutes < 10) {<br />     minutes = "0"+intMinutes+":";<br />  } else {<br />     minutes = intMinutes+":";<br />  }<br />  if (intSeconds < 10) {<br />     seconds = "0"+intSeconds+" ";<br />  } else {<br />     seconds = intSeconds+" ";<br />  } <br />  timeString = hours+minutes+seconds+ap;<br />  Clock.innerHTML = timeString;<br />  window.setTimeout("tick();", 100);<br />}<br />window.onload = tick;<br /></script><br /></td><br /></tr><br />$tbclose<br />


that's it


[:"red"]Lisa[/]
JacquiL #238132 02/27/2003 7:33 AM
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Nice one - thanks.


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Gorlum #238133 03/02/2003 3:56 PM
Joined: Jan 2003
Posts: 141
Journeyman
Journeyman
Offline
Joined: Jan 2003
Posts: 141
Ok Lisa, it really works great. I have one question though. Do you know why it would work perfect on every screen except the Main Index screen? You can tell there's something supposed to be there but it's not, but it looks great everywhere else.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)