![]() |
Realtime digital clock in Navbar
1 Attachment(s)
Get rid of the empty space after your tabs in the navbar.
Becouse there are only a few buttons on the navbar and a searchbox, i thought is would be a nice idea to put there a realtime clock, so i tweaked a few googled codes, and build my own. Live demo at: http://www.papegaaienforum.nl Installation: vB 4.X.X Open the navbar template Find Code:
{vb:raw template_hook.navtab_end} Installation: vB 4.2.0 Open the navbar template. Find Code:
{vb:raw navigation} In RED color: The name of the months, you can translate them yourself. In BLUE color: The layout of your date. DD-Month-YYYY. Switch the variables to get an other format. Clock code: Code:
<li> |
Reserved
|
Hi mate,
I have been looking for something like this. Does it have to reside in the Navbar? My newspaper would be served better if I can apply it to the Notifications bar. Cheers, great work |
I suppose you can place it everywhere you want.
But i have'nt been testing that. |
1 Attachment(s)
Love the clock...Installed it and used my own colors...Looks great...Is there a way to use a 12 hour format instead of 24 hour format?
And just one more thing....I am attaching a screenshot of the navbar...is there any way to lower the clock to be even with the rest of the menu's? Thanks for this F |
Solved the time change...from 24 hours to 12 hours,,,Now, just to get it even with the rest of the nav menus,,
If you can help with that, that would be great! F |
Quote:
The first 1 shoult be placed directly under: Code:
<BODY onLoad="KW_doClock()"> The second should be placed directly under: Code:
Array("januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december") |
ok...The clock is working fine...I think I know why it won't go lower...But how do I get a "0" in front of the numbers?...09:05:01 looks like this 9:5:1 for the time...I want to put the "0" in front so it will look like this "09:05:01"....Any idea's?
Thanks in advance F |
Thanks for that other post...Worked perfectly!...
Clock is even with the rest of the navbar... Thank you F |
Looks like the clock is putting the "0"in front...I added "11, 11, 11, 11" instead of "0, 0, 0, 0" Hope it's not just doing it now because it's 11:05:34...
F |
Code:
var clock=new class_clock("Verdana, Arial, Helvetica, sans-serif","11 px","#000000","#000000","50",0,1,0,0,0) You should only use 0 or 1. Not 11. first one = 0 for noting, change it to 1 for showing AM/PM second = leading zero for seconds, if set to 0, no leading zero will be shownd from 0 to 9 seconds. third = leading zero for hours. This should ALWAYS be set to 0...... fourth and fifth = adjusting the hours + or - So if you want it to show 6:03:09 AM it should be set to: Code:
var clock=new class_clock("Verdana, Arial, Helvetica, sans-serif","11 px","#000000","#000000","50",1,1,0,0,0) |
1 Attachment(s)
Here's my/the code. Your code is in red
Code:
<div id="navbar" class="navbar"> What I am missing? Thank you. |
Quote:
That's easy to remove. At the end of the script you see: // End of clock script Just remove that and that part is solved. (The part why it places the comment text is not solved! Things after the double slash should not be shown in html) Second: you can change the color to white like the rest of your navbar text. Find: Code:
<font color="#000000" size="3" face="Verdana"> Note: you have to change the date as well as the clock. Third: to align the time and date with the rest of the text in the navbar, you can find that solution in post 7. This is depending of the style you use, and not an error in the script. |
Quote:
|
I suppose the "media" link is an other mod?
The "media" link is not in your navbar template. If you can find where the link is placed in the templates, you could try to put the clock script behind that. I can't help you with that, i don't know what mod it is and how it works. |
Okay, so if I wanted this format: n/j/Y, g:i A (2/4/2013, 12:58 AM)
...what would I do to the code? |
try below code if your interested
Code:
<body onLoad="goforit()"> |
Quote:
My script needs to be completely turned around if you want to use it. |
Quote:
|
thx for sharing but to be honest to many changes for a digiclock ... me personaly i peref the one on footer no codes nothing to change :)
|
All times are GMT. The time now is 07:44 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|