<font size="1"><b>Credits:</b>This MOD is based on idea of ruirib in Small mod: Blocking forum email spam</font id="size1">
<b>Version 1.0
Snitz forum version 3.4.06</b>
This mod will prevent members to send an e-mail to other members until they reach certain number of posts or until admin allows them to do so. Usefull to block e-mail spammers while allowing admin to overide this for users he knows or recommended users. Override can be set in User profile. It will also send a message to the forum admin, notifying him of the spam attempt, so that the member can be blocked.
<b>Difficulty:</b> easy to implement
<font color="blue">1. In admin section go to Alternative mod setup and run this code:</font id="blue">
[ALTER]
MEMBERS
ADD#M_ALLOWEMAIL#SMALLINT##0
[END]
[UPDATE]
MEMBERS
M_ALLOWEMAIL#1#
[END]
[ALTER]
MEMBERS_PENDING
ADD#M_ALLOWEMAIL#SMALLINT##0
[END]
[UPDATE]
MEMBERS_PENDING
M_ALLOWEMAIL#1#
[END]
<font color="blue">2. in unmodified <b>pop_mail.asp</b> find this code (at around line 45):</font id="blue">
<font size="1">In red is number of posts member has to reach before allowed to send e-mail. Next version of this mod (if there is interest from people) can allow to set this value via admin menu, currently it has to be set in the code.</font id="size1">
<font color="blue">3. in <b>pop_mail.asp </b> look for this code (around line 102)</font id="blue">
if Request.QueryString("mode") = "DoIt" then
Err_Msg = ""
<font color="blue">and comment Err_Msg= "" so it looks like this:</font id="blue">
if Request.QueryString("mode") = "DoIt" then
<font color="green">'</font id="green">Err_Msg = ""
<font color="blue">4. In unmodified <b>pop_profile.asp</b> look for this code (around 969)</font id="blue">
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_QUOTE"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_BIO"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_SIG"
<font color="blue">and right <b>BELOW</b> these lines add this code</font id="blue">
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_ALLOWEMAIL"
<font color="blue">So it looks like this</font id="blue">
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_BIO"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_SIG"
<font color="green">strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_ALLOWEMAIL"</font id="green">
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS"
<font color="blue">5. In the same <b>pop_profile.asp</b> look for this (around 1586):</font id="blue">
if strBio = "1" then
strSql = strSql & ", M_BIO = '" & chkString(Request.Form("Bio"),"message") & "'"
end if
<font color="blue">and right BELOW these lines add this:</font id="blue">
strSQL = strSql & ", M_ALLOWEMAIL = " & cLng(Request.Form("allowemail"))
<font color="blue">so it looks like this</font id="blue">
if strBio = "1" then
strSql = strSql & ", M_BIO = '" & chkString(Request.Form("Bio"),"message") & "'"
end if
<font color="green">strSQL = strSql & ", M_ALLOWEMAIL = " & cLng(Request.Form("allowemail"))</font id="green">
strSql = strSql & " WHERE MEMBER_ID = " & cLng(Request.Form("MEMBER_ID"))
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
<font color="blue">6. in <b>inc_profile.asp</b> look for this code (around 532)</font id="blue">
if rs("M_LEVEL") = 3 then Response.Write(" selected")
Response.Write ">Administrator</option>" & vbNewLine & _
" </select>" & vbNewLine
end if
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine
<font color="blue">and right BELOW this add this code</font id="blue">
<font color="blue">so it looks like this</font id="blue">
And that's it. I hope you'll find it usefull, if you have any suggestions how to improve this, please let me know.