vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Clock and Date in Navbar (https://vborg.vbsupport.ru/showthread.php?t=118253)

[email protected] vbmenu_register("postmenu_1093582", true); 10-10-2006 01:13 AM

At 12:01 PM the clock always shows 12:01 AM. Once it reaches 1:00 PM it goes back to the correct time.

Take a look. Maybe a bug in the code. At 12:01 PM it should read 12:01 PM not AM.

COBRAws 10-10-2006 01:23 AM

Can be this hack converted into a plugin?

Thanks

hotwheels 10-11-2006 11:55 PM

Not really needed COBRAws.........It's just a template mod, instead of a .php or query's..

LordDB 10-12-2006 09:36 AM

Quote:

Originally Posted by Aclikyano
Code:

<script type="text/javascript">
function refrClock()
{
var d=new Date();
var s=d.getSeconds();
var m=d.getMinutes();
var h=d.getHours();
var day=d.getDay();
var date=d.getDate();
var month=d.getMonth();
var year=d.getFullYear();
var days=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var months=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var am_pm;
if (s<10) {s="0" + s}
if (m<10) {m="0" + m}
if (h<10) {h="0" + h}
if (h>12) {h-=12;am_pm = "P.M."}
else {am_pm = "A.M."}
document.getElementById("clock").innerHTML=days[day] + " | " + months[month] + "    " + date  + ", " + year + " | " + h + ":" + m + ":" + s + " " + am_pm;
setTimeout("refrClock()",1000);
}
refrClock();
</script>

I rewrote this clock code from another coder...........
This is the more neater version :)

TRY IT FOR YA SELF.

Cheers, Aclikyano, :D for sharing this great revised code...this is what it looks like:

Thursday | October 12, 2006 | 6:33:51 P.M.

Thanks also to, Superfly, for sharing, too!

Br.:cool:

G_Man 10-21-2006 09:20 PM

Took Hotwheels code and tweaked it to fit my site a bit better...

Thanks for the great idea and thanks to hotwheels for his input.

*clicks install* :)

sunnycher 10-26-2006 12:40 AM

Love it!

gamerzindo 11-14-2006 10:06 AM

installed thanks

hepatit-b 11-14-2006 12:33 PM

thanks

johnrizz 11-14-2006 08:17 PM

Pretty cool... ;:=- Thanks

Kadi 11-15-2006 08:01 AM

Hi,

This is great mod. I'd like to add it but I need to translate the days and am/pm. I tried using $vbphrase['varname'] but that messed things up.

What do I do?

Thanks


All times are GMT. The time now is 11:01 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
  • Page Generation 0.03028 seconds
  • Memory Usage 1,734KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete