Post by Ross on Jan 18, 2006 17:52:49 GMT
Main Footer
<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 = [
"elindir", // Member Username
"Ross" //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 = ['28','06','2005'];
// The titles used on each section of the Info Center.
var titles = [
"Info Center",
"Forum Stats",
"Birthdays & Events",
"Members Online"
];
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++] = ["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)),
// ('Topics per Board: '+ Math.round(topics / boards)),
('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 += '<br /><a href="?action=recent">View Recent Posts</a>';
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
var z = iCell.length - 1;
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 mostOn = iCell[z].innerHTML.match(/(M.{15}e was .+<br>)/i)? RegExp.$1 : '';
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(/ ((\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>
Edit all or any of the parts in color. They all come with comment lines so just read what they're telling you to do. You may edit any part of the code within reason, basically a complete re-write and releasing it as your own code would be a big non no but just changing the wording of soemthing is fine. This is provided that you know what you're doing. I will not be held responsible if you try to edit it and it goes wrong.
The part highlighted in bold is the bit most people have trouble editing:
staff[s++] = ["Administrators","1","E3170D"];
staff[s++] = ["Global Moderators","2","5285FF"];
staff[s++] = ["Graphics Designers","(3|4|5)","00AF33"];
The parts in red are the names of each group. These will be the names used in the members online area.
The stuff in green is the optional group color. This will color the name of the group and nothing else; if you wish to edit the color of the members in the group, do so via 'Admin --> Modify Group --> Group Color'. Alternatively, you can leave this blank.
The blue represents the groups ID. This can be quite difficult to find so I think the easiest option is to go to modify the profile of someone in that group and copy this into the adress bar:
javascript:alert(document.modifyForm.membergroup.value);
The number that is alerted is that member groups ID. If you wish to group member groups together, do as I have done for 'Moderators' above. Put them all in brackets and seperate each ID with a '|' line.
Enjoy
Code Edits:
11th Feb, 2006 - I've (hopefully) fixed all the bugs with the forum age. I've also changed the way the birthdays/events are handled to try and rectifty problems with that too
24th Apr, 2006 - Just a little bug fix for the last poster username.
09th May 2007 - Added a link to the "Most recent posts" section
<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 = [
"elindir", // Member Username
"Ross" //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 = ['28','06','2005'];
// The titles used on each section of the Info Center.
var titles = [
"Info Center",
"Forum Stats",
"Birthdays & Events",
"Members Online"
];
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++] = ["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)),
// ('Topics per Board: '+ Math.round(topics / boards)),
('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 += '<br /><a href="?action=recent">View Recent Posts</a>';
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
var z = iCell.length - 1;
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 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>
Edit all or any of the parts in color. They all come with comment lines so just read what they're telling you to do. You may edit any part of the code within reason, basically a complete re-write and releasing it as your own code would be a big non no but just changing the wording of soemthing is fine. This is provided that you know what you're doing. I will not be held responsible if you try to edit it and it goes wrong.
The part highlighted in bold is the bit most people have trouble editing:
staff[s++] = ["Administrators","1","E3170D"];
staff[s++] = ["Global Moderators","2","5285FF"];
staff[s++] = ["Graphics Designers","(3|4|5)","00AF33"];
The parts in red are the names of each group. These will be the names used in the members online area.
The stuff in green is the optional group color. This will color the name of the group and nothing else; if you wish to edit the color of the members in the group, do so via 'Admin --> Modify Group --> Group Color'. Alternatively, you can leave this blank.
The blue represents the groups ID. This can be quite difficult to find so I think the easiest option is to go to modify the profile of someone in that group and copy this into the adress bar:
javascript:alert(document.modifyForm.membergroup.value);
The number that is alerted is that member groups ID. If you wish to group member groups together, do as I have done for 'Moderators' above. Put them all in brackets and seperate each ID with a '|' line.
Enjoy
Code Edits:
11th Feb, 2006 - I've (hopefully) fixed all the bugs with the forum age. I've also changed the way the birthdays/events are handled to try and rectifty problems with that too
24th Apr, 2006 - Just a little bug fix for the last poster username.
09th May 2007 - Added a link to the "Most recent posts" section