vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Clock On Footer (https://vborg.vbsupport.ru/showthread.php?t=259521)

SuperTaz 02-26-2011 10:00 PM

Clock On Footer
 
1 Attachment(s)
/*================================================= =========*\
|| ################################################## ## ||
|| # Clock For vBulletin Forums 4.1.x
|| # Version 1.01
|| # Author: Warden
|| # This mod may only be used from vbulletin.org
|| # DO NOT display this mod on any other modification site without my
|| # permission!
|| # You can alter this code and re-display it here on vbulletin.org
|| ################################################## ## ||
\*================================================ ==========*/

Description: This mod adds an a clock to the footer of the forums.

Note: If there is a mod like this already for 4.0.x series, I apologize. I will give credit to that person.

Installation: Less than 1 minute!

Installation instructions:

Step 1: Go to AdminCP > Styles and Templates > Style Manager > Click on your style > Click on "Footer"

Step 2: Find:

Code:

<div class="below_body">
Replace with:

Code:

<div class="below_body" align="center">
And below that add:

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 -->

Click Save and Reload!

Now check to see if it is at the bottom of the page above the vBulletin copyright.

If you use this mod, please CLICK INSTALL!!!

If you are having any problems from this mod, post them and I will help as much as I can.

SuperTaz 02-27-2011 02:56 AM

First post reserved. :)

Dr.osamA 02-27-2011 08:07 AM

1 Attachment(s)
thanxx bro
good mod

installed + 5stara + translated to Arabic

plzz be nice and add transleted file to 1st post

Hornstar 02-27-2011 07:02 PM

Thanks for sharing, however what would be the point in having the time twice in the footer? Maybe better to replace the time with this one, but it just looks odd having both times show up.

SuperTaz 02-27-2011 07:48 PM

You can remove this:

Code:

<div id="footer_time" class="shade footer_time">{vb:rawphrase all_times_are_gmt_x_time_now_is_y}</div>
And replace it with the code in the first post to only show one time. I have two so you can see the difference.

Also, this code is very versatile. You can use it anywhere on your site, not just the footer.

XiTCLUB 02-27-2011 08:51 PM

nice work

doctorsexy 05-25-2011 01:16 PM

not working on 4.1.3.... shame

SuperTaz 05-25-2011 02:54 PM

Edit: I updated the code to be more compatible. Try now.

doctorsexy 05-26-2011 08:31 AM

Smashin working 4.1.3 now...but is it possible to put an option to have it a colour.. my backgrounds dark.... thanks

Neofate 05-26-2011 11:05 PM

Does this call the time from the users local computer, or servers?


All times are GMT. The time now is 08:17 PM.

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.01054 seconds
  • Memory Usage 1,733KB
  • 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
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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