Code:
// admincp/usergroup.php -+-+-+-+-+-+-+-+-+-+-+-+-+-+
// find -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// set default yes permissions (bitfields)
$ug_bitfield = array(
'showgroup' => 1, 'canview' => 1, 'canviewmembers' => 1,
'canviewothers' => 1, 'cagetattachment' => 1, 'cansearch' => 1,
'canmodifyprofile' => 1, 'canthreadrate' => 1, 'canpostattachment' => 1,
'canpostpoll' => 1, 'canvote' => 1, 'canwhosonline' => 1,
'allowhidden' => 1, 'showeditedby' => 1, 'canseeprofilepic' => 1,
'canusesignature' => 1
);
// set default numeric permissions
$usergroup = array(
'pmquota' => 0, 'pmsendmax' => 5, 'attachlimit' => 1000000,
'avatarmaxwidth' => 50, 'avatarmaxheight' => 50, 'avatarmaxsize' => 20000,
'profilepicmaxwidth' => 100, 'profilepicmaxheight' => 100, 'profilepicmaxsize' => 25000
);
// replace with -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// set default yes permissions (bitfields)
$ug_bitfield = array(
'showgroup' => 1, 'canview' => 1, 'canviewmembers' => 1,
'canviewothers' => 1, 'cagetattachment' => 1, 'cansearch' => 1,
'canmodifyprofile' => 1, 'canthreadrate' => 1, 'canpostattachment' => 1,
'canpostpoll' => 1, 'canvote' => 1, 'canwhosonline' => 1,
'allowhidden' => 1, 'showeditedby' => 1, 'canseeprofilepic' => 1,
'canusesignature' => 1, 'shoutview' => 1, 'shoutpost' => 1, 'shoutedit' => 1,
'shoutdelete' => 1, 'shouthdelete' => 0, 'shouteditothers' => 0,
'shoutdeleteothers' => 0, 'shouthdeleteothers' => 0, 'shoutip' => 0,
'shoutcoventry' => 0
);
// set default numeric permissions
$usergroup = array(
'pmquota' => 0, 'pmsendmax' => 5, 'attachlimit' => 1000000,
'avatarmaxwidth' => 50, 'avatarmaxheight' => 50, 'avatarmaxsize' => 20000,
'profilepicmaxwidth' => 100, 'profilepicmaxheight' => 100, 'profilepicmaxsize' => 25000,
'shouthierarchy' => 5, 'shoutmaxdaily' =>0
);
// find -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
if ($usergroupid != 1) // Guests can not post attachments
{
print_table_header($vbphrase['attachment_permissions']);
// add above -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
print_table_header($vbphrase['shoutbox_admin_permissions_title']);
print_yes_no_row($vbphrase['shoutbox_admin_permissions_canview'], 'usergroup[shoutview]', $ug_bitfield['shoutview']);
print_yes_no_row($vbphrase['shoutbox_admin_permissions_canshout'], 'usergroup[shoutpost]', $ug_bitfield['shoutpost']);
print_input_row($vbphrase['shoutbox_admin_permissions_maxdaily'], 'usergroup[shoutmaxdaily]', $usergroup[shoutmaxdaily]);
if ($usergroupid != 1) { // Allow guests to shout but do nothing else...
print_yes_no_row($vbphrase['shoutbox_admin_permissions_canedit'], 'usergroup[shoutedit]', $ug_bitfield['shoutedit']);
print_yes_no_row($vbphrase['shoutbox_admin_permissions_candelete'], 'usergroup[shoutdelete]', $ug_bitfield['shoutdelete']);
print_yes_no_row($vbphrase['shoutbox_admin_permissions_canhdelete'], 'usergroup[shouthdelete]', $ug_bitfield['shouthdelete']);
print_yes_no_row($vbphrase['shoutbox_admin_permissions_caneditothers'], 'usergroup[shouteditothers]', $ug_bitfield['shouteditothers']);
print_yes_no_row($vbphrase['shoutbox_admin_permissions_candeleteothers'], 'usergroup[shoutdeleteothers]', $ug_bitfield['shoutdeleteothers']);
print_yes_no_row($vbphrase['shoutbox_admin_permissions_canhdeleteothers'], 'usergroup[shouthdeleteothers]', $ug_bitfield['shouthdeleteothers']);
print_yes_no_row($vbphrase['shoutbox_admin_permissions_canip'], 'usergroup[shoutip]', $ug_bitfield['shoutip']);
print_yes_no_row($vbphrase['shoutbox_admin_permissions_coventry'], 'usergroup[shoutcoventry]', $ug_bitfield['shoutcoventry']);
if ($vboptions['shoutbox_enablehierarchy'] == 1) {
print_input_row($vbphrase['shoutbox_admin_permissions_hierarchy'], 'usergroup[shouthierarchy]', $usergroup['shouthierarchy']);
}
}
print_table_break();