Author |
Topic |
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 10 August 2004 : 09:15:04
|
I´m looking for a simple on/off posting feature, so that I can (as admin), check a box to whether a member should be able to post in the forum or not. As default this should be set to "on" of course.
Hope you understand where I´m going with this. |
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 13 August 2004 : 08:57:38
|
Maybe not that easy, I guess ?! |
|
|
Jezmeister
Senior Member
United Kingdom
1141 Posts |
Posted - 13 August 2004 : 09:12:47
|
possible no doubt, like the option thats already in the edit forum page to set allowed members?
|
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 13 August 2004 : 09:34:23
|
wii...isn't this the same as the 'lock forum' feature ? If a forum is locked, only moderators and the administrators cán post. If the forum is unlocked, everyone can post...
Just a thought. |
portfolio - linkshrinker - oxle - twitter |
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 13 August 2004 : 12:38:30
|
No really, because the feature I´m asking about is to set a specific member to not be able to post. It should not affect anyone else. |
|
|
cyber Knight
Starting Member
41 Posts |
Posted - 13 August 2004 : 17:48:35
|
I think he means something like the [mute member] mod in most of php forums.
|
|
|
Jezmeister
Senior Member
United Kingdom
1141 Posts |
Posted - 13 August 2004 : 19:04:28
|
im away over the weekend but i have nothing better to do, assuming noone beats me to it so ill have a go when i get back if ya want. |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
|
redbrad0
Advanced Member
USA
3725 Posts |
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 15 August 2004 : 10:08:55
|
The "muted" members are not allowed to anything but read the forum.
No editing, deleting, adding. |
|
|
cripto9t
Average Member
USA
881 Posts |
Posted - 15 August 2004 : 11:32:52
|
Would the member be "muted" in all forums or specified forums? I don't have the time to look into this right now. I'm just curious. |
_-/Cripto9t\-_ |
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 16 August 2004 : 02:51:13
|
Yes, in all forums. |
|
|
redbrad0
Advanced Member
USA
3725 Posts |
|
cripto9t
Average Member
USA
881 Posts |
Posted - 17 August 2004 : 15:53:45
|
Wii I worked out a quick something. It's not complete but it's a good start. There's not alot to it so I'll post it here. Look it over and see if it's something like you want.
- dbs file - Copy this code and save as dbs_mute.asp - then update database
Mute Mod
[ALTER]
MEMBERS
ADD#M_MUTE#smallint#NULL#1
[END]
- In inc_profile
find this code line 471
if rs("MEMBER_ID") = intAdminMemberID then
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Administrator</font>" & vbNewLine & _
" <input type=""hidden"" value=""3"" name=""Level"">" & vbNewLine
else
Response.Write " <select value=""1"" name=""Level"">" & vbNewLine & _
" <option value=""1"""
if rs("M_LEVEL") = 1 then Response.Write(" selected")
Response.Write ">Normal User</option>" & vbNewLine & _
" <option value=""2"""
if rs("M_LEVEL") = 2 then Response.Write(" selected")
Response.Write ">Moderator</option>" & vbNewLine & _
" <option value=""3"""
if rs("M_LEVEL") = 3 then Response.Write(" selected")
Response.Write ">Administrator</option>" & vbNewLine & _
" </select>" & vbNewLine
end if
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine
ADD this right after
'## Mute Mod ### ADD the code below ## If you remove this line ADD "& _" to the line above ################################################################################
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Mute Member: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ valign=""top"">" & vbNewLine & _
" <select value=""1"" name=""Mute"">" & vbNewLine & _
" <option value=""1"""
if rs("M_MUTE") = 1 then Response.Write(" selected")
Response.Write "> Off </option>" & vbNewLine & _
" <option value=""2"""
if rs("M_MUTE") = 2 then Response.Write(" selected")
Response.Write "> On </option>" & vbNewLine & _
" </select>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
'## End code add on ### THATS ALL OR INC_PROFILE ######################################################################################################
- In pop_profile
find this code line 958
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_AGE"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_DOB"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_MARSTATUS"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_SEX"
ADD this line right after
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_MUTE"
find this code line 1499
strSql = strSql & ", M_LEVEL = " & cLng("0" & Request.Form("Level"))
ADD this line right after
strSql = strSql & ", M_MUTE = " & cLng("0" & Request.Form("Mute"))
- In inc_func_common ADD this code close to the bottom, before the "%>"
function chkMute(mID)
dim strSql
dim rs
'## Forum_SQL
strSql ="SELECT MEMBER_ID "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE MEMBER_ID = " & clng(mID)
strSql = strSql & " AND M_MUTE = " & 1
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open strSql, my_Conn
if clng(mID) <> -1 then
if rs.BOF or rs.EOF then
chkMute = 0
else
chkMute = 1
end if
else
chkMute = 1
end if
rs.close
set rs = nothing
end function
Now to check for muted members use the chkMute function.
for example, if you don't want the posting icons displayed. In topic.asp adding chkMute to sub PostingOptions() would only show the post links to non-muted members.
sub PostingOptions()
if chkMute(MemberID) = 1 then
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
if (mlev = 4 or mlev = 3 or mlev = 2 or mlev = 1) or (lcase(strNoCookies) = "1") or (strDBNTUserName = "") then
Of course you need "end if" to close the statement.
Or if you don't want to mess with all the icons, you could add this to post.asp and redirect them somewhere else.
ADD right under include files
if chkMute(MemberID) <> 1 then
Response.Redirect "default.asp"
end if
I hope this helps
edit: 8/23/04 - found a bug in sql above. change '" & mID & "' to " & clng(mID) edit: 8/25/04 - replaced chkMute function above |
_-/Cripto9t\-_ |
Edited by - cripto9t on 25 August 2004 09:13:03 |
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 18 August 2004 : 03:08:27
|
Thanks
Maybe I should upload a testforum for this ? |
|
|
cripto9t
Average Member
USA
881 Posts |
Posted - 18 August 2004 : 06:49:42
|
quote: Originally posted by wii
Thanks
Maybe I should upload a testforum for this ?
Wii, I have some free time today. I'll work on this further and try to package it up today. Just a few more things to do in forum.asp and topic.asp. I think. |
_-/Cripto9t\-_ |
|
|
Topic |
|