eCreations
« "Forum Age" in Info Center »

Welcome Guest. Please Login or Register.
Nov 21, 2009, 7:48am



You have No New Messages


eCreations :: Coding :: Code Index :: "Forum Age" in Info Center
   [Search This Thread][Send Topic To Friend] [Print]
 AuthorTopic: "Forum Age" in Info Center (Read 367 times)
Ross
eCreations Staff
[image]
member is offline




[homepage]

Joined: Jan 1970
Gender: Male
Posts: 1,768
Karma: 81
 "Forum Age" in Info Center
« Thread Started on Sept 15, 2006, 9:00am »

<script type="text/javascript">
<!--
/* add "forum age" to the info center
http://101support.proboards43.com - ross */

var startDate = ['28','06','2005']; // Forum start date in the form ['day','month','year']

// no need to edit below
if(location.href.match(/\.com\/?(index.cgi)?\??(&?action=home)?(#\w+)?$/)) {
var td = document.getElementsByTagName('td');
var sta = new Date();
sta.setDate(startDate[0]);
sta.setMonth(startDate[1]-1);
sta.setYear(startDate[2]);
var cur = new Date();
var dif = cur - sta;
var totalMonth = 0;
var totalYear = 0;
var totalDay = Math.floor(dif/(60 * 60 * 24 * 1000)) + 1;
while(totalDay > 365) {
totalDay -= 365;
totalYear++;
}
while(totalDay > 30) {
totalDay -= 30;
totalMonth++;
}
var age = totalDay+' days';
if(totalMonth > 0)
age += ', '+ totalMonth +' months';
if(totalYear > 0)
age += ', '+ totalYear +' year';
age += '.';
for (i=td.length-1; i>0; i--) {
if(td[i].width == '40%' && td[i-1].width == '60%') {
td[i].firstChild.innerHTML += '<br />Forum Age: '+age;
break;
}
}
}
//-->
</script>


Main Footer
Link to Post - Back to Top  IP: Logged

ProBoards Style Button Generator | PC Support Made Simple
micrografix
New Member
[image]
member is offline





Joined: Oct 2009
Gender: Male
Posts: 1
Karma: 0
 Re: "Forum Age" in Info Center
« Reply #1 on Oct 1, 2009, 7:34am »

Hello is there any way of using this with "Ultimate Info Center V3"
I hate to go sticking this in that code and destroying the board.
Link to Post - Back to Top  IP: Logged
   [Search This Thread][Send Topic To Friend] [Print]




vForums Free Message Boards


Site Design is Copyright © of eCreations (2005 - 2007)
Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!