View Full Version : Clock and Date in Navbar
SuperFly
06-09-2006, 10:00 PM
In Navbar template
Find
<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
<!-- 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.
Ntfu2
06-10-2006, 09:29 PM
screenshot?
Jeordie015
06-10-2006, 10:06 PM
If it's based on your computer's clock, what's the point?
Daniel
06-10-2006, 10:21 PM
If it's based on your computer's clock, what's the point?
So you don't have to look down. :p
Perhaps just a fun thing to have.
SuperFly
06-10-2006, 11:25 PM
If it's based on your computer's clock, what's the point?
Its kinda nifty, date and time at top but meh its your opinion choice.
SuperFly
06-11-2006, 04:50 PM
Screen shot is up.
aethro
06-12-2006, 01:42 AM
lol this is kinda nifty *clicks install*
Tyegurl
06-25-2006, 03:09 PM
i like it a lot!
thanks!
I want it I have had tons of reuests to have a clock of some sort on our board, so I think this would be great. HOWEVER I can not get it to work. I can't find the code that I need to add this under. This is what my Navbar template looks like:
<script type="text/javascript">
<!--
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grays cale=1)";
if (confirm('$vbphrase[sure_you_want_to_log_out]'))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}
//-->
</script>
<br />
<!-- breadcrumb, login, pm info -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%">
<if condition="is_array($navbits)">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="bottom">
<td><a href="#" onclick="history.back(1); return false;"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
<td> </td>
<td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
</tr>
<tr>
<td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><a href="$scriptpath"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink.gif" alt="$vbphrase[reload_this_page]" border="0" /></a> <strong>$navbits[lastelement]</strong></td>
</tr>
</table>
<else />
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
</td>
<if condition="$show['member']">
<td class="alt2" valign="top" nowrap="nowrap">
<div class="smallfont">
<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
<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>
<!-- [START HACK='vB Pager' AUTHOR='UAEWEB.COM' VERSION='3.0.3' CHANGEID= 3 ] -->
<if condition="$show['pager']"><br /><a href="#" onclick="window.open('$vboptions[bburl]/pager.php?action=pager&do=log&folder=inbox','pagerinbox','statusbar=no,menubar=n o,toolbar=no,scrollbars=yes,resizable=yes,width=65 0,height=500'); return false;">$vbphrase[pager_pager_messages]</a><phrase 1="$bbuserinfo[pagerunread]" 2="$bbuserinfo[pagertotal]">$vbphrase[pager_messages_nav_x_y]</phrase></if>
<!-- [END HACK='vB Pager' AUTHOR='UAEWEB.COM' VERSION='3.0.3' CHANGEID= 3 ] -->
</div>
</td>
<else />
<td class="alt2" nowrap="nowrap" style="padding:0px">
<!-- login form -->
<form action="login.php" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
<script type="text/javascript" src="clientscript/vbulletin_md5.js"></script>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td class="smallfont">$vbphrase[username]</td>
<td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
<td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />$vbphrase[remember_me]</label></td>
</tr>
<tr>
<td class="smallfont">$vbphrase[password]</td>
<td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" size="10" accesskey="p" tabindex="102" /></td>
<td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
</tr>
</table>
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
<!-- / login form -->
</td>
</if>
</tr>
</table>
<!-- / breadcrumb, login, pm info -->
<!-- nav buttons bar -->
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
</if>
<if condition="$permissions['adoptpermissions'] & $vbulletin->bf_ugp_adoptpermissions['canview']"><td class="vbmenu_control"><a href="adopt.php$session[sessionurl_q]">$vbphrase[adoption_center]</a></td>
</if>
<if condition="$show['registerbutton']">
<td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
</if>
<td class="vbmenu_control"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>
<td class="vbmenu_control"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td>
<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
<!-- v3 Arcade -->
<td class="vbmenu_control"><a href="arcade.php$session[sessionurl_q]">Arcade</a></td>
<!-- /v3 Arcade -->
<if condition="$show['popups']">
<if condition="$show['searchbuttons']">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
<td id="navbar_search" class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <script type="text/javascript"> vbmenu_register("navbar_search"); </script></td>
</if>
<if condition="$show['member']">
<td id="usercptools" class="vbmenu_control"><a href="$show[nojs_link]#usercptools">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>
</if>
<else />
<if condition="$show['searchbuttons']">
<td class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4">$vbphrase[search]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
</if>
<td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td> [START HACK='vB Pager' AUTHOR='UAEWEB.COM' VERSION='3.0.3' CHANGEID= 4 ] -->
<tr><td class="vbmenu_option"><a href="#" onclick="window.open('$vboptions[bburl]/pager.php?$session[sessionurl]do=buddylist','pagerbuddylist','statusbar=no,menub ar=no,toolbar=no,scrollbars=yes,resizable=yes,widt h=$vboptions[vbpager_width],height=$vboptions[vbpager_height]'); return false;">$vbphrase[pager_open_vbpager]</a></td></tr>
<!-- [END HACK='vB Pager' AUTHOR='UAEWEB.COM' VERSION='3.0.3' CHANGEID= 4 ] -->
</if>
</if>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&logouthash=$bbuserinfo[logouthash]" onclick="return log_out()">$vbphrase[log_out]</a></td>
</if>
</tr>
</table>
</div>
<!-- / nav buttons bar -->
<br />
<if condition="$show['forumdesc']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%"><strong>$foruminfo[title]</strong> <span class="smallfont">$foruminfo[description]</span></td>
</tr>
</table>
<br />
</if>
<if condition="$show['popups']">
<!-- NAVBAR POPUP MENUS -->
<if condition="$show['searchbuttons']">
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="showposts" value="0" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="text" class="bginput" name="query" size="20" /> $gobutton<br />
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>
</table>
</div>
<!-- / header quick search form -->
</if>
<if condition="$show['member']">
<!-- user cp tools menu -->
<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$vbphrase[quick_links]</td></tr>
<if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr>
<tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td></tr>
<tr><td class="thead"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_control_panel]</a></td></tr>
<if condition="$show['siglink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if>
<!--<if condition="$show['avatarlink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td></tr></if>-->
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr>
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
<if condition="$show['pmstats']"><tr><td class="vbmenu_option"><a href="private.php$session[sessionurl_q]" rel="nofollow">$vbphrase[private_messages]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="subscription.php$session[sessionurl_q]" rel="nofollow">$vbphrase[subscribed_threads]</a></td></tr>
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
<if condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php$session[sessionurl_q]">$vbphrase[whos_online]</a></td></tr></if>
</table>
</div>
<!-- / user cp tools menu -->
</if>
<!-- / NAVBAR POPUP MENUS -->
<!-- PAGENAV POPUP -->
<div class="vbmenu_popup" id="pagenav_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" nowrap="nowrap">$vbphrase[go_to_page]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="$vboptions[forumhome].php" method="get" onsubmit="return this.gotopage()" id="pagenav_form">
<input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" />
<input type="button" class="button" id="pagenav_ibtn" value="$vbphrase[go]" />
</form>
</td>
</tr>
</table>
</div>
<!-- / PAGENAV POPUP -->
</if>
<br>
CAN SOMEONE PLEASE HELP ME?
SuperFly
07-08-2006, 01:23 AM
try this
<script type="text/javascript">
<!--
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DPRIVATE "TYPE=PICT;ALT=" XImageTransform.Microsoft.BasicImage(grayscale=1)";
if (confirm('$vbphrase[sure_you_want_to_log_out]'))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}
//-->
</script>
<br />
<!-- breadcrumb, login, pm info -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%">
<if condition="is_array($navbits)">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="bottom">
<td><a href="#" onclick="history.back(1); return false;"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
<td> </td>
<td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
</tr>
<tr>
<td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><a href="$scriptpath"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink.gif" alt="$vbphrase[reload_this_page]" border="0" /></a> <strong>$navbits[lastelement]</strong></td>
</tr>
</table>
<else />
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
</td>
<if condition="$show['member']">
<td class="alt2" valign="top" nowrap="nowrap">
<div class="smallfont">
<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
<if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]"
<!-- 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","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>12) {h-=12;am_pm = "P.M."} else {am_pm="A.M."} if (h<10) {h="0" + h} document.getElementById("clock").innerHTML=days[day] + " " + date + "th of " + months[month] + " " + year + ", " + h + ":" + m + ":" + s + " " + am_pm; setTimeout("refrClock()",1000); } refrClock(); </script> <!-- / clock hack -->
2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></if>
<!-- [START HACK='vB Pager' AUTHOR='UAEWEB.COM' VERSION='3.0.3' CHANGEID= 3 ] -->
<if condition="$show['pager']"><br /><a href="#" onclick="window.open('$vboptions[bburl]/pager.php?action=pager&do=log&folder=inbox','pagerinbox','statusbar=no,menubar=n o,toolbar=no,scrollbars=yes,resizable=yes,width=65 0,height=500'); return false;">$vbphrase[pager_pager_messages]</a><phrase 1="$bbuserinfo[pagerunread]" 2="$bbuserinfo[pagertotal]">$vbphrase[pager_messages_nav_x_y]</phrase></if>
<!-- [END HACK='vB Pager' AUTHOR='UAEWEB.COM' VERSION='3.0.3' CHANGEID= 3 ] -->
</div>
</td>
<else />
<td class="alt2" nowrap="nowrap" style="padding:0px">
<!-- login form -->
<form action="login.php" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
<script type="text/javascript" src="clientscript/vbulletin_md5.js"></script>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td class="smallfont">$vbphrase[username]</td>
<td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
<td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />$vbphrase[remember_me]</label></td>
</tr>
<tr>
<td class="smallfont">$vbphrase[password]</td>
<td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" size="10" accesskey="p" tabindex="102" /></td>
<td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
</tr>
</table>
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
<!-- / login form -->
</td>
</if>
</tr>
</table>
<!-- / breadcrumb, login, pm info -->
<!-- nav buttons bar -->
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
</if>
<if condition="$permissions['adoptpermissions'] & $vbulletin->bf_ugp_adoptpermissions['canview']"><td class="vbmenu_control"><a href="adopt.php$session[sessionurl_q]">$vbphrase[adoption_center]</a></td>
</if>
<if condition="$show['registerbutton']">
<td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
</if>
<td class="vbmenu_control"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>
<td class="vbmenu_control"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td>
<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
<!-- v3 Arcade -->
<td class="vbmenu_control"><a href="arcade.php$session[sessionurl_q]">Arcade</a></td>
<!-- /v3 Arcade -->
<if condition="$show['popups']">
<if condition="$show['searchbuttons']">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
<td id="navbar_search" class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <script type="text/javascript"> vbmenu_register("navbar_search"); </script></td>
</if>
<if condition="$show['member']">
<td id="usercptools" class="vbmenu_control"><a href="$show[nojs_link]#usercptools">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>
</if>
<else />
<if condition="$show['searchbuttons']">
<td class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4">$vbphrase[search]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
</if>
<td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scroll bars=yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td> [START HACK='vB Pager' AUTHOR='UAEWEB.COM' VERSION='3.0.3' CHANGEID= 4 ] -->
<tr><td class="vbmenu_option"><a href="#" onclick="window.open('$vboptions[bburl]/pager.php?$session[sessionurl]do=buddylist','pagerbuddylist','statusbar=no,menub ar=no,toolbar=no,scrollbars=ye s,resizable=yes,width=$vboptions[vbpager_width],height=$vboptions[vbpager_height]'); return false;">$vbphrase[pager_open_vbpager]</a></td></tr>
<!-- [END HACK='vB Pager' AUTHOR='UAEWEB.COM' VERSION='3.0.3' CHANGEID= 4 ] -->
</if>
</if>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&logouthash=$bbuserinfo[logouthash]" onclick="return log_out()">$vbphrase[log_out]</a></td>
</if>
</tr>
</table>
</div>
<!-- / nav buttons bar -->
<br />
<if condition="$show['forumdesc']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%"><strong>$foruminfo[title]</strong> <span class="smallfont">$foruminfo[description]</span></td>
</tr>
</table>
<br />
</if>
<if condition="$show['popups']">
<!-- NAVBAR POPUP MENUS -->
<if condition="$show['searchbuttons']">
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="showposts" value="0" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="text" class="bginput" name="query" size="20" /> $gobutton<br />
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>
</table>
</div>
<!-- / header quick search form -->
</if>
<if condition="$show['member']">
<!-- user cp tools menu -->
<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$vbphrase[quick_links]</td></tr>
<if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr>
<tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scroll bars=yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td></tr>
<tr><td class="thead"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_control_panel]</a></td></tr>
<if condition="$show['siglink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if>
<!--<if condition="$show['avatarlink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td></tr></if>-->
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr>
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
<if condition="$show['pmstats']"><tr><td class="vbmenu_option"><a href="private.php$session[sessionurl_q]" rel="nofollow">$vbphrase[private_messages]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="subscription.php$session[sessionurl_q]" rel="nofollow">$vbphrase[subscribed_threads]</a></td></tr>
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
<if condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php$session[sessionurl_q]">$vbphrase[whos_online]</a></td></tr></if>
</table>
</div>
<!-- / user cp tools menu -->
</if>
<!-- / NAVBAR POPUP MENUS -->
<!-- PAGENAV POPUP -->
<div class="vbmenu_popup" id="pagenav_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" nowrap="nowrap">$vbphrase[go_to_page]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="$vboptions[forumhome].php" method="get" onsubmit="return this.gotopage()" id="pagenav_form">
<input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" />
<input type="button" class="button" id="pagenav_ibtn" value="$vbphrase[go]" />
</form>
</td>
</tr>
</table>
</div>
<!-- / PAGENAV POPUP -->
</if>
<br>
utw-Mephisto
07-20-2006, 12:35 AM
Nice one .. I like it
/me installs
sam anders
07-20-2006, 08:29 PM
installed thanks
Aclikyano
08-04-2006, 02:12 PM
<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.
OmekaTeam
08-06-2006, 02:03 PM
This is the modification for having the clock to the 24 hours with the months and the days in Italian.Hi:) :)
<!-- 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("Domenica","Luned?","Marted?","Mercoled?","Gioved?","Venerd?","Sabato");
var months=new Array("Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre");
var am_pm;
if (s<10) {s="0" + s}
if (m<10) {m="0" + m}
if (h>24) {h=24;}
if (h<10) {h="0" + h}
document.getElementById("clock").innerHTML=days[day] + " " + date + " " + months[month] + " " + year + ", " + h + ":" + m + ":" + s + " ";
setTimeout("refrClock()",1000);
}
refrClock();
</script>
<!-- / clock hack -->
Aclikyano
08-13-2006, 04:21 AM
FIXED the prob myself.. nevermind
(had: undefined showing after clock)
marlita
08-17-2006, 09:49 PM
I'm so new at this. I'm sure this is very basic, but will someone please help me find the file where I'm supposed to enter this code?
Thank you!
SuperFly
08-18-2006, 03:14 AM
In the Navbar template, under navigation.
ktp101
08-18-2006, 08:39 PM
:) cheers
tuanvic
08-19-2006, 04:06 AM
my skin didn't have <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>
in the navbar all information is display user in header because i have side bar on the left hand. how can make this display in this thanks
there's a space in november ("October","Novem ber","December");) ;)
and thursday ("Wednesday","Thu rsday","Friday", )
installed and thx
Snake
08-21-2006, 11:11 PM
Super, how do I change the clock to like this?
Tuesday, August 25th, 2006
Snake
08-21-2006, 11:20 PM
Nevermind.
racer_69
08-22-2006, 12:25 AM
In Portuguese its like this :D
<!-- 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","Segunda","Ter?a","Quarta","Quinta","Sexta","Sabado");
var months=new Array("Janeiro","Fevereiro","Mar?o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro");
var am_pm;
if (s<10) {s="0" + s}
if (m<10) {m="0" + m}
if (h>24) {h=24;}
if (h<10) {h="0" + h}
document.getElementById("clock").innerHTML=days[day] + " " + date + " " + months[month] + " " + year + ", " + h + ":" + m + ":" + s + " ";
setTimeout("refrClock()",1000);
}
refrClock();
</script>
<!-- / clock hack -->
Lionel
08-29-2006, 05:09 AM
Looks like this javascript is interfering with cron.php
I installed and the message on status bar "Downloading cron.php etc..." is frozen. I uninstalled and no problems.
Gazer
08-29-2006, 11:45 AM
installed thanks
Regards Gazer.
Gazer
09-03-2006, 05:50 PM
I have noticed that the 1st three days of the date is like this..... 1th 2th 3th is there anyway of changing this so we can have 1st 2nd 3rd please i think the rest should be ok 4th 5th 6th and so on untill we get to 21st
Regards Gazer.
LordDB
09-04-2006, 02:59 PM
I have noticed that the 1st three days of the date is like this..... 1th 2th 3th is there anyway of changing this so we can have 1st 2nd 3rd please i think the rest should be ok 4th 5th 6th and so on untill we get to 21st
Regards Gazer.
Yes, me too! How can this problem be resolved?
Cheers!
Aclikyano
09-04-2006, 06:00 PM
<!-- clock vb 3.6.0 wrote by SuperFly - edited by Aclikyano -->
<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 -->
-> DISPLAY: 9-4-2006 [Mon] [03:00:32] pm
TheBlackPoet
09-06-2006, 06:09 AM
thanks for posting this... its a lot easier for me and mems... i switched the date around and made it more ordered according to how we say it.. wed sept 6, 2006
still, i couldnt have done it without you....
VViper
09-10-2006, 02:22 AM
Great Mod i have installed it, However between the date and the month their is no space can this be fixed?
Aclikyano
09-17-2006, 06:20 PM
Great Mod i have installed it, However between the date and the month their is no space can this be fixed?
https://vborg.vbsupport.ru/newreply.php?do=newreply&p=1067939
just use mine.. lol :smoke:
VViper
09-17-2006, 09:42 PM
Thanks Aclikyano that is much better.
rezapci
09-19-2006, 04:38 AM
installed, Thank you
Hi,
I'd like to install this on my forum but in the opposite direction. My forum is in Arabic...right to left. What would the code for that be?
Thanks
dagummit
09-25-2006, 08:38 AM
Does anyone know how to remove the brackets "[ ]" from around the day and time? (see pic)...
53891
Thanks!
hotwheels
09-25-2006, 03:27 PM
use this:
<!-- 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 -->
hotwheels
09-25-2006, 03:40 PM
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.
<!-- 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 -->
dagummit
09-25-2006, 05:19 PM
Thanks for the revision!
Also, any idea why some user's clocks (in different timezones I suppose) are not correct? Like they may be 2 hours off? Is this code designed to look at the system time? Or the vB time?
hotwheels
09-25-2006, 05:26 PM
It should come right off of the vbulletin time..........I know mine is correct to my computer and vbulletin.
SuperFly
09-25-2006, 05:59 PM
Its off the users computer.
[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
<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
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
SuperFly
11-16-2006, 12:56 AM
The code is nothing to do with VB, its all Javascript pulled from the home computers.
bklynjava
11-16-2006, 01:03 AM
Installed - Nice lil hack.
slappy
11-16-2006, 02:40 PM
One side effect of using this clock is that it makes the mouse cursor blink in time with the second counter. Not a major problem, but quite a visible "effect" of the seconds ticking by.
Regards,
The code is nothing to do with VB, its all Javascript pulled from the home computers.
So I can't translate it?
SuperFly
11-17-2006, 05:45 PM
What exactly do you want them to say?
My forum is in Arabic. I would have liked to translate the days and the am/pm into Arabic. Numbers stay the same.
KURTZ
01-07-2007, 11:34 AM
i've a question: it's possible to set the date before the month?
pandaram
02-09-2007, 12:25 PM
i've a question: it's possible to set the date before the month?
<!-- 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","Thursday","Friday","Saturday");
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 -->
use this to make in that format
Deadly Assassin
02-10-2007, 03:50 AM
Thanks alot,
Excellent :up:
https://vborg.vbsupport.ru/
engineco16
02-11-2007, 01:53 PM
I like, thanks!
sdphotoforum
02-12-2007, 09:52 AM
Very nice! Thanks.
- Marshall
Gizmo5h1t3
02-16-2007, 09:44 AM
date before the month is this, not as shown above....
<!-- 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","Thursday","Friday","Saturday");
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= date + "-" + months[month] + "-" + year + " " + days[day] + " " + h + ":" + m + ":" + s + " " + am_pm;
setTimeout("refrClock()",1000);
}
refrClock();
</script>
<!-- / clock hack -->
deezelpope
03-14-2007, 10:41 AM
Damn, that was easy and fast!!! Beautiful!! Thank you very much!!:up: :D
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:
Thanks guys...Superfly, Aclikyano, daPLAYBOY...finally changed it to Arabic and here it is if anybody should need it.
<!-- 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("الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت");
var months=new Array("يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر");
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 = "مساءً"}
else {am_pm = "صباحاً"}
document.getElementById("clock").innerHTML=days[day] + " | " + months[month] + " " + date + ", " + year + " | " + h + ":" + m + ":" + s + " " + am_pm;
setTimeout("refrClock()",1000);
}
refrClock();
</script>
<!-- / clock hack -->
K D Umbaugh
06-03-2007, 04:58 PM
works great I just made a minor changes, inserted title and made bold.
if you would like to see Neighborhood Round Table (http://www.neighborhoodroundtable.com/cmps_index.php)
SuperTaz
06-03-2007, 05:53 PM
Very nice...Installed.
Thank You! Very useful! :)
jderouen
06-14-2007, 02:20 PM
Very nice. Installed. Just one question - is it possible to make it use the time zone from whatever the user selects in the UserCP?
jderouen
06-15-2007, 04:46 AM
Hmm. It seems to be working fine, except that, at 46 minutes after midnight, the time reads 00:46:21. What's up with that, and how do I fix it?
Thanks!
Joe
Rated
07-14-2007, 01:48 AM
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","Thursday","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 -->
dismas
07-16-2007, 07:34 AM
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.
WarLion
08-21-2007, 07:36 AM
this is the one fro spanish ( mexico )
<!-- 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","Jueves","Viernes","Sabado");
var months=new Array("Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","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
mlucek
08-21-2007, 10:41 PM
Sweet and simple !! GREAT !! :D
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 ***
afullcup
10-13-2007, 02:38 PM
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!
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.
<!-- 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
cafenetland
03-16-2008, 02:10 PM
gr8 idea
thx
Rideharder
03-16-2008, 05:45 PM
Me liky
www.speedaholic.net
added!
moschino
03-29-2008, 06:51 PM
Nice and great on 3.6.8 PL2 tks Installed
hi nice mod..., however is it possible to show an analogue display... a flash or something.. make it look more intresting.. cheers all
wd4x4
04-07-2008, 12:46 PM
Hmm. It seems to be working fine, except that, at 46 minutes after midnight, the time reads 00:46:21. What's up with that, and how do I fix it?
Thanks!
Joe
Good Question. Same issue here.
ArnyVee
04-08-2008, 01:23 AM
Worked for me :)
3.6.8
crkgb
04-08-2008, 04:28 AM
Is there a way to synchronize it to the server, not the user desktop?
dancue
04-10-2008, 10:37 PM
Installed on 3.7 RC1. Works just fine.
Used a bit different look.
<!-- 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","Thursday","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 -->
SuperTaz
05-10-2008, 05:00 AM
Works on 3.7.0 Gold as well.
ArnyVee
06-18-2008, 04:47 PM
Just changed to dancue's version. Looks cool. :D
Looks like this...
Wednesday :: June 18, 2008 :: 01:45:23 PM
PHILLYFAN
08-01-2008, 12:45 AM
thank you
hello!
can somebody help to get or change code without Am or Pm .. only 24h!
regards
macc
djrapid.com
10-03-2008, 12:47 AM
works good in v3.7.3
ERAFOX
10-07-2008, 07:29 PM
based on your computer's clock... buuuuu
dolphin678
10-18-2008, 06:52 AM
added in3.7.3 PL1 - altered to add a <br> between the PM meesages and clock in Navbar:
this is the code in Navbar I added it under
<else /><if condition="$show['pmstats']">
<div><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></div>
</if></if>
dolphin678
10-18-2008, 09:55 AM
I also fixed the code slightly so that between midnight and 1 am the clock says 12 and between noon and 1pm the clock says PM, also normally at 1:30pm in Western countries we don't write 01:30pm so I removed that bit.:
this is the portion of code I changed from this:
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}
to this:
var AM_PM;
if (s<10) {s="0" + s}
if (m<10) {m="0" + m}
if (h<12) {AM_PM = "AM"}
else {AM_PM="PM"}
if (h<1) {h+=12}
if (h>12) {h-=12}
nalexandre
11-25-2008, 10:46 AM
Hello, I?m new here, i can?t find this code in navbar
<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>
Is there any other tip to use?
Thank you
Working on 3.8.1. too. :)
Hawk7173
08-23-2009, 08:38 PM
How would one make this in a different color and bold?
Birute
10-12-2009, 10:50 PM
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","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>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 -->
That is exactly what I wanted, thank you! :D
s-p0k
03-05-2010, 04:43 PM
ty installed...............
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.