Previous Thread
Next Thread
Print Thread
Rate Thread
#220977 07/11/2002 4:46 PM
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
I'm working on a hack to add the following user privileges: profile-edit-enabled, pm-enabled and login-enabled.

profile-edit-enabled - if set, user can make changes in the My Home area. (This might need to be further broken down.)
pm-enabled - if set, user can send and receive private messages
login-enabled - if set, user can log in

I'm trying to figure out the best way to approach this. Here are some possibilities:

(1) Add three new columns to w3t_Users.

(2) Add the three new columns to w3t_Banned.

(3) Create a new table w3t_X_UserRestrictions, with these three columns, along with the username and/or user number. The rationale here is that normally users would have all these privileges, so only a small fraction of the users would require having a row in this table.

(4) Use the permission groups (somehow) to implement this functionality.

My design goals are to (A) minimize the amount of hacking required (to facilitate new-version-updates), (B) avoid database-compatibility issues with new versions, and (C) keep the script efficient.

What do you think is the best approach? Any feedback is welcome.

Sponsored Links
joeuser #220978 07/13/2002 11:27 AM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi Dave,

Not sure of the answer to your question, but I thought I'd add a functionality suggestion: if you're trying to put some partial controls in place for users, it might be useful to create a "Moderated" designation for users... in other words, instead of making a whole board "Moderated", you could designate posts from certain unruly users as requiring approval prior to display.

I would think that usergroups would be the most flexible way of approaching it, as it would require no database changes (I thinkg)

Cheers,
Max

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Moderating individual users is a good idea. However, right now I'm focusing on changes needed to support UBB.classic's feature set, so I'll defer that one.

I gave some thought to how to implement this with #4 (permission groups). For example, I could add a group "No private messages", and add users to that group to disable their private-message privileges. The private-message code would check for membership in that group. Similarly, I could add groups "No login" and "No profile editing". This appproach seems kind of ugly.

I'm leaning toward using (2) or (3). (3) would probably be less likely to cause conflicts with future versions.

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
You're right, it sounds like (2) is probably less disruptive.

If you do it with usergroups though, you probably would want to set up groups with the various combinations... ie
group A: No Login, No PM, no profile
group B: No Login, No PM, yes profile
etc.
which would probably get unwieldy if you have a lot of parameters.

Max



Joined: Mar 2002
Posts: 15
Newbie
Newbie
Offline
Joined: Mar 2002
Posts: 15
Being able to set a user to moderated would be extremely useful. It's less confrontational. Trying to keep someone from posting entirely turns into a cat and mouse game where they just become determined to find a way around it.

Greg

Sponsored Links
glen #220982 07/17/2002 10:02 AM
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
I agree.

Although an even better method for a determined troublemaker might be to make his posts visible only to himself.

As I mentioned above, right now I'm focusing only on porting UBB.classic features, which doesn't include moderating individual users. However, the method I'm using for storing the restrictions will be general enough to accomodate a "moderated" flag. The harder part would be the user interface.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Progress report:

I decided to go with #2.

I've added the following columns to w3t_Banned:
B_X_NoEditPost
B_X_NoEditProfile
B_X_NoMessage
B_X_NoPost
B_X_NoRate

And I've changed user::check_ban(), and all calls to it, to check these privileges. For example, if there's a row in w3t_Banned with B_Username='XYZ', B_X_NoPost='0' and B_X_NoMessage='1', then user XYZ can post, but not send private messages.

I wanted to add a B_X_NoLogin flag as well, but I had problems with that, as described here.


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
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 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)