Post by fastheart on Dec 26, 2007 4:12:55 GMT -5
I am getting good at knowing a lot of codes to enhance proboards sites. and i also have some suggestions.
--- Board/Catagory layout
--eye strain and readability
-the default skin is too dark and stuff is hard to read
-the catagories need to be spaced using the code below into the Main Footer:
<script type="text/javascript">
<!--
/*
Dividing Categories - Created by Peter
This code cannot be reposted anywhere other than SSDesigns or ProBoards Support.
This header must stay intact.
*/
// Size of the gap between categories
var gapSize = 25;
var tabHTML = '<td id="rr" colspan="5"></table></td></tr></table><div style="height:' + gapSize + '"></div><table width="100%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" width="100%"><tr>';
if(location.href.match(/\.com(\/|.+cgi(\?|#.+|\?\w+=home)?)?$/i)){
var tBod = document.getElementsByTagName("tbody");
for(tb = 0; tb < tBod.length; tb ++){
for(r = 2; r < tBod.item(tb).rows.length; r ++){
var tBodObj = tBod.item(tb).rows.item(r).cells.item(0);
if(tBodObj.className == "catbg" && tBodObj.colSpan == "5" && tBodObj.align != "right"){
var c = tabHTML + tBod.item(tb).firstChild.innerHTML + "</tr>";
var p = tBodObj.parentNode.innerHTML;
var tBodPar = tBod.item(tb).parentNode.parentNode.parentNode.parentNode.parentNode;
tBodPar.parentNode.innerHTML = tBodPar.parentNode.innerHTML.replace(p, c + p);
}
if(tBod.item(tb).rows.item(r).firstChild.id == "rr"){
tBod.item(tb).rows.item(r).style.display = "none";
}
}
}
}
//-->
</script>
-- The information center.
- i have noticed you information center isnt very good. its just the basic. so to get an advanced one please post this code in the Main footer also:
note: dont forget to modify the member of the month thing.
<script type="text/javascript">
<!--
/*
Info Center 102
created by Ross, Copyright - 2005
this code may not be reposted
support.proboards.com
keep this header intact at all times
*/
// Member of the month settings. Leave blank for none
var motm = [
"place member of the months username here!", // Member Username
"Place member of the months display username here" //Display Name
];
// For the 'Forum Age'. Enter the forums start date in the form of 'DD','MM','YYYY' or leave blank to not use this feature.
var startDate = ['3','10','2007'];
// The titles used on each section of the Info Center.
var titles = [
"Information Center",
"Forum Stats",
"Birthdays & Events",
"Members Online",
"Active Users Today"
];
var style = [
"#000000", // Color of the dividing lines
"dashed", // Style of the dividing lines
"Head Image URL", // Head image URL (Leave blank for none)
"Base Image URL" // base image URL (Leave blank for none)
];
//Edit the names of the staff groups, their corresponding group number(s) and an optional color for the group. Repeat the pattern for more groups.
var staff = []; var s = 0;
staff[s++] = ["Head Administrator","5","#669900"];
staff[s++] = ["Administrators","1","E3170D"];
staff[s++] = ["Global Moderators","2","5285FF"];
staff[s++] = ["Moderators","(3|4|8)","00AF33"];
// Do not edit below this line unless you know what you're doing
if(location.href.match(/\.com\/?(index.cgi)?\??(&?action=home)?(&?page=affiliates)?(#\w+)?$/)) {
var td = document.getElementsByTagName('td');
var div = document.createElement('div');
// Forum Age
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 += '.';
// Starting Totals
var updated = 0;
var boards = 0;
var categories = 0;
var subs = 0;
// Box Styles
var b = [];
b['r'] = 'border-right: '+style[0]+' '+style[1]+' 1px;';
b['l'] = 'border-left: '+style[0]+' '+style[1]+' 1px;';
b['b'] = 'border-bottom: '+style[0]+' '+style[1]+' 1px; padding-bottom: 5px;';
b['pad'] = 'padding-right: 10px; padding-left: 20px; padding-bottom: 5px; padding-top: -1px;';
b['sep'] = 'padding-right: 10px; padding-left: 10px;';
for (i=0; i<td.length; i++)
{
if(td.width == '66%' && td.className == 'windowbg2')
{
boards++;
if(td.innerHTML.match(/\((\d+) sub/))
subs += parseInt(RegExp.$1);
if(td[i-1].innerHTML.match(/\[\*\]/))
updated++;
}
else if(td.className=='catbg' && td.innerHTML.match(/a name/i))
categories++;
else if(td.innerHTML.match(/<b>Info Center<\/b>/i)
&& td.parentNode.parentNode.parentNode.className == 'bordercolor'
&& td.parentNode.parentNode.parentNode.width == '100%')
{
td.parentNode.parentNode.className = 'infocenter';
var iCell = td.getElementsByTagName('td');
var iHolder = '';
var posts = td.innerHTML.match(/Total Posts: (.+?)</)? parseInt(RegExp.$1.replace(/,/g,'')) : '';
var topics = td.innerHTML.match(/Total Topics: (.+?) &nb/)? parseInt(RegExp.$1.replace(/,/g,'')) : '';
var pb_date = td.item(2).getElementsByTagName('font').item(0).innerHTML.split(/<br>/i)[1];
if(pb_username == 'Guest')
var pms = 'Please <a href="?action=login">Login</a> to access this feature.';
else
var pms = 'You have <a href="?action=pm">'+ (td.item(2).innerHTML.match(/, (\d+) are new./)? +RegExp.$1+' Unread Messages</a>' : '1 Unread Message</a>');
var members = iCell[5].innerHTML.match(/Total Members: <a.+?>(.+?)<\/a>/i)? RegExp.$1 : 0;
var newmember = iCell[5].innerHTML.match(/Newest Member: (<a.+?>.+?<\/a>)/i)? RegExp.$1 : 'N/A';
var lastpost = iCell[4].innerHTML.match(/Last Updated Topic: (<a.+?>.+?<\/a>)( )?by /i)? RegExp.$1 : 'N/A';
var lastposter = iCell[4].innerHTML.match(/<\/a>\s?by (<a.+?>.+?<\/a>)\s?\(/i)? 'By the Member: '+RegExp.$1 : (iCell[4].innerHTML.match(/by\s(.+?)\s\(/)? 'By the Guest '+RegExp.$1 : 'N/A');
var lastdate = iCell[4].innerHTML.match(/(.+\)(.+)?)?\((.+?at.+?)\)<br>View/i)? RegExp.$3 : 'N/A';
var totals = [
(td.innerHTML.match(/(Total Posts: .+?)</)? RegExp.$1 : ''),
(td.innerHTML.match(/(Total Topics: .+?) &nb/)? RegExp.$1 : ''),
('Posts per Topic: '+ Math.round(posts / topics)),
('Posts per Board: '+ Math.round(posts / boards))
];
var stats = '<table width="100%"><tr><td width="100%" style="'+b['pad']+'">';
stats += '<div style="'+b['b']+'">';
for(t=0; t<totals.length; t++) {
stats += '<span style="'+b['sep']+'">'+totals[t]+'</span>';
if(totals[t+1])
stats += '-';
}
stats += '</div>';
stats += '<table width="100%"><tr><td width="40%" style="'+b['r']+'">';
stats += 'There are a total of '+members+' registered members.<br />';
stats += 'We would like to welcome '+newmember+' as the newest member to join '+document.title.split(/-/)[0];
stats += '</td><td width="30%" style="'+b['pad']+'">';
stats += 'The Last Post Made was: '+ lastpost+'<br />';
stats += 'Made On: '+lastdate+'<br />';
stats += lastposter;
stats += '</td></tr></table>';
stats += '</td></tr></table>';
iCell[0].getElementsByTagName('b').item(0).innerHTML = titles[0];
iCell[1].getElementsByTagName('b').item(0).innerHTML = titles[1];
iCell[3].innerHTML = stats;
iCell[3].colSpan = '2';
iCell[2].style.display = 'none';
// Head & Base Images
var infoTable = td.parentNode.parentNode.parentNode;
if(style[2].match(/^http:\/\//i)) {
var headCenter = document.createElement('center');
var headImg = document.createElement('img');
headImg.src = style[2];
headCenter.appendChild( headImg );
infoTable.parentNode.insertBefore(headCenter, infoTable)
}
if(style[3].match(/^http:\/\//i)) {
var baseCenter = document.createElement('center');
var baseImg = document.createElement('img');
baseImg.src = style[3];
baseCenter.appendChild( baseImg );
infoTable.parentNode.insertBefore(baseCenter, infoTable.nextSibling)
}
// Birthdays and Events
var events = '';
events += '<table width="100%"><tr><td width="100%" style="'+b['b']+'"><font size="1">';
var events_str = '';
var x = iCell.length - 5;
if(iCell[x].innerHTML.match(/action=calendarview/)) {
var totalEvents = iCell[x].getElementsByTagName('a').length;
var event_plural = (totalEvents == 1)? ['is',''] : ['are','s'];
events_str += '<tr><td width="100%" style="'+b['b']+'">';
events_str += 'There '+event_plural[0]+' '+totalEvents +' event'+event_plural[1]+' this month.';
events_str += '</td><tr><tr><td width="100%" style="'+b['pad']+'">';
events_str += iCell[x].innerHTML;
events_str += '</td><tr>';
iCell[x-2].style.display = 'none';
x-=4;
}
if(iCell[x].innerHTML.match(/((\d+) birthdays? today.)/)) {
var memberBirthdays = parseInt(RegExp.$1);
var allBirthdays = iCell[x].innerHTML.split(/<br>/i)[1];
if(iCell[x].innerHTML.match(/group\d+/)) {
var staffBirthdays = 0;
var a = iCell[x].getElementsByTagName('a');
for(l=0; l<a.length; l++) {
if(a.item(l).className) {
staffBirthdays++;
memberBirthdays--;
}
}
var staff_plural = (staffBirthdays == 1)? ['is',''] : ['are','s'];
events += 'There '+staff_plural[0]+' '+staffBirthdays+' staff member'+staff_plural[1]+' celebrating their birthday'+staff_plural[1]+' today. ';
}
if(memberBirthdays != 0) {
var member_plural = (memberBirthdays == 1)? ['is',''] : ['are','s'];
events += 'There '+member_plural[0]+' '+memberBirthdays+' member'+member_plural[1]+' celebrating their birthday'+member_plural[1]+' today. ';
}
if(memberBirthdays != 0 || staffBirthdays != 0) {
events += '</font></td></tr><tr><td width="100%" style="'+b['pad']+'">';
events += '<font size="1">'+allBirthdays;
}
iCell[x-2].style.display = 'none';
if(events_str.length > 0) {
iCell[x-1].parentNode.style.display = 'none';
iCell[x-3].parentNode.style.display = 'none';
}
else
x-=4;
}
if(events.length > 120 || events_str.length > 0) {
x+=4;
events += '</td></tr>'+ events_str +'</table>';
iCell[x-3].getElementsByTagName('b').item(0).innerHTML = titles[2];
iCell[x-1].colSpan = '2';
iCell[x-1].innerHTML = events;
}
// Users Online Today
var z = iCell.length - 1;
if(!iCell[z].innerHTML.match(/.\sMost users/)) {
var a = iCell[z].getElementsByTagName('a');
var onlineTotals = '';
for(j=0; j<a.length; j++) {
for(s=0; s<staff.length; s++) {
if(!staff[2])
staff[2] = '';
groupCount = (staff[3])? staff[3] : 0;
if(a[j].className && a[j].className.match(new RegExp('group'+staff[1]+'$'))) {
groupCount++;
}
staff[3] = groupCount;
}
}
var totalOn = 0;
for(s=0; s<staff.length; s++) {
staff[3] = (staff[3])? staff[3] : 0;
onlineTotals += '<font color="'+staff[2]+'">'+ staff[3] +' '+staff[0]+'</font><br />';
totalOn += parseInt(staff[3]);
}
iCell[z].innerHTML.match(/((\d+) Member(s)?),/)
onlineTotals += RegExp.$1 +'<br />';
totalOn += parseInt(RegExp.$2);
if(iCell[z].innerHTML.match(/((<a.+?>)?(\d+) Guest(s)?(<\/a>)?)</i)) {
onlineTotals += RegExp.$1 +'<br />';
totalOn += parseInt(RegExp.$3);
}
var usersOnline = '<table width="100%"><tr><td vAlign"top" width="28%" rowSpan="3" style="'+b['r']+'">';
usersOnline += onlineTotals;
usersOnline += '</td><td width="72%" style="'+b['pad']+b['b']+'">';
usersOnline += 'There have been '+totalOn+' members online today';
usersOnline += '</td></tr><tr><td vAlign="top" width="82%" style="'+b['pad']+'">';
usersOnline += iCell[z].innerHTML.split(/<br>/i)[1];
usersOnline += '</td></tr></table>';
iCell[z-3].getElementsByTagName('b').item(0).innerHTML = titles[4];
iCell[z-2].style.display = 'none';
iCell[z-1].colSpan = '2';
iCell[z-1].innerHTML = usersOnline;
z -= 4;
}
// Users Online
var a = iCell[z].getElementsByTagName('a');
var onlineTotals = '';
for(j=0; j<a.length; j++) {
for(s=0; s<staff.length; s++) {
if(!staff[2])
staff[2] = '';
if(!staff[3])
staff[3] = 0;
groupCount = (staff[4])? staff[4] : 0;
if(a[j].className && a[j].className.match(new RegExp('group'+staff[1]+'$'))) {
groupCount++;
}
staff[4] = groupCount;
}
}
var mostOn = iCell[z].innerHTML.match(/(M.{15}e was .+<br>)/i)? RegExp.$1 : '';
var totalOn = 0;
for(s=0; s<staff.length; s++) {
staff[4] = (staff[4])? staff[4] : 0;
onlineTotals += '<font color="'+staff[2]+'">'+ staff[4] +' '+staff[0]+'</font><br />';
totalOn += parseInt(staff[4]);
}
iCell[z].innerHTML.match(/((\d+) Member(s)?),/)
onlineTotals += RegExp.$1 +'<br />';
totalOn += parseInt(RegExp.$2);
if(iCell[z].innerHTML.match(/ ((\d+) Invisible) User(s)?./)) {
onlineTotals += RegExp.$1 + ' Member' + RegExp.$3 +'<br />';
totalOn += parseInt(RegExp.$2);
}
if(iCell[z].innerHTML.match(/((<a.+?>)?(\d+) Guest(s)?(<\/a>)?)(\.|\,)/i)) {
onlineTotals += RegExp.$1 +'<br />';
totalOn += parseInt(RegExp.$3);
}
var usersOnline = '<table width="100%"><tr><td vAlign"top" width="28%" rowSpan="3" style="'+b['r']+'">';
usersOnline += onlineTotals;
usersOnline += '</td><td width="72%" style="'+b['pad']+b['b']+'">';
usersOnline += 'There are currently '+totalOn+' members online. '+mostOn;
usersOnline += '</td></tr><tr><td vAlign="top" width="82%" style="'+b['pad']+b['b']+'">';
usersOnline += iCell[z].innerHTML.split(/<br>/i)[1];
usersOnline += '</td></tr><tr><td style="'+b['pad']+'">';
usersOnline += pms;
if(startDate[0] && startDate[0].match(/\d+/))
usersOnline += ' &nb'+'sp; - &nb'+'sp; Forum Age: '+age;
if(motm[0].match(/\w+/))
usersOnline += ' &nb'+'sp; - &nb'+'sp; The member of the month is <a href="?action=viewprofile&user='+motm[0]+'">'+motm[1]+'</a>';
usersOnline += '</td></tr></table>';
iCell[z-3].getElementsByTagName('b').item(0).innerHTML = titles[3];
iCell[z-2].style.display = 'none';
iCell[z-1].colSpan = '2';
iCell[z-1].innerHTML = usersOnline;
}
}
}
//-->
</script>
that is all i have for now. but i have many more good codes. so please follow what i said and yous site will be a lot better!
sincerily~Fastheart
--- Board/Catagory layout
--eye strain and readability
-the default skin is too dark and stuff is hard to read
-the catagories need to be spaced using the code below into the Main Footer:
<script type="text/javascript">
<!--
/*
Dividing Categories - Created by Peter
This code cannot be reposted anywhere other than SSDesigns or ProBoards Support.
This header must stay intact.
*/
// Size of the gap between categories
var gapSize = 25;
var tabHTML = '<td id="rr" colspan="5"></table></td></tr></table><div style="height:' + gapSize + '"></div><table width="100%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" width="100%"><tr>';
if(location.href.match(/\.com(\/|.+cgi(\?|#.+|\?\w+=home)?)?$/i)){
var tBod = document.getElementsByTagName("tbody");
for(tb = 0; tb < tBod.length; tb ++){
for(r = 2; r < tBod.item(tb).rows.length; r ++){
var tBodObj = tBod.item(tb).rows.item(r).cells.item(0);
if(tBodObj.className == "catbg" && tBodObj.colSpan == "5" && tBodObj.align != "right"){
var c = tabHTML + tBod.item(tb).firstChild.innerHTML + "</tr>";
var p = tBodObj.parentNode.innerHTML;
var tBodPar = tBod.item(tb).parentNode.parentNode.parentNode.parentNode.parentNode;
tBodPar.parentNode.innerHTML = tBodPar.parentNode.innerHTML.replace(p, c + p);
}
if(tBod.item(tb).rows.item(r).firstChild.id == "rr"){
tBod.item(tb).rows.item(r).style.display = "none";
}
}
}
}
//-->
</script>
-- The information center.
- i have noticed you information center isnt very good. its just the basic. so to get an advanced one please post this code in the Main footer also:
note: dont forget to modify the member of the month thing.
<script type="text/javascript">
<!--
/*
Info Center 102
created by Ross, Copyright - 2005
this code may not be reposted
support.proboards.com
keep this header intact at all times
*/
// Member of the month settings. Leave blank for none
var motm = [
"place member of the months username here!", // Member Username
"Place member of the months display username here" //Display Name
];
// For the 'Forum Age'. Enter the forums start date in the form of 'DD','MM','YYYY' or leave blank to not use this feature.
var startDate = ['3','10','2007'];
// The titles used on each section of the Info Center.
var titles = [
"Information Center",
"Forum Stats",
"Birthdays & Events",
"Members Online",
"Active Users Today"
];
var style = [
"#000000", // Color of the dividing lines
"dashed", // Style of the dividing lines
"Head Image URL", // Head image URL (Leave blank for none)
"Base Image URL" // base image URL (Leave blank for none)
];
//Edit the names of the staff groups, their corresponding group number(s) and an optional color for the group. Repeat the pattern for more groups.
var staff = []; var s = 0;
staff[s++] = ["Head Administrator","5","#669900"];
staff[s++] = ["Administrators","1","E3170D"];
staff[s++] = ["Global Moderators","2","5285FF"];
staff[s++] = ["Moderators","(3|4|8)","00AF33"];
// Do not edit below this line unless you know what you're doing
if(location.href.match(/\.com\/?(index.cgi)?\??(&?action=home)?(&?page=affiliates)?(#\w+)?$/)) {
var td = document.getElementsByTagName('td');
var div = document.createElement('div');
// Forum Age
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 += '.';
// Starting Totals
var updated = 0;
var boards = 0;
var categories = 0;
var subs = 0;
// Box Styles
var b = [];
b['r'] = 'border-right: '+style[0]+' '+style[1]+' 1px;';
b['l'] = 'border-left: '+style[0]+' '+style[1]+' 1px;';
b['b'] = 'border-bottom: '+style[0]+' '+style[1]+' 1px; padding-bottom: 5px;';
b['pad'] = 'padding-right: 10px; padding-left: 20px; padding-bottom: 5px; padding-top: -1px;';
b['sep'] = 'padding-right: 10px; padding-left: 10px;';
for (i=0; i<td.length; i++)
{
if(td.width == '66%' && td.className == 'windowbg2')
{
boards++;
if(td.innerHTML.match(/\((\d+) sub/))
subs += parseInt(RegExp.$1);
if(td[i-1].innerHTML.match(/\[\*\]/))
updated++;
}
else if(td.className=='catbg' && td.innerHTML.match(/a name/i))
categories++;
else if(td.innerHTML.match(/<b>Info Center<\/b>/i)
&& td.parentNode.parentNode.parentNode.className == 'bordercolor'
&& td.parentNode.parentNode.parentNode.width == '100%')
{
td.parentNode.parentNode.className = 'infocenter';
var iCell = td.getElementsByTagName('td');
var iHolder = '';
var posts = td.innerHTML.match(/Total Posts: (.+?)</)? parseInt(RegExp.$1.replace(/,/g,'')) : '';
var topics = td.innerHTML.match(/Total Topics: (.+?) &nb/)? parseInt(RegExp.$1.replace(/,/g,'')) : '';
var pb_date = td.item(2).getElementsByTagName('font').item(0).innerHTML.split(/<br>/i)[1];
if(pb_username == 'Guest')
var pms = 'Please <a href="?action=login">Login</a> to access this feature.';
else
var pms = 'You have <a href="?action=pm">'+ (td.item(2).innerHTML.match(/, (\d+) are new./)? +RegExp.$1+' Unread Messages</a>' : '1 Unread Message</a>');
var members = iCell[5].innerHTML.match(/Total Members: <a.+?>(.+?)<\/a>/i)? RegExp.$1 : 0;
var newmember = iCell[5].innerHTML.match(/Newest Member: (<a.+?>.+?<\/a>)/i)? RegExp.$1 : 'N/A';
var lastpost = iCell[4].innerHTML.match(/Last Updated Topic: (<a.+?>.+?<\/a>)( )?by /i)? RegExp.$1 : 'N/A';
var lastposter = iCell[4].innerHTML.match(/<\/a>\s?by (<a.+?>.+?<\/a>)\s?\(/i)? 'By the Member: '+RegExp.$1 : (iCell[4].innerHTML.match(/by\s(.+?)\s\(/)? 'By the Guest '+RegExp.$1 : 'N/A');
var lastdate = iCell[4].innerHTML.match(/(.+\)(.+)?)?\((.+?at.+?)\)<br>View/i)? RegExp.$3 : 'N/A';
var totals = [
(td.innerHTML.match(/(Total Posts: .+?)</)? RegExp.$1 : ''),
(td.innerHTML.match(/(Total Topics: .+?) &nb/)? RegExp.$1 : ''),
('Posts per Topic: '+ Math.round(posts / topics)),
('Posts per Board: '+ Math.round(posts / boards))
];
var stats = '<table width="100%"><tr><td width="100%" style="'+b['pad']+'">';
stats += '<div style="'+b['b']+'">';
for(t=0; t<totals.length; t++) {
stats += '<span style="'+b['sep']+'">'+totals[t]+'</span>';
if(totals[t+1])
stats += '-';
}
stats += '</div>';
stats += '<table width="100%"><tr><td width="40%" style="'+b['r']+'">';
stats += 'There are a total of '+members+' registered members.<br />';
stats += 'We would like to welcome '+newmember+' as the newest member to join '+document.title.split(/-/)[0];
stats += '</td><td width="30%" style="'+b['pad']+'">';
stats += 'The Last Post Made was: '+ lastpost+'<br />';
stats += 'Made On: '+lastdate+'<br />';
stats += lastposter;
stats += '</td></tr></table>';
stats += '</td></tr></table>';
iCell[0].getElementsByTagName('b').item(0).innerHTML = titles[0];
iCell[1].getElementsByTagName('b').item(0).innerHTML = titles[1];
iCell[3].innerHTML = stats;
iCell[3].colSpan = '2';
iCell[2].style.display = 'none';
// Head & Base Images
var infoTable = td.parentNode.parentNode.parentNode;
if(style[2].match(/^http:\/\//i)) {
var headCenter = document.createElement('center');
var headImg = document.createElement('img');
headImg.src = style[2];
headCenter.appendChild( headImg );
infoTable.parentNode.insertBefore(headCenter, infoTable)
}
if(style[3].match(/^http:\/\//i)) {
var baseCenter = document.createElement('center');
var baseImg = document.createElement('img');
baseImg.src = style[3];
baseCenter.appendChild( baseImg );
infoTable.parentNode.insertBefore(baseCenter, infoTable.nextSibling)
}
// Birthdays and Events
var events = '';
events += '<table width="100%"><tr><td width="100%" style="'+b['b']+'"><font size="1">';
var events_str = '';
var x = iCell.length - 5;
if(iCell[x].innerHTML.match(/action=calendarview/)) {
var totalEvents = iCell[x].getElementsByTagName('a').length;
var event_plural = (totalEvents == 1)? ['is',''] : ['are','s'];
events_str += '<tr><td width="100%" style="'+b['b']+'">';
events_str += 'There '+event_plural[0]+' '+totalEvents +' event'+event_plural[1]+' this month.';
events_str += '</td><tr><tr><td width="100%" style="'+b['pad']+'">';
events_str += iCell[x].innerHTML;
events_str += '</td><tr>';
iCell[x-2].style.display = 'none';
x-=4;
}
if(iCell[x].innerHTML.match(/((\d+) birthdays? today.)/)) {
var memberBirthdays = parseInt(RegExp.$1);
var allBirthdays = iCell[x].innerHTML.split(/<br>/i)[1];
if(iCell[x].innerHTML.match(/group\d+/)) {
var staffBirthdays = 0;
var a = iCell[x].getElementsByTagName('a');
for(l=0; l<a.length; l++) {
if(a.item(l).className) {
staffBirthdays++;
memberBirthdays--;
}
}
var staff_plural = (staffBirthdays == 1)? ['is',''] : ['are','s'];
events += 'There '+staff_plural[0]+' '+staffBirthdays+' staff member'+staff_plural[1]+' celebrating their birthday'+staff_plural[1]+' today. ';
}
if(memberBirthdays != 0) {
var member_plural = (memberBirthdays == 1)? ['is',''] : ['are','s'];
events += 'There '+member_plural[0]+' '+memberBirthdays+' member'+member_plural[1]+' celebrating their birthday'+member_plural[1]+' today. ';
}
if(memberBirthdays != 0 || staffBirthdays != 0) {
events += '</font></td></tr><tr><td width="100%" style="'+b['pad']+'">';
events += '<font size="1">'+allBirthdays;
}
iCell[x-2].style.display = 'none';
if(events_str.length > 0) {
iCell[x-1].parentNode.style.display = 'none';
iCell[x-3].parentNode.style.display = 'none';
}
else
x-=4;
}
if(events.length > 120 || events_str.length > 0) {
x+=4;
events += '</td></tr>'+ events_str +'</table>';
iCell[x-3].getElementsByTagName('b').item(0).innerHTML = titles[2];
iCell[x-1].colSpan = '2';
iCell[x-1].innerHTML = events;
}
// Users Online Today
var z = iCell.length - 1;
if(!iCell[z].innerHTML.match(/.\sMost users/)) {
var a = iCell[z].getElementsByTagName('a');
var onlineTotals = '';
for(j=0; j<a.length; j++) {
for(s=0; s<staff.length; s++) {
if(!staff
staff
groupCount = (staff
if(a[j].className && a[j].className.match(new RegExp('group'+staff
groupCount++;
}
staff
}
}
var totalOn = 0;
for(s=0; s<staff.length; s++) {
staff
onlineTotals += '<font color="'+staff
totalOn += parseInt(staff
}
iCell[z].innerHTML.match(/((\d+) Member(s)?),/)
onlineTotals += RegExp.$1 +'<br />';
totalOn += parseInt(RegExp.$2);
if(iCell[z].innerHTML.match(/((<a.+?>)?(\d+) Guest(s)?(<\/a>)?)</i)) {
onlineTotals += RegExp.$1 +'<br />';
totalOn += parseInt(RegExp.$3);
}
var usersOnline = '<table width="100%"><tr><td vAlign"top" width="28%" rowSpan="3" style="'+b['r']+'">';
usersOnline += onlineTotals;
usersOnline += '</td><td width="72%" style="'+b['pad']+b['b']+'">';
usersOnline += 'There have been '+totalOn+' members online today';
usersOnline += '</td></tr><tr><td vAlign="top" width="82%" style="'+b['pad']+'">';
usersOnline += iCell[z].innerHTML.split(/<br>/i)[1];
usersOnline += '</td></tr></table>';
iCell[z-3].getElementsByTagName('b').item(0).innerHTML = titles[4];
iCell[z-2].style.display = 'none';
iCell[z-1].colSpan = '2';
iCell[z-1].innerHTML = usersOnline;
z -= 4;
}
// Users Online
var a = iCell[z].getElementsByTagName('a');
var onlineTotals = '';
for(j=0; j<a.length; j++) {
for(s=0; s<staff.length; s++) {
if(!staff
staff
if(!staff
staff
groupCount = (staff
if(a[j].className && a[j].className.match(new RegExp('group'+staff
groupCount++;
}
staff
}
}
var mostOn = iCell[z].innerHTML.match(/(M.{15}e was .+<br>)/i)? RegExp.$1 : '';
var totalOn = 0;
for(s=0; s<staff.length; s++) {
staff
onlineTotals += '<font color="'+staff
totalOn += parseInt(staff
}
iCell[z].innerHTML.match(/((\d+) Member(s)?),/)
onlineTotals += RegExp.$1 +'<br />';
totalOn += parseInt(RegExp.$2);
if(iCell[z].innerHTML.match(/ ((\d+) Invisible) User(s)?./)) {
onlineTotals += RegExp.$1 + ' Member' + RegExp.$3 +'<br />';
totalOn += parseInt(RegExp.$2);
}
if(iCell[z].innerHTML.match(/((<a.+?>)?(\d+) Guest(s)?(<\/a>)?)(\.|\,)/i)) {
onlineTotals += RegExp.$1 +'<br />';
totalOn += parseInt(RegExp.$3);
}
var usersOnline = '<table width="100%"><tr><td vAlign"top" width="28%" rowSpan="3" style="'+b['r']+'">';
usersOnline += onlineTotals;
usersOnline += '</td><td width="72%" style="'+b['pad']+b['b']+'">';
usersOnline += 'There are currently '+totalOn+' members online. '+mostOn;
usersOnline += '</td></tr><tr><td vAlign="top" width="82%" style="'+b['pad']+b['b']+'">';
usersOnline += iCell[z].innerHTML.split(/<br>/i)[1];
usersOnline += '</td></tr><tr><td style="'+b['pad']+'">';
usersOnline += pms;
if(startDate[0] && startDate[0].match(/\d+/))
usersOnline += ' &nb'+'sp; - &nb'+'sp; Forum Age: '+age;
if(motm[0].match(/\w+/))
usersOnline += ' &nb'+'sp; - &nb'+'sp; The member of the month is <a href="?action=viewprofile&user='+motm[0]+'">'+motm[1]+'</a>';
usersOnline += '</td></tr></table>';
iCell[z-3].getElementsByTagName('b').item(0).innerHTML = titles[3];
iCell[z-2].style.display = 'none';
iCell[z-1].colSpan = '2';
iCell[z-1].innerHTML = usersOnline;
}
}
}
//-->
</script>
that is all i have for now. but i have many more good codes. so please follow what i said and yous site will be a lot better!
sincerily~Fastheart