Hi all, I installed WWF for the first time yesterday on a local test system and have been delving into the code already!
On my site, there is a requirement for moderators to be able to give paid up club members access to a private forum area. As I'd sussed that forum access is done by Groups in WWF, and I found only the Admin can change a user's group, I decided to do this MOD otherwise I'd be the only one able to change a users group!
So, in register.asp:
Find the code at line 1956:
'Only allow admin to change the member group
If blnAdmin Then
'Get the forum groups from the database so admin can change the members group
'Initlise SQL query
strSQL = "SELECT " & strDbTable & "Group.Group_ID, " & strDbTable & "Group.Name, " & strDbTable & "Group.Special_rank, " & strDbTable & "Group.Minimum_posts " & _
"FROM " & strDbTable & "Group" & strDBNoLock & ";" |
Then at line 1965 insert the following code:
Else
'Get the forum groups from the database so moderator can change the members group (limited groups available)
'Initlise SQL query
strSQL = "SELECT " & strDbTable & "Group.Group_ID, " & strDbTable & "Group.Name, " & strDbTable & "Group.Special_rank, " & strDbTable & "Group.Minimum_posts " & _
"FROM " & strDbTable & "Group" & strDBNoLock & " WHERE GROUP_ID > 3;"
End If |
Finally, at line 2022, remove or comment out the End if statement. That's it!!
To prevent a moderator promitng himself to admin status or any other use to moderator or admin, the new select statement filters out the admin, guest and moderator groups from the dropdown list. If you don't mind a moderator doing promotions to moderator simple change the where clause to GROUP_ID > 2.
Having done a lot of modding in Snitz before, I must say I'm very impressed with the code layout in WWF, very easy to find what you want. Thanks to all those involved in writing it!
Cheers!
|