Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Clock and Date in Navbar Details »»
Clock and Date in Navbar
Version: 1.25, by SuperFly SuperFly is offline
Developer Last Online: Apr 2008 Show Printable Version Email this Page

Version: 3.6.0 Rating:
Released: 06-09-2006 Last Update: Never Installs: 216
 
No support by the author.

In Navbar template

Find
Code:
<if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></if>
add after
Code:
<!-- clock hack-->
<div id="clock">Loading...</div>
<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("Sun","Mon","Tue","Wed","Thurs","Fri","Sat");
var months=new Array("1","2","3","4","5","6","7","8","9","10","11","12");
var am_pm;
if (s<10) {s="0" + s}
if (m<10) {m="0" + m}
if (h>12) {h-=12;am_pm = "pm"}
else {am_pm="am"}
if (h<10) {h="0" + h}
document.getElementById("clock").innerHTML=months[month] + "-" + date + "-" + year + " [" + days[day] + "] [" + h + ":" + m + ":" + s + "] " + am_pm;
setTimeout("refrClock()",1000);
}
refrClock();
</script>
<!-- / clock hack -->
Please click install if you use this.

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #72  
Old 07-14-2007, 01:48 AM
Rated Rated is offline
 
Join Date: Apr 2006
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To make it look like this:

Friday July 13, 2007 10:47:23 PM

Use this code:

<!-- clock hack-->
<div id="clock">Loading...</div>
<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","Thu rsday","Friday","Saturday");
var months=new Array("January","February","March","April","May"," June","July","August","Septemb er","October","November","December");
var AM_PM;
if (s<10) {s="0" + s}
if (m<10) {m="0" + m}
if (h>12) {h-=12;AM_PM = "PM"}
else {AM_PM="AM"}
if (h<10) {h="0" + h}
document.getElementById("clock").innerHTML=days[day] + " " + months[month] + " " + date + "," + " " + year + " " + h + ":" + m + ":" + s + " " + AM_PM;
setTimeout("refrClock()",1000);
}
refrClock();
</script>
<!-- / clock hack -->
Reply With Quote
  #73  
Old 07-16-2007, 07:34 AM
dismas's Avatar
dismas dismas is offline
 
Join Date: Jun 2007
Location: Vermont
Posts: 720
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed!

Nice little addition.

For those asking, "Why?", I think it would come in handy if someone is burdened with running Windows and IE when the IE window is maximized and system tray clock can't be seen. No need to make the bar visible just to see the time if it's already in the forum. Plus, if you're looking at the calendar, maybe you need a reminder of the date and time.
Reply With Quote
  #74  
Old 08-21-2007, 07:36 AM
WarLion's Avatar
WarLion WarLion is offline
 
Join Date: Jun 2006
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is the one fro spanish ( mexico )

Quote:
<!-- clock hack-->
<div id="clock">Loading...</div>
<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("Domingo","Lunes","Martes","Miercoles","Juev es","Viernes","Sabado");
var months=new Array("Ene","Feb","Mar","Abr","May","Jun","Jul","A go","Sep","Oct","Nov","Dic");

var am_pm;
if (s<10) {s="0" + s}
if (m<10) {m="0" + m}
if (h>12) {h-=12;am_pm = "pm"}
else {am_pm="am"}
if (h<10) {h="0" + h}
document.getElementById("clock").innerHTML=days[day] + " " + date + "/" + months[month] + "/" + year + " " + h + ":" + m + ":" + s + " " + am_pm;
setTimeout("refrClock()",1000);
}
refrClock();
</script>
<!-- / clock hack -->
i love this mod thanks installed
Reply With Quote
  #75  
Old 08-21-2007, 10:41 PM
mlucek's Avatar
mlucek mlucek is offline
 
Join Date: Feb 2004
Location: Lost Angeles
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sweet and simple !! GREAT !!

Tweaked the look to suit my own tastes :

Tues 8-21-2007 [ 4:45:02 PM]

moved the day to the front, got rid of the leading zero on the hours and capitalized the PM/AM

*** clicks INSTALL ***
Reply With Quote
  #76  
Old 10-13-2007, 02:38 PM
afullcup afullcup is offline
 
Join Date: Jul 2006
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any way to make this come from the server time? We run auctions on our site and it would be nice if everyone was looking at the same time for auction end. Thanks!
Reply With Quote
  #77  
Old 10-19-2007, 12:43 PM
yeku yeku is offline
 
Join Date: May 2005
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hotwheels View Post
and, if you would like to change the color of your font's to stand out more then the other color's in your welcome box, use this code and just change the #0000FF to what ever color you would like.
Quote:
<!-- clock hack -->
<font color="#0000FF">
<div id="clock">Loading...</div>
<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("Sun","Mon","Tue","Wed","Thurs","Fri","Sat") ;
var months=new Array("1","2","3","4","5","6","7","8","9","10","11 ","12");
var am_pm;
if (s<10) {s="0" + s}
if (m<10) {m="0" + m}
if (h>12) {h-=12;am_pm = "pm"}
else {am_pm="am"}
if (h<10) {h="0" + h}
document.getElementById("clock").innerHTML=months[month] + "-" + date + "-" + year + " " + days[day] + " " + h + ":" + m + ":" + s + " " + am_pm;
setTimeout("refrClock()",1000);
}
refrClock();
</script></font>
<!-- / clock hack -->
With mozilla the change of color does not work...

some solution or advice?

byee
Reply With Quote
  #78  
Old 03-16-2008, 02:10 PM
cafenetland cafenetland is offline
 
Join Date: Jan 2008
Location: Sweden
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

gr8 idea

thx
Reply With Quote
  #79  
Old 03-16-2008, 05:45 PM
Rideharder's Avatar
Rideharder Rideharder is offline
 
Join Date: Jan 2008
Location: Florida
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Me liky

www.speedaholic.net

added!
Reply With Quote
  #80  
Old 03-29-2008, 06:51 PM
moschino moschino is offline
 
Join Date: Dec 2007
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice and great on 3.6.8 PL2 tks Installed
Reply With Quote
  #81  
Old 04-06-2008, 07:17 AM
OG-G's Avatar
OG-G OG-G is offline
 
Join Date: Apr 2008
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi nice mod..., however is it possible to show an analogue display... a flash or something.. make it look more intresting.. cheers all
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:59 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09161 seconds
  • Memory Usage 2,311KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete