Previous Thread
Next Thread
Print Thread
Rate Thread
#225519 09/28/2002 12:05 PM
Joined: Jul 2001
Posts: 442
Enthusiast
Enthusiast
Offline
Joined: Jul 2001
Posts: 442
Is there a way to restrict features by group, such as:

PM's
uploading
posting pics in threads
Search function

Sponsored Links
Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
You would have to put in group checks all over the place. This would be quite a bit of work in many files to get all these things checked.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Right,

Probably PM's and Searches would be easiest to restrict.

The others would involve lots of checks.

Joined: Jul 2001
Posts: 442
Enthusiast
Enthusiast
Offline
Joined: Jul 2001
Posts: 442
Anybody have a hack to disable the Search by group?

Last edited by coloradok5; 09/28/2002 10:07 PM.
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I've got an idea....

No promises.... but let me test something.

I think I can do this easily.

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
OK - here's how to restrict the Search function to a certain usergroup:
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();




You need to change the -5- to the usergroup number that is allowed to search. You also need to customize the 'not_right' message to whatever you like and/or move it to the language files if needed.

Could do something like that to restrict the sending of private messages.....
It would be more difficult to restrict the receiving of Private message.
But you could easily restrict the viewing of Private Messages.

How do you think that should be handled?

Joined: Jul 2001
Posts: 442
Enthusiast
Enthusiast
Offline
Joined: Jul 2001
Posts: 442
Thank's, I will try that right after I upgrade to 6.1, I think I will leave the PM thing alone because that would effect Members as well but I like the idea of reg users not being able to search, just another incentive to join.

Joined: Aug 2002
Posts: 27
User
User
Offline
Joined: Aug 2002
Posts: 27
How do I determine what a user group number is?
And how would the coding look for multiple groups i.e. Admins, moderators and users.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Run this SQL command from you admin menu...
substitute the exact group name.

It will then show you the Group number.


SELECT G_Id
FROM w3t_Groups
WHERE G_Name = 'groupnamehere'


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)