Post by Smangii on Nov 3, 2006 16:21:19 GMT -5
I've really got to learn DOM XD
Another info center... just for practice, really
I'm sure there are bugs... If anyone finds any let me know
Contains:
- Customizable Staff/Member Legend
- Info Center Icon Remover
- Full PM System
- Mark as Read & Back to Top Links
Preview
Main Footers!
Editing!
That part only, You can add as many rows as you want just be sure to keep the ['GroupName','######'] order and increase the groups[#] by 1 from the previous. Pretty self explanitory, the ###### is the hex color that the group appears in. Note: This will NOT change the titles of names in this group on the main page or in the info center. Only in the IC Legend.
Enjoy =)
Another info center... just for practice, really
I'm sure there are bugs... If anyone finds any let me know
Contains:
- Customizable Staff/Member Legend
- Info Center Icon Remover
- Full PM System
- Mark as Read & Back to Top Links
Preview
Main Footers!
<script type="text/javascript">
/*
Si.Boxed Info Center, by Smangii
http://smangii.proboards78.com
http://exdat.proboards44.com
Do not repost without permission
*/
// Begin editing of User/Staff Groups
var groups = [];
groups[0] = ['<b>Administrator</b>', '000000'];
groups[1] = ['<i>Global Moderator</i>', 'FFFF00'];
groups[2] = ['Moderator', 'FFFFFF'];
// Do Not Edit Below
if(location.href.match(/\.com(\/|.+cgi(\?|#.+|\?\w+=home)?)?$/i))
{
var TD=document.getElementsByTagName("td");
if(pb_username == 'Guest')
{
var pms = '<a href="/index.cgi?action=pm">Hello, Guest. Login to view PMs.</a>';
}
if(TD[2].innerHTML.match(/,\s(\d+)\s(is|are)/))
{
if(RegExp.$1==0){
var pms = '<a href="/index.cgi?action=pm">Hello, '+pb_displayname+'. You have 0 new PMs.</a>';
}
if(RegExp.$1>0){
var pms = '<a href="/index.cgi?action=pm">Hello, '+pb_displayname+'. You have New PMs!</a>';
}
}
for(i=0;i<TD.length;i++)
{
if(TD[i].width=="20" && TD[i].className.match("windowbg"))
{
TD[i].style.display="none"
}
}
for(e=0;e<TD.length;e++)
{
if(TD[e].className=="catbg" && TD[e].innerHTML.match(/Users Online/))
{
var moston = (TD[e+2].innerHTML.split(/Most\susers\s/)[1].split(/<br/i)[0]);
var onnow = (TD[e+2].innerHTML.split(/<br>/i)[1]);
var staffOn = (TD[e+2].innerHTML.match(/(\d+) Staff/i)) ? RegExp.$1: '0';
var membersOn = (TD[e+2].innerHTML.match(/(\d+) Member/i)) ? RegExp.$1: '0';
var guestsOn = (TD[e+2].innerHTML.match(/(\d+) Guest/i)) ? RegExp.$1: '0';
var legend = new String();
for(var a=0;a<groups.length;a++){
legend += '<font color="'+groups[a][1]+'">'+groups[a][0]+'</font><br/>';
}
TD[e+2].className = 'windowbg';
TD[e+2].innerHTML= '<table cellpadding="4" cellspacing="1" class="bordercolor" width="100%"><tr><td class="windowbg" rowspan="2">'+legend+'</td><td class="windowbg">The most users ever '+moston+' ('+staffOn+' Staff, '+membersOn+' Members, '+guestsOn+'</a> Guests)</td></tr><tr><td class="windowbg">Users Online: '+onnow+'</td></tr></table>';
}
if(TD[e].className=="catbg" && TD[e].innerHTML.match(/Forum Statistics/))
{
var totalposts = (TD[e+2].innerHTML.match(/Total Posts: (\d+)(,\d+)?<br/i)) ? RegExp.$1+RegExp.$2: 'n/a';
var totaltopics = (TD[e+2].innerHTML.match(/Total Topics: (\d+)(,\d+)? &/i)) ? RegExp.$1+RegExp.$2: 'n/a';
var totalmembs = (TD[e+2].innerHTML.match(/Total Members: (.+?)<br/i)) ? RegExp.$1: 'n/a';
var newmemb = (TD[e+2].innerHTML.match(/Newest Member: (.+?)<\/a>/i)) ? RegExp.$1+'</a>': '';
var lastpost = (TD[e+2].innerHTML.match(/Last Updated Topic: (.+?) by/i)) ? RegExp.$1: 'n/a';
var lastuser = (TD[e+2].innerHTML.match(/by (.+?) \(/i)) ? RegExp.$1: 'n/a';
var lastdate = (TD[e+2].innerHTML.match(/<\/a> \((.+?)\)<br\s?\/?>/i)) ? RegExp.$1: 'n/a';
TD[e+2].className = 'windowbg';
TD[e+2].innerHTML= '<table cellpadding="4" cellspacing="1" class="bordercolor" width="100%"><tr><td class="windowbg" rowspan="3">Our community has made '+totalposts+' posts in '+totaltopics+' topics.</br>The last updated topic was '+lastpost+'.</br>It was posted by '+lastuser+' on '+lastdate+'.</br><a href="/index.cgi?action=markallboardsread">Mark All Boards Read</a> | <a href="#">Back to Top</a></td><td class="windowbg" rowspan="1" align="center">We have a total of <b>'+totalmembs+'</b> registered members.</td></tr><tr><td class="windowbg" align="center">Pease welcome '+newmemb+', our newest member.</td></tr><tr><td class="windowbg" align="center">'+pms+'</td></tr></table>';
}
}
}
</script>
Editing!
var groups = [];
groups[0] = ['<b>Administrator</b>', '000000'];
groups[1] = ['<i>Global Moderator</i>', 'FFFF00'];
groups[2] = ['Moderator', 'FFFFFF'];
That part only, You can add as many rows as you want just be sure to keep the ['GroupName','######'] order and increase the groups[#] by 1 from the previous. Pretty self explanitory, the ###### is the hex color that the group appears in. Note: This will NOT change the titles of names in this group on the main page or in the info center. Only in the IC Legend.
Enjoy =)