The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
In response to this post, I wrote this mod to preclude new users from including hyperlinks.
The issue arises from minimum wage human spammers defeating the CAPTCHA and then posting spam immediately.
This mod adds two fields to the forum features (anti-spam days and anti-spam posts). If you choose to use minimum number of posts without days, then users must post at least that number of posts before they will be allowed to include a hyperlink in a post.
If you choose to use minimum number of days without posts, then the specified number of days must have passed since users registered before they will be allowed to include a hyperlink in a post.
If you choose to use both, each set of conditions must be met.
This is untested in a production server, but I'm sure it'll work without any issues; it's fairly simple.
The issue arises from minimum wage human spammers defeating the CAPTCHA and then posting spam immediately.
This mod adds two fields to the forum features (anti-spam days and anti-spam posts). If you choose to use minimum number of posts without days, then users must post at least that number of posts before they will be allowed to include a hyperlink in a post.
If you choose to use minimum number of days without posts, then the specified number of days must have passed since users registered before they will be allowed to include a hyperlink in a post.
If you choose to use both, each set of conditions must be met.
This is untested in a production server, but I'm sure it'll work without any issues; it's fairly simple.
Posted
but I'm sure it'll work without any issues; it's fairly simple.... famous last words.
Nice option to have handy.
Posted
Hello Carefree. the mod is installed but not working, I have no errors. I tested with a member name created by me and I put 10 messages before placing a link. the link is visible on the post and no alert message to say that it is forbidden
Cordially,
Maxime
Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)
Maxime
Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)
Posted
Did you set the limits on the admin features page?
Posted
Yes I put 10 messages
Cordially,
Maxime
Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)
Maxime
Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)
Posted
This is fantastic. All the spammers are gone -- I haven't deleted spam for five days straight, unlike before when I was deleting it every couple of hours.
But, there is one trick that at least one spammer has discovered: the signature field allows any links.
I can fix that myself, but thought I should let you know if you want to update your mod.
Great mod and absolutely needed. Thank you very much!
But, there is one trick that at least one spammer has discovered: the signature field allows any links.
I can fix that myself, but thought I should let you know if you want to update your mod.
Great mod and absolutely needed. Thank you very much!
Posted
Ok - for signatures:
"pop_profile.asp"
"pop_profile.asp"
Code:
Look for the following lines (appx 1333-1335):
if strSignatures = "1" then
strSql = strSql & " M_SIG = '" & ChkString(Request.Form("Sig"),"message") & "', "
end if
Change them to say:
if strSignatures = "1" then
' ## Anti-Spam Humans Below
If strAntiSpamDays > 0 or strAntiSpamPosts > 0 Then
strSqlP="SELECT M_POSTS, M_DATE FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID=" & MemberID
Set rsP=my_Conn.Execute(strSqlP)
If not rsP.EOF Then
strDays=rsP("M_DATE")
intPosts=rsP("M_POSTS")
rsP.Close
End If
Set rsP=Nothing
If strAntiSpamPosts > 0 Then
If intPosts<strAntiSpamPosts Then
If inStr(ChkString(Request.Form("Sig"),"message"), "http")>0 Then
Go_Result "Not authorized to post links.",0
Response.End
End If
End If
End If
If strAntiSpamDays > 0 Then
intDays=DateDiff("d",StrtoDate(strDays),Now())
If intDays<strAntiSpamDays Then
If inStr(ChkString(Request.Form("Sig"),"message"), "http")>0 Then
Go_Result "Not authorized to post links.",0
Response.End
End If
End If
End If
End If
' ## Anti-Spam Humans Above
strSql = strSql & " M_SIG = '" & ChkString(Request.Form("Sig"),"message") & "', "
end if
Posted
Carefree, you're awesome.
Suddenly, I received an error when people tried to make posts. I have no clue why it worked before.
post_info.asp
Error:
Changed to:
Suddenly, I received an error when people tried to make posts. I have no clue why it worked before.
post_info.asp
Error:
Code:
If strAntiSpamDays > 0 Then
intDays=DateDiff("d",StrtoDate(strDays),Date(Now))
If intDays<strAntiSpamDays Then
If inStr(txtMessage, "http")>0 Then
Go_Result "Not authorized to post links.",0
Response.End
End If
End If
End If
Changed to:
Code:
If strAntiSpamDays > 0 Then
intDays=DateDiff("d",StrtoDate(strDays),Now)
If intDays<strAntiSpamDays Then
If inStr(txtMessage, "http")>0 Then
Go_Result "Not authorized to post links.",0
Response.End
End If
End If
End If
Last edited by Astralis on 07 April 2014, 01:49
Posted
Originally posted by AstralisChange that to say this:Code:intDays=DateDiff("d",StrtoDate(strDays),Now)
Code:
intDays=DateDiff("d",StrtoDate(strDays),Now())
Posted
I was asked to install this for someone else and the code has two errors that prevent it from working effectively. I am posting the correct code below:
I've highlighted the parts that needed fixing, which comprise two fixes: using the correct mod variables to check for number of posts and number of days limits and the conversion of the variables to integers, before comparing them.
Code:
If strAntiSpamDays > 0 or strAntiSpamPosts > 0 Then
strSqlP="SELECT M_POSTS, M_DATE FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID=" & MemberID
Set rsP=my_Conn.Execute(strSqlP)
If not rsP.EOF Then
strDays=rsP("M_DATE")
intPosts=rsP("M_POSTS")
rsP.Close
End If
Set rsP=Nothing
If strAntiSpamPosts > 0 Then
If CInt(intPosts)<CInt(intAntiSpamPosts) Then
If inStr(txtMessage, "http")>0 Then
Go_Result fLang(strLangGatekeeper00170),0
Response.End
End If
End If
End If
If strAntiSpamDays > 0 Then
intDays=DateDiff("d",StrtoDate(strDays),Now())
If CInt(intDays)<CInt(intAntiSpamDays) Then
If inStr(txtMessage, "http")>0 Then
Go_Result fLang(strLangGatekeeper00170),0
Response.End
End If
End If
End If
End If
Posted
Thank you ruirib. The Snitz community is alive! I'm going to apply this change.
Email Member
Message Member
Post Moderation
FileUpload
If you're having problems uploading, try choosing a smaller image.
Preview post
Send Topic
Loading...