Mini-MOD: prevent moderators of changing forumtype - Postet den (1346 Views)
Retired Support Moderator
MarcelG
Innlegg: 2625
2625
Perhaps no one will use this feature ever, but I found a need for the following functionality.
I provide free forums at oxle, and paid 'private' forums. The forums are created by me, and I then assign the person who requested the forum as moderator for that forum.

All well, but, I want to make sure that no one requests a free forum, and changes it to 'Allowed members list' by themselves. However, as they're moderator, the base install gives them the right to change the Authentication Type.
So, to prevent that, I changed a small piece of post.asp. The original code: (post.asp of version 3.4.05, lines 1126 - 1141)
Code:
if strPrivateForums <> "0" then 
if strRqMethod = "Forum" or _
strRqMethod = "URL" or _
strRqMethod = "EditURL" or _
strRqMethod = "EditForum" then
if strRqMethod = "EditForum" or _
strRqMethod = "EditURL" then
ForumAuthType = rs("F_PRIVATEFORUMS")
else
ForumAuthType = 0
end if
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Auth Type:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """>" & vbNewLine & _
" <select readonly name=""AuthType"">" & vbNewLine & _
" <option value=""0"""

The new code (in red)
Code:
if strPrivateForums <> "0" then 
if strRqMethod = "Forum" or _
strRqMethod = "URL" or _
strRqMethod = "EditURL" or _
strRqMethod = "EditForum" then
if strRqMethod = "EditForum" or _
strRqMethod = "EditURL" then
ForumAuthType = rs("F_PRIVATEFORUMS")
else
ForumAuthType = 0
end if
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Auth Type:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """>" & vbNewLine & _
" <select readonly "
if mlev < 4 then
response.write " disabled "
end if
Response.Write "
name=""AuthType"">" & vbNewLine & _
" <option value=""0"""
Okay, I guess that with a manual HTTP post moderators can still change the authentication type, but this will keep out 99,999% of them. bigsmile<
   
 Sidestørrelse 
Postet den
Junior Member
spyderuk
Innlegg: 211
211
It took a while to find this in a search but I'd read this post already. This is just what I need as I'm appointing my first moderator and giving him a few forums to look after. I didn't want the moderator to be able to get into the forum properties and changing that stuff, just to moderate posts etc.
Seems this will do the trick. Thanks..wink<
Snitz 3.4.05. Mods Installed, Additional Smilies, Poll's, PM's, Email All Users, Today/Yesterday, Active Users 4, Portal Mod, My Own Google, Referer Mod, Avatars, Intergrated Conqueror Chat, Usergroups, IPGate, File Attachment Mod & Image Resize Mod. Next Mod? My Snitz Forum wink
Postet den
Junior Member
spyderuk
Innlegg: 211
211
Ok I miss read the description. I presume the code would be similar but where would it have to be put to stop Moderators from editing forum properties?<
Snitz 3.4.05. Mods Installed, Additional Smilies, Poll's, PM's, Email All Users, Today/Yesterday, Active Users 4, Portal Mod, My Own Google, Referer Mod, Avatars, Intergrated Conqueror Chat, Usergroups, IPGate, File Attachment Mod & Image Resize Mod. Next Mod? My Snitz Forum wink
 
Du må legge inn en melding