PDA

View Full Version : adding new group to show groups


dxb
11-11-2001, 01:05 PM
I'm trying to add one more group to the show groups page and this is what I did on showgroups.php file

after


$modinfo = '';


I added


$newgroup1 = '';


then I changed this



if ($usergroupid == 6) { // Admins
eval("\$admininfo .= \"".gettemplate("showgroups_adminbit")."\";");
} else if ($usergroupid == 5) { // Super Mods
eval("\$modinfo .= \"".gettemplate("showgroups_adminbit")."\";");
} else {
if (!$grouptitle[$usergroupid]) {
$grouptitle[$usergroupid] = $user['title'];
}
eval("\$groupinfo[$usergroupid] .= \"".gettemplate("showgroups_adminbit")."\";");
}


to look like this


if ($usergroupid == 6) { // Admins
eval("\$admininfo .= \"".gettemplate("showgroups_adminbit")."\";");
} else if ($usergroupid == 5) { // Super Mods
eval("\$modinfo .= \"".gettemplate("showgroups_adminbit")."\";");
} else if ($usergroupid == 9) { // New group
eval("\$newgroup1 .= \"".gettemplate("showgroups_adminbit")."\";");
} else {
if (!$grouptitle[$usergroupid]) {
$grouptitle[$usergroupid] = $user['title'];
}
eval("\$groupinfo[$usergroupid] .= \"".gettemplate("showgroups_adminbit")."\";");
}


and then I added this




if ($newgroup1) {
$groupname = 'New group';
$adminbits = $newgroup1;
eval("\$groupbits .= \"".gettemplate("showgroups_group")."\";");
}



after this



if ($admininfo) {
$groupname = 'Adminstrators';
$adminbits = $admininfo;
eval("\$groupbits .= \"".gettemplate("showgroups_group")."\";");
}



I'm a newbie to PHP and I hope somebody will help me out with this thing and will tell me what I missed out or where my mistakes are :)

Admin
11-11-2001, 01:12 PM
If you're using v2.2.0 (as it seems you are), you can go to Usergroups => Modify => [edit] => "Viewable on show groups page". :)

dxb
11-11-2001, 01:15 PM
hahahahaha

I feel so silly hahahahahah

I thought it's the same hack for showmods and I tried the same thing there I never thought there is an option in user group

anyway thanks firefly