Post by [dmsuperman] on Nov 6, 2004 5:42:17 GMT
Cross-browser compatability: None
Speed: Medium
Customizing: You don't really need to, but edit the layout if you want.
Preview
Speed: Medium
<script type="text/javascript">
/*
Info Center Rebuild - [dmsuperman]
Do not remove this header
Do not edit this header
Repost if you wish
If you edit it, and break it, to bad, grab it again
*/
if(document.title.match("Home")){
var TD = document.getElementsByTagName("TD");
//Get the info center stuff
for(x=0;x<TD.length;x++){
if(TD[x].className.match("catbg") && TD[x].colSpan=="2" && TD[x].innerHTML.match("Users Online")){
var lastUpdated = TD[x-2].innerHTML;
var memberArea = TD[x-1].innerHTML;
var usersOnline = TD[x+3].innerHTML.split("<br>")[1];
var guestsOnline = TD[x+3].innerHTML.split("<br>")[0].split("<FONT size=1>")[1].split(" Guest")[0];
var membersOnline = TD[x+3].innerHTML.split("<br>")[0].split(", ")[1].split(" member")[0];
var lastTopicUrl = lastUpdated.split("Last Updated Topic: <B>")[1].split(" by <A ")[0];
var topics = lastUpdated.split("Total Topics: <B>")[1].split("</B> ")[0];
var posts = lastUpdated.split("Total Posts: <B>")[1].split("</B> ")[0];
var userOfLastTopic = lastUpdated.split("</A> by ")[1].split(" (")[0];
var dateOfLastTopic = lastUpdated.split("</B></A> (")[1].split(")</B><br>View")[0];
var memberTotal = memberArea.split("Members: <A href=\"index.cgi?action=mlall\"><B>")[1].split("</B></A>")[0];
var newestMember = memberArea.split("</B></A> <br>")[1].split("<br>Your")[0];
}}
//Get all the header variables
var total = TD[2].innerHTML.split(" message")[0].split("<A href=\"index.cgi?action=im\">")[1];
var pms = TD[2].innerHTML.split("</A>, ");
if(TD[2].innerHTML.match(" are new")){
var pms = pms[1].split(" are new")[0];
}else if(TD[2].innerHTML.match(" is new")){
var pms = pms[1].split(" is new")[0];
}
var date = TD[2].innerHTML.split("<BR"+">")[1];
if(TD[2].innerHTML.match("Hey, ")){
var name = TD[2].innerHTML.split("Hey, ")[1].split(", you have ")[0];
}
var location = TD[1].innerHTML.split("<br>")[1];
//Hide the old Info Center
for(b=0;b<TD.length;b++){
if(TD[b].innerHTML.match("Info Center") && TD[b].className.match("titlebg")){
TD[b-1].style.display="none";
}}
//Hide the stuff at the top
TD[2].style.display="none";
TD[1].innerHTML=TD[1].innerHTML.split("<br>")[0];
//Build the new Info Center
document.write("<table border=1 class=bordercolor width=92% align=center><tr>");
document.write("<td class=titlebg><font class=text1 size=2><center>");
document.write("Information</center></font></td></tr><tr>");
document.write("<td class=windowbg>");
document.write("<center><br />New PM's: <a href=index.cgi?action=im><b>");
document.write(pms);
document.write("</b></a>, Total: <a href=index.cgi?action=im><b>");
document.write(total);
document.write("</b></a><br />It is: ");
document.write(date);
document.write("<br />");
document.write(location);
document.write("</center>");
document.write("<table class=bordercolor width=100%><tr><td width=50% valign=top class=windowbg>");
document.write("<div align=center><font size=2>Statistics</font></div>");
document.write("<br /><br /><font size=1><div align=center>Total posts: ");
document.write(posts);
document.write("<br />Total topics: ");
document.write(topics);
document.write("<br />Total members: ");
document.write(memberTotal);
document.write("<br />Last updated topic: <B>");
document.write(lastTopicUrl);
document.write("</B> by ");
document.write(userOfLastTopic);
document.write(" [");
document.write(dateOfLastTopic);
document.write("]<br />");
document.write(newestMember);
document.write("</td></tr><tr><td class=windowbg width=70% valign=top><br /><br /><br />");
document.write(guestsOnline);
document.write(" Guest(s) online | ");
document.write(membersOnline);
document.write(" online<br /><hr width=100%>Members online: ");
document.write(usersOnline);
document.write("<hr width=100%><br /></font></div></td></tr></table>");
document.write("</td></tr></table>");
}
</script>
Customizing: You don't really need to, but edit the layout if you want.
Preview