The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#21
|
|||
|
|||
Quote:
Especially for a piece of info that never changes.... |
#22
|
||||
|
||||
Quote:
@Feckie: Thank you very much for the Yearly code. It's really much better for those forums over a year old. |
#23
|
|||
|
|||
Quote:
erm..... it works great but the year increased on 01 Jan and it's not supposed to to that till July. Any ideas? |
#24
|
||||
|
||||
Quote:
Code:
<script type="text/javascript" language="JavaScript"> //modified by Feckie December 10th 2005 (to show years) //modified by Feckie Jan 18th 2006 //fixed years problem //rewrite math //account for leapyear //account for year/years text /* ?![CDATA[ */ function setcountup(theyear,themonth,theday){ yr=theyear;mo=themonth;da=theday } //////////CONFIGURE THE countup SCRIPT HERE////////////////// //STEP 1: Configure the date to count up from, in the format year, month, day: //This date should be less than today setcountup(2004,10,24) //STEP 2: Configure text to be attached to count up var displaymessage="since $vboptions[bbtitle] - Forums came online!" //STEP 3: Configure the below 5 variables to set the width, height, background color, and text style of the countup area var countupwidth='95%' var countupheight='20px' //applicable only in NS4 var countupbgcolor='alt1' var opentags='<span class="smallfont">' var closetags='</span>' //////////DO NOT EDIT PASS THIS LINE////////////////// var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") var crosscount='' function start_countup(){ if (document.layers) document.countupnsmain.visibility="show" else if (document.all||document.getElementById) crosscount=document.getElementById&&!document.all?document.getElementById("countupie") : countupie countup() } if (document.all||document.getElementById) document.write('<span id="countupie" style="width:'+countupwidth+'; background-color:'+countupbgcolor+'"></span>') window.onload=start_countup function countup(){ var today=new Date() var todayy=today.getYear() if (todayy < 1000) todayy+=1900 var todaym=today.getMonth() var todayd=today.getDate() var todayh=today.getHours() var todaymin=today.getMinutes() var todaysec=today.getSeconds() var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec paststring=montharray[mo-1]+" "+da+", "+yr dd=Date.parse(todaystring)-Date.parse(paststring) var daysInYear if ((todayy % 4)==0) { daysInYear=366; } else { daysInYear=365; } years=Math.floor(((((dd/1000)/60)/60)/24)/daysInYear) compDays=Math.floor((((dd/1000)/60)/60)/24) days=Math.floor(((((dd/1000)/60)/60)/24)-(years*daysInYear)) compHours=Math.floor(((dd/1000)/60)/60) hours=Math.floor((((dd/1000)/60)/60)-(compDays*24)) compMinutes=Math.floor((dd/1000)/60) minutes=Math.floor(((dd/1000)/60)-(compHours*60)) compSeconds=Math.floor(dd/1000) seconds=Math.floor((dd/1000)-(compMinutes*60)) var yearText="" if (years > 1 || years < 1) { yearText="years"; } else { yearText="year"; } if (document.layers){ document.countupnsmain.document.countupnssub.document.write(opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds "+displaymessage+closetags) document.countupnsmain.document.countupnssub.document.close() } else if (document.all||document.getElementById) crosscount.innerHTML=opentags+years+ " "+yearText+", "+days+ " days, "+hours+" hours, "+minutes+" minutes, and "+seconds+" seconds "+displaymessage+closetags setTimeout("countup()",1000) } /* ]]? */ </script> |
#25
|
|||
|
|||
Much better. Many thanks.
|
#26
|
|||
|
|||
Any screen shots of this?
|
#27
|
||||
|
||||
Quote:
@rareclownfish: http://www.nzboards.com/forums .. look in the Whats Going On area. |
#28
|
||||
|
||||
Quote:
Yep No Probs |
#29
|
|||
|
|||
is there any way to add months too?
I only want to display years, months and days |
#30
|
|||
|
|||
wheres this script go ?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|