|
Post by Infection X on Apr 22, 2005 4:45:09 GMT -8
Main Footer <script type="text/javascript"> /* Alpha Info Center v1.0 Coded by Infection X http://coderhavens.proboards38.com/index.cgi */ var TD=document.getElementsByTagName("TD") if(TD[2].innerHTML.match(/Hey, (.+?), you/i)){ var iUser = RegExp.$1 }else{ var iUser = "Guest" } if(TD[2].innerHTML.match(/Hey, (.+?), you/i)){ var iPM = "Check your <a href='index.cgi?action=im'>Private Messages</a>." }else{ var iPM = "Please <a href='index.cgi?action=login'>Login</a> to view PMs." } var iUpdated = 0; var iBoards= 0; var iCats= 0; for(t=0;t<TD.length;t++){ if(TD[t].width=="66%" && TD[t].className.match(/windowbg2/i)) { iBoards++; }} for(t=0;t<TD.length;t++){ if(TD[t].className.match(/catbg/i) && !TD[t].innerHTML.match(/Users Online|Forum Statistics|=markallboardsread/i)) { iCats++; }} for(t=0;t<TD.length;t++){ if(TD[t].className=="windowbg2" && TD[t].width=="24%" && TD[t].innerHTML.match(/>Today<\/b>/i)){ iUpdated++; }} if(location.href.match(/(.+\d+.{4}\W?$|.+\d+.{14}([\?]?|[#]?\w*)$|.+\d+.{22}\w{3}(out|in2)|read$)/i)){ var tble = document.getElementsByTagName('TABLE') for(t=0;t<tble.length;t++){ var TD = tble[t].getElementsByTagName('TD')
if(tble[t].innerHTML.match(/Info Center/i) && tble[t].className.match(/bordercolor/i)){ if(TD[4].innerHTML.match(/Total Topics: <B>(.+?)<\/B>/i)){ var iTopics = RegExp.$1 if(TD[4].innerHTML.match(/Total Posts: <B>(.+?)<\/B>/i)){ var iPosts = RegExp.$1 if(TD[4].innerHTML.match(/Total Members: <a href=\"index.cgi\?action=mlall\"><B>(.+?)<\/B><\/a>/i)){ var iTotalMembers = RegExp.$1 if(TD[4].innerHTML.match(/Newest Member: (.+?)<\/a>/i)){ var iNewMember = RegExp.$1 var iLastUpdated = TD[4].innerHTML.split('Last Updated Topic: ')[1].split('by')[0] var iLastPoster = TD[4].innerHTML.split(/by/i)[1].split(/\(/i)[0]; var iPPM = Math.round(iPosts/iTotalMembers); var iPPB = Math.round(iPosts/iBoards);
if(TD[10].innerHTML.match(/(\d+) Guests, (\d+) Member/i)){ var iTotal = parseInt(RegExp.$1) + parseInt(RegExp.$2); var iGuests = parseInt(RegExp.$1); var iMembers = parseInt(RegExp.$2); var iMemOnline = TD[10].innerHTML.split(/<br>/i)[1]; }; TD[4].innerHTML="<table width='100%' cellpadding='5' cellspacing='1' class='bordercolor'><tr><td align='left' valign='middle' width='50%' rowspan='2' class='windowbg'><center><font size='1'>Total Topics: "+iTopics+" :: Total Posts: "+iPosts+" :: Total Boards: "+iBoards+" :: Total Categories: "+iCats+" :: Updated Boards: "+iUpdated+"</td></table><br/><table width='100%' cellpadding='5' cellspacing='1' class='bordercolor'><tr><td align='left' valign='middle' width='50%' rowspan='2' class='windowbg'><font size='1'>Welcome back "+iUser+"!<br/>"+iPM+"<br/>Total Members: "+iTotalMembers+"<br/>Newest Member: "+iNewMember+"</a><td class='windowbg' align='left' valign='top'><font size='1'>Last Updated Topic: "+iLastUpdated+"</b><br/>Last Poster: "+iLastPoster+"<br/>There is an average of "+iPPM+" posts per member.<br/>There is an average of "+iPPB+" posts per board.";
TD[10].innerHTML="<table width='100%' cellpadding='5' cellspacing='1' class='bordercolor'><tr><td align='left' valign='middle' width='50%' rowspan='2' class='windowbg'><font size='1'>Total Online: "+iTotal+"<br/>Members Online: "+iMembers+"<br/>Guests Online: "+iGuests+"<td class='windowbg' align='left' valign='top'>"+iMemOnline+""; }}}}} }} </script> Preview: projectjello.proboards37.com/index.cgiCross-Browser
I noticed a problem people are complaining about, if it's not showing up on your board, make sure your board has at least 1 post.
|
|
100%
|
Post by Aaron on Apr 22, 2005 13:55:07 GMT -8
Nice code Infection X!
|
|
|
Post by replay on Apr 26, 2005 18:54:06 GMT -8
Awesome code! I was wondering where i could find this at. I saw it on that test board but i think it said something about no one being able to use it but you so I left it alone.
|
|
|
Post by ShadowyOne on Apr 26, 2005 19:42:33 GMT -8
Nice info center, looks great. What's the bottom right box used for? If it's not used for anything, maybe you should add something into it. Cool code.
|
|
|
Post by CD on Apr 27, 2005 4:18:36 GMT -8
SO, where else would the users names go?
|
|
|
Post by Kenshin on Apr 27, 2005 14:40:00 GMT -8
ShadowyOne, that box is used to display the Users Online
|
|
|
Post by ShadowyOne on Apr 28, 2005 16:47:34 GMT -8
Yes...well, *ahem* I didn't think of that.
Maybe you should try to add text that says "No Users Online" or something when there are only guests. >_>
|
|
|
Post by Infection X on Apr 28, 2005 18:21:58 GMT -8
Yes...well, *ahem* I didn't think of that. Maybe you should try to add text that says "No Users Online" or something when there are only guests. >_> You just gave me another idea for v2
|
|
|
Post by SonicX on Apr 28, 2005 18:54:57 GMT -8
That is a very nice code Infection X!
|
|