Quote:
Originally posted by Martz
Works great! Thanks a lot. I'd like to change part of it slightly, instead of Super Moderators I would like to list all the members in another usergroup.
I'd also like to be able to show multiple user_id's in where the supermoderators list is - could anyone point me in the right direction please? 
|
Sorry I can't answer any of the other guys questions, but I found a "solution" to my own problems, so I thought I may as well be able to share them. Anything which I say which is *obvious* please don't flame me for, I'm just starting out as I am sure many other people may be.
The install script included has all the data regarding layout, table title (usergroup titles) etc. This can be edited to change the names, however I wans't sure of the routine to actually grab this using the userid from the mySQL table.
Secondly, including other groups in the listings can be done by editing the showmods source as follows:
At the top where the usergroups are defined, such as:
Code:
$supermod_usergroup = 5;
add as many new groups as you want, or change the current group value
Code:
$myother_usergroup = 10;
$alsomyother_usergroup = 9;
Next find the "// get administrators & super moderators *************************" section of code.
where:
Code:
WHERE user.usergroupid IN($admin_usergroup,$supermod_usergroup)
change to:
Code:
WHERE user.usergroupid IN($admin_usergroup,$supermod_usergroup,$myother_usergroup,$alsomyother_usergroup)
Next, further down find:
Code:
while ($user = $DB_site->fetch_array($users)) {
if ($user[usergroupid] == $admin_usergroup) {
if (($admincount++ % 2) == 0) $backcolor = "#EFEFEF";
else $backcolor = "#DEDEDE";
douserinfo();
eval("\$adminbits .= \"".gettemplate("showmods_adminbit")."\";");
}
else {
if (($smodcount++ % 2) == 0) $backcolor = "#EFEFEF";
else $backcolor = "#DEDEDE";
douserinfo();
eval("\$supermodbits .= \"".gettemplate("showmods_adminbit")."\";");
}
}
and change to:
Code:
while ($user = $DB_site->fetch_array($users)) {
if ($user[usergroupid] == $admin_usergroup) {
if (($admincount++ % 2) == 0) $backcolor = "#EFEFEF";
else $backcolor = "#DEDEDE";
douserinfo();
eval("\$adminbits .= \"".gettemplate("showmods_adminbit")."\";");
}
else if ($user[usergroupid] == $myother_usergroup) {
if (($smodcount++ % 2) == 0) $backcolor = "#EFEFEF";
else $backcolor = "#DEDEDE";
douserinfo();
eval("\$supermodbits .= \"".gettemplate("showmods_adminbit")."\";");
}
else if ($user[usergroupid] == $alsomyother_usergroup) {
if (($smodcount++ % 2) == 0) $backcolor = "#EFEFEF";
else $backcolor = "#DEDEDE";
douserinfo();
eval("\$supermodbits .= \"".gettemplate("showmods_adminbit")."\";");
}
else {
if (($smodcount++ % 2) == 0) $backcolor = "#EFEFEF";
else $backcolor = "#DEDEDE";
douserinfo();
eval("\$supermodbits .= \"".gettemplate("showmods_adminbit")."\";");
}
}
It works for me anyway! Hope this is of some help to someone, and not completely lame