Post by Kahless on Nov 1, 2007 22:41:52 GMT -5
my old forum Kronos Designs V1 info center.
Source: Open
Main Footer
Source: Open
Main Footer
<script type="text/javascript">
<!--
/*
Coded and Designed by Kahless
webAddict Open Source rules apply
*/
var iTD = document.getElementsByTagName("td");
var iA = document.getElementsByTagName("a");
var tAdmins = 0
var tGmods = 0
var tMods = 0
for(t=0;t<iTD.length;t++)
{
if(iTD[t].className.match(/catbg/i) && iTD[t].innerHTML.match(/Forum Statistics/i))
{
var topics = (iTD[t+2].innerHTML.match(/Total Topics: (\d+),(\d+)? &/i)) ? RegExp.$1+RegExp.$2: '';
var posts = (iTD[t+2].innerHTML.match(/Total Posts: (\d+),(\d+)?<br/i)) ? RegExp.$1+RegExp.$2: '';
var members = (iTD[t+2].innerHTML.match(/Total Members: <a href="(.+?)>(.+?)<\/a><br/i)) ? RegExp.$2: '';
var newmem = (iTD[t+2].innerHTML.match(/Newest Member: (.+?)<\/a>/i)) ? RegExp.$1: '';
var lpost = iTD[t+2].innerHTML.match(/last updated topic: (<.+?>.+?<\/a>) by (<.+?>.+?<\/a>) \((.+? at \d*:\d*(am|pm))\)/i) ? RegExp.$1: '';
var lpby = iTD[t+2].innerHTML.match(/last updated topic: (<.+?>.+?<\/a>) by (<.+?>.+?<\/a>) \((.+? at \d*:\d*(am|pm))\)/i) ? RegExp.$2: '';
var lptime = iTD[t+2].innerHTML.match(/last updated topic: (<.+?>.+?<\/a>) by (<.+?>.+?<\/a>) \((.+? at \d*:\d*(am|pm))\)/i) ? RegExp.$3: '';
var totalpm = (iTD[t+2].innerHTML.match(/Your Instant Messages: (.+?) New: (.+?)/i)) ? RegExp.$1: '';
var newpm = (iTD[t+2].innerHTML.match(/New: (.+?)/i)) ? RegExp.$1: '';
var ttopics = parseInt(topics)
var tposts = parseInt(posts)
var tmembers = parseInt(members)
var postsmem = Math.round(parseInt(tposts)/parseInt(tmembers))
var topicsmem = Math.round(parseInt(ttopics)/parseInt(tmembers))
}
if(iTD[t].innerHTML.match(/Most users online was (\d+), (.+?)<br/i))
{
var moston = RegExp.$1;
var mosttime = RegExp.$2;
}
if(iTD[t].className.match(/catbg/i) && iTD[t].innerHTML.match(/Today's Birthdays/i))
{
var mbdays = iTD[t+2].firstChild.firstChild.firstChild.firstChild.innerHTML.replace(/\d+ birthday[s]? today\.<br>/i, "");
iTD[t+1].style.display = 'none';
iTD[t+2].colSpan='2';
}
if(iTD[t].className.match(/catbg/i) && iTD[t].innerHTML.match(/Users Online/i))
{
var memon = iTD[t+2].innerHTML.split(/<br\s?\/?>/i)[1];
var mem = (iTD[t+2].innerHTML.match(/(\d+) Member/i)) ? RegExp.$1: '';
var guest = (iTD[t+2].innerHTML.match(/(\d+) Guest/i)) ? RegExp.$1: '';
var staff = (iTD[t+2].innerHTML.match(/(\d+) Staff Member/i)) ? RegExp.$1: '';
for(i=0;i<iTD[t+2].getElementsByTagName("a").length;i++)
{
if(iTD[t+2].getElementsByTagName('a')[i].className == "group1")
{
tAdmins++;
}
if(iTD[t+2].getElementsByTagName('a')[i].className == "group2" || iTD[t+2].getElementsByTagName('a')[i].className == "group5")
{
tGmods++;
}
if(iTD[t+2].getElementsByTagName('a')[i].className == "group3" || iTD[t+2].getElementsByTagName('a')[i].className == "group8" || iTD[t+2].getElementsByTagName('a')[i].className == "group9")
{
tMods++;
}
}
}
}
for(q=0;q<iTD.length;q++)
{
if(iTD[q].className.match(/catbg/i) && iTD[q].innerHTML.match(/Forum Statistics/i))
{
iTD[q+2].innerHTML='Total Topics: '+ttopics+' - Total Posts: '+tposts+' - Posts Per Member: '+postsmem+' - Topics Per Member: '+topicsmem+'<hr width="100%"><left>Kronos Designs would like to welcome you and our newest member '+newmem+'</a>, to our community.<br/>We have a total of <a href="/index.cgi?action=members">'+members+'</a> members on Kronos Designs and we are still growing.</left><br/>Our last updated topic was '+lpost+' by '+lpby+', '+lptime+'<br/>';
iTD[q+1].style.display="none";
iTD[q+2].colSpan="2";
}
if(iTD[q].className.match(/catbg/i) && iTD[q].innerHTML.match(/Today's Birthdays/i))
{
iTD[q+2].innerHTML = '<b>Members: </b>'+mbdays+'<br />Kronos Designs Wishes them all a happy Birthday.';
}
if(iTD[q].className.match(/catbg/i) && iTD[q].innerHTML.match(/Users Online/i))
{
iTD[q+1].width="72%";
iTD[q+2].width="28%";
iTD[q+1].align="left";
iTD[q+1].innerHTML='<font align="center" valign="top">The most users online at one time was '+moston+', on '+mosttime+'<br/><hr width="100%">'+memon+'</font>';
iTD[q+2].innerHTML='<table cellspacing="0" cellpadding="0" width="98%" bgcolor="eeeeee"><tr><td width="60%" class="windowbg" valign="top">'+tAdmins+' <font class="group1" color="#3eb6e8">Administrators</font><br/>'+tGmods+' <font class="group2" color="#d1a200">GModerators</font><br/>'+tMods+' <font class="group3" color="#34bf44">Moderators</font></td><td valign="top" width="40%" class="windowbg">'+mem+' <font color="#7297a9">Members</font><br/>'+guest+' Guests</td></tr></table>';
}
}
//-->
</script>