inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Jul 27, 2006 15:18:43 GMT -8
Main Footer
This code allows you to display specific member groups in the info center. So rather than just "2 Staff Members", you could have "1 Administrator, 1 Moderator". Edit the stuff in blue. The bold number is the groups ID. To use more than one group, put: '(1|2)' as the group ID
<script type="text/javascript"> <!-- /* Extra Member Groups in Info Center - ross */
var groups = [  [3, 'Group Name'], [5, 'Group Name'] // No Comma on Last Line ];
if(location.href.match(/\.com\/?(index.cgi)?\??(&?action=home)?(#\w+)?$/)) { var table = document.getElementsByTagName('table'); for(i=table.length-1; i>-1; i--) { if(table.item(i).width == '98%' && table.item(i).cellPadding == '3' && table.item(i).innerHTML.match(/(, |>)(\d+) Members?,/i)) { var total_members = parseInt(RegExp.$2); var target = table.item(i).getElementsByTagName('font').item(0); var links = table.item(i).getElementsByTagName('a'); for(g=0; g<groups.length; g++) { var users_online = 0; for(l=0; l<links.length; l++) { if(links.item(l).className.match(new RegExp('group' + groups[g][0]))) { users_online++; total_members--; } } if(users_online != 1) { groups[g][1] += 's'; } target.innerHTML = target.innerHTML.replace(/(, |>)(\d+) Member(s)?,/, '$1' + users_online + ' ' + groups[g][1] + ', ' + total_members + ' Member$3,'); } } } } //--> </script>
|
|