Back to vBulletin 4.x Template Modifications

Clock On Footer
Mod Version: 1.01, by SuperTaz

vB Version: 4.1.3 Rating: (5 votes - 5.00 average) Installs: 19
Released: 27 Feb 2011 Last Update: 25 May 2011 Downloads: 32
Not Supported Template Edits Re-usable Code Translations  

/*==========================================================*\
|| #################################################### ||
|| # 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.

Download

File Type: %1$s ReadMe.txt (2.1 KB, 20 downloads)

Screenshots

Click image for larger version
Name:	clock.png
Views:	947
Size:	3.8 KB
ID:	126992  


vblts.ru supports vBulletin®, 2022-2025