Use of features by group - 09/28/2002 7:05 PM
Is there a way to restrict features by group, such as:
PM's
uploading
posting pics in threads
Search function
PM's
uploading
posting pics in threads
Search function
code:
#
# In search.php find this:
#
// -----------------
// Get the user info
$userob = new user;
$user = $userob -> authenticate("U_Groups");
if (!$user['U_Groups']) {
$user['U_Groups'] = "-4-";
}
#
# Change to this
#
// -----------------
// Get the user info
$userob = new user;
$user = $userob -> authenticate("U_Groups");
if (!$user['U_Groups']) {
$user['U_Groups'] = "-4-";
}
if (preg_match("/-5-/",$user['U_Groups'])) {
// change the -5- above to the number of the usergroup that is allowed to use search
#
# Find this:
#
if (!$debug) {
include("$thispath/templates/$tempstyle/search.tmpl");
}
$html -> send_footer();
#
# Change to:
#
if (!$debug) {
include("$thispath/templates/$tempstyle/search.tmpl");
}
}
else {
$html = new html;
$html -> not_right("Only Group XXXX can use the Search Feature.",$Cat);
}
$html -> send_footer();