Log in

View Full Version : Integration with vBulletin - Live Clock & Date in Navbar


Magnumutz
01-20-2009, 10:00 PM
Please mark as "Installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=202538)" if you use this modification, thanks !

Okay, here's a little something i did for my forum, cuz i just wanted a place where to look for the right time.

See the attached screenshot for a demo.

Install instructions:

Edit the navbar template under Navigation / Breadcrumb Templates and search for:

<if condition="$show['pmwarning']"><div><strong><phrase 1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></div></if>
</div>
Right under that, add:
<div class="smallfont">
<script type="text/javascript" language="javascript" src="clientscript/date_clock.js"></script>
<script type="text/javascript" language="javascript">dT();</script>
</div>
In the same template search for:

<!-- / login form -->
Right under that, add:

<div class="smallfont" align="center">
<script type="text/javascript" language="javascript" src="clientscript/date_clock.js"></script>
<script type="text/javascript" language="javascript">dT();</script>
</div>
Upload date_clock.js to your clientscript folder.

That's it ;)

26th January: Added a 12 hour format package.
18th February: Updated Installation Instructions, fixed guest view alignment and moved the Bold version into the first post.

Please mark as "Installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=202538)" if you use this modification, thanks !

Magnumutz
01-21-2009, 05:57 AM
Reserved for future use like updates or simply staring at the moon :p

anestetic
01-21-2009, 10:18 AM
thank you

Magnumutz
01-21-2009, 10:52 AM
Please mark as "Installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=202538)" if you use this modification, thanks !

Nightmare_Zero
01-21-2009, 10:26 PM
Thanks Installed

lellos
01-25-2009, 04:43 PM
Italians for users, I have edited the Java Script Date_clock fit for the Italian language and enclosed the only java file amended.

krimesis
01-25-2009, 04:56 PM
Italians for users, I have edited the Java Script Date_clock fit for the Italian language and enclosed the only java file amended.
Many thanks lello;)
:up:

csoroner
01-25-2009, 05:16 PM
Nice mod!

Just what I've been looking for!

Clicked installed!

Magnumutz
01-25-2009, 05:55 PM
Thanks lellos!

howcome
01-26-2009, 02:23 AM
hey is it possible we can make it 12 hour format not 24 hour?

Phaedrus
01-26-2009, 03:42 AM
Interesting. Seeking a version that isn't a 24 hour clock.

Magnumutz
01-26-2009, 05:27 AM
Done, enjoy :)

pollutioN
01-26-2009, 03:02 PM
Nice mod!

*I-n-s-t-a-l-l-e-d*

howcome
01-26-2009, 07:34 PM
thank you for updating the mod for 12 hour format :)

Magnumutz
01-26-2009, 08:10 PM
No problem, glad to be of help.

macc
01-29-2009, 09:13 PM
hello!

nice mod and thanks!

how to get clock and date bold ?

regards
macc

Magnumutz
01-30-2009, 08:49 AM
Okay... there you go.
It was all in the .js file.

macc
01-30-2009, 10:34 AM
Thanks !

reg

macc

Nelly
01-31-2009, 01:53 PM
Installed thanks. Is their a way to edit time zone? So users can pick?

Magnumutz
01-31-2009, 04:03 PM
No, it's set on the PC's clock.

djlotus
02-05-2009, 04:58 PM
Installed Thanks

Black Tiger
02-10-2009, 07:47 PM
Thanks, installed!:)

I've got some suggestions and questions.
Upload date_clock.js to your clientscript folder.
I would put that line also in the installation zipfiles.
Would be better to add the bold zipfiles next to the normal zip's, that way, if the post grows longer, users won't keep asking for the bold stuff.:)

No, it's set on the PC's clock.
Timezone maybe, but language and display is not. My forums say it's Tue 10th feb 2009.
My pc says it's "dinsdag 10 februari 2009" or "dinsdag 10 feb 2009".
Is there a way to maybe make it like a phrase so we can make a translation?
Is there a way to make it so that days are not shortened anymore but displayed in full? So not Tue but Tuesday?

DobieGillis?
02-10-2009, 08:27 PM
I installed it and it worked great except it left another occurance of the date and time on the top left of my forums. Any ideas?

Black Tiger
02-10-2009, 10:43 PM
Found a second thing, an alignment problem for users which are not logged in.
When logged in, the alignment is ok. When not logged in, alignment is not ok, the date/clock is displayed a bit too far to the left side.

DobieGillis?
02-11-2009, 12:15 AM
uninstalling..meh!

Magnumutz
02-18-2009, 05:18 PM
Found a second thing, an alignment problem for users which are not logged in.
When logged in, the alignment is ok. When not logged in, alignment is not ok, the date/clock is displayed a bit too far to the left side.
Fixed that, thanks for letting me know.
The .js file isn't phrased so the date is in English.
However, you could edit it and change the week days, and month names for your language.
I installed it and it worked great except it left another occurance of the date and time on the top left of my forums. Any ideas?
Could you please explain better? Or maybe post a screenshot so i can understand...

Black Tiger
02-18-2009, 06:12 PM
Thanks for the update!

What has been changed for fixing the alignment problem?

Magnumutz
02-19-2009, 03:19 PM
It has been centered :)

a marked man 70
02-20-2009, 10:32 AM
installed thanks

fragg
02-28-2009, 02:22 PM
Thanks

Frondy
02-28-2009, 08:22 PM
installed

thanks, work fine

enteha
03-04-2009, 09:46 AM
thanx alot, installed.

s0lidgr0und
04-07-2009, 06:04 PM
I hate to sound picky, but is there a way to rearrange the format of the date? Like instead of Tue 7th April 2009 12:00:00, could it be Tue Apr 7th 12:00:00?

Alexey?
04-07-2009, 07:04 PM
Working fine to me.
By the way i must not be in the navbar you can put it in the footer too or any other template you want

Devanand
04-17-2009, 05:34 AM
never mind

nomoreturn
04-17-2009, 08:25 AM
Great job Thanks Installed

Floris
04-17-2009, 09:26 AM
Reserved for future use like updates or simply staring at the moon :p

There's an idea for an addon ... a little moon icon or weather icon in the navbar for localazation.. wait, never mind.. i am going off topic. :)

BigDog56
04-19-2009, 05:23 PM
Works fine! Thank you!

tommyturnage
04-23-2009, 04:02 AM
Great Job On This

odln018
04-30-2009, 03:07 PM
Very nice. Installed

rangana1
04-30-2009, 05:35 PM
tha bro realy its good

dianna
04-30-2009, 05:58 PM
Sweet thanks! Installed

Eagle Eyes
05-07-2009, 05:11 AM
Is it possible so that everyone have the same time?

RichB318
05-08-2009, 02:40 PM
Great mod! Easy to install with your step by step instructions! Thanks

RichB318
05-08-2009, 02:42 PM
I hate to sound picky, but is there a way to rearrange the format of the date? Like instead of Tue 7th April 2009 12:00:00, could it be Tue Apr 7th 12:00:00?

Is this possible?? I would be intrested in doing that also. Thanks again!

scratchit
05-23-2009, 12:51 PM
looks very nice on my forum tyvm

neto614
05-26-2009, 03:27 AM
THX works great .............

shinng
05-26-2009, 08:02 AM
nice little addition. i'm assuming the clock/date changes automatically based on user settings? installed.

expeditionman
06-25-2009, 12:55 PM
Nice little feature, installed.

Hope you don't mind but I edited the .js file to change the way the date is displayed.
Find this section of the file:
.getDay()]+' '+tS().getDate()+dE(tS().getDate())+' '+mN[tS().getMonth()]+' '+y4(tS().getYear())+','+' '+tH(tS().getHours())+':'+lZ(tS().getMinutes())+': '+lZ(tS().getSeconds())+' '+aP(tS().getHours())";

Change it to this:
.getDay()]+' '+mN[tS().getMonth()]+' '+tS().getDate()+dE(tS().getDate())+' '+y4(tS().getYear())+'

It will now show up like this:

s-p0k
06-26-2009, 08:27 PM
TY "Installed"

Magnumutz
07-02-2009, 04:51 PM
Nice little feature, installed.

Hope you don't mind but I edited the .js file to change the way the date is displayed.
Find this section of the file:
.getDay()]+' '+tS().getDate()+dE(tS().getDate())+' '+mN[tS().getMonth()]+' '+y4(tS().getYear())+','+' '+tH(tS().getHours())+':'+lZ(tS().getMinutes())+': '+lZ(tS().getSeconds())+' '+aP(tS().getHours())";Change it to this:
.getDay()]+' '+mN[tS().getMonth()]+' '+tS().getDate()+dE(tS().getDate())+' '+y4(tS().getYear())+'It will now show up like this:
Well, europeans (me) like dates displayed like that :p

wAnBoA
07-04-2009, 05:37 AM
I have problem installing this with the Drop Down Menu i'm using.
https://vborg.vbsupport.ru/showthread.php?t=203521
Whenever i hover the menu, it will show me a blank page.

Froggy32701
09-18-2010, 05:36 AM
I need a mod like this that shows zulu time. So I guess it would need to pull the time from another source.

Erica1977
09-18-2010, 11:56 AM
Thanks for this Nice Mod.

gsmlover4u
11-17-2011, 02:37 PM
any update for vb4