Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Clearing posts from spammers
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 23 February 2009 :  09:47:14  Show Profile  Visit HuwR's Homepage
it needs to do an update count because it is not using the forum functions to remove the user and their posts, it is therefore necesary to recalculate the count totals after the deletion.


if you have so a lot of people spamming your topics then I would suggest you look at how they are getting in to do it, you should not be getting that many if your forum is setup and configured correctly.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 23 February 2009 :  10:00:47  Show Profile
quote:
With this mod http://forum.snitz.com/forum/topic.asp?whichpage=1&TOPIC_ID=66342 you still have the same problem, you still have to delete each entry in the forum, some can be in the hundreds.
Is it possible with this mod to include "delete all entries", now that would make life simple.


With a little code change, you can automate it. When this has been run, all topics and replies by the spammer will also have been deleted, and it will prompt you to run the count update. In pop_lock.asp, replace the ZapMember routine with this:

	case "ZapMember"
		strEncodedPassword = sha256("" & strPassword)
		mLev = cLng(ChkUser(strDBNTFUserName, strEncodedPassword,-1)) 
		if mLev > 0 then  '## is Member
			if (mLev = 4) and (cLng(chkCanLock(MemberID,Member_ID)) = 1) then
				'## Forum_SQL
				strSql = "DELETE * FROM " & strTablePrefix & "TOPICS WHERE T_REPLIES=0 AND T_AUTHOR="&Member_ID
				my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
				strSql = "DELETE * FROM " & strTablePrefix & "REPLY WHERE R_AUTHOR="&Member_ID
				my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
				strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
				strSql = strSql & " SET M_STATUS = 0, M_COUNTRY = '', M_HOMEPAGE = '', M_SIG = '', M_AIM = '', M_ICQ = '', "
				strSql = strSql & " M_MSN = '', M_YAHOO = '', M_FIRSTNAME = '', M_LASTNAME = '', M_OCCUPATION = '', M_SEX = '', "
				strSql = strSql & " M_DOB = '', M_HOBBIES = '', M_LNEWS = '', M_QUOTE = '', M_BIO = '', M_MARSTATUS = '', "
				strSql = strSql & " M_LINK1 = '', M_LINK2 = '', M_CITY = '', M_STATE = '', M_PHOTO_URL = '', M_RECEIVE_EMAIL = 0 "
				strSql = strSql & " WHERE MEMBER_ID = " & Member_ID 

				my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords

				Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """><b>Member Zapped!</b></font></p>" & vbNewLine & _
						"      <script language=""javascript1.2"">self.opener.location.reload();</script>" & vbNewLine
			else
				Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """><b>No Permissions to Zap a Member</b></font><br />" & _
						"<br /><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:onClick=history.go(-1)"">Go Back to Re-Authenticate</a></font></p>" & vbNewLine
			end if
		else
			Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """><b>No Permissions to Lock a Member</b></font><br />" & _
					"<br /><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:onClick=history.go(-1)"">Go Back to Re-Authenticate</a></font></p>" & vbNewLine
		end if
		Response.Write	"Topics and Replies have been deleted.  "&"<a href=""admin_count.asp"">Update Counts</a>"
<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 23 February 2009 :  10:02:46  Show Profile
quote:
Originally posted by sftah

Thanks Carefree: in what way would you change editors?


Sorry, missed this reply. I would just switch to one more friendly to asp (i.e., Ultraedit) that doesn't arbitrarily change links, etc.<
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 23 February 2009 :  10:53:52  Show Profile  Visit AnonJr's Homepage
There is a setting in Dreamweaver that will keep it from changing links like that - where it is depends on which version you are using.<
Go to Top of Page

sftah
New Member

United Kingdom
55 Posts

Posted - 23 February 2009 :  11:20:53  Show Profile  Visit sftah's Homepage
Thanks Carefree,
tried it, will not work, replaced this section with your string In pop_lock.asp, is this correct:


case "ZapMember"
strEncodedPassword = sha256("" & strPassword)
mLev = cLng(ChkUser(strDBNTFUserName, strEncodedPassword,-1))
if mLev > 0 then  '## is Member
if (mLev = 4) and (cLng(chkCanLock(MemberID,Member_ID)) = 1) then
'## Forum_SQL
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_STATUS = 0, M_COUNTRY = '', M_HOMEPAGE = '', M_SIG = '', M_AIM = '', M_ICQ = '', "
strSql = strSql & " M_MSN = '', M_YAHOO = '', M_FIRSTNAME = '', M_LASTNAME = '', M_OCCUPATION = '', M_SEX = '', "
strSql = strSql & " M_AGE = '', M_DOB = '', M_HOBBIES = '', M_LNEWS = '', M_QUOTE = '', M_BIO = '', M_MARSTATUS = '', "
strSql = strSql & " M_LINK1 = '', M_LINK2 = '', M_CITY = '', M_STATE = '', M_PHOTO_URL = '', M_RECEIVE_EMAIL = 0 "
	strSql = strSql & " WHERE MEMBER_ID = " & Member_ID

my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords

Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>
<b>Member Zapped!
</b></font></p>" & vbNewLine & _
"      <script language=""javascript1.2"">self.opener.location.reload();</script>" & vbNewLine
	else
Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & 
strHeaderFontSize & """ color=""" & strHiLiteFontColor & """><b>No Permissions to Zap a Member</b>
</font><br />" & _
	"<br /><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>
<a href=""JavaScript:onClick=history.go(-1)"">Go Back to Re-Authenticate</a></font></p>" & vbNewLine
	end if
	else
	Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace 
& """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>
<b>No Permissions to Lock a Member</b></font><br />" & _
	"<br />
<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>
<a href=""JavaScript:onClick=history.go(-1)"">Go Back to Re-Authenticate</a></font></p>" & vbNewLine

Edit: Added code tags

Note: for those doing the same, insert the script three posts above NOT THIS ONE<

Edited by - sftah on 23 February 2009 21:19:36
Go to Top of Page

sftah
New Member

United Kingdom
55 Posts

Posted - 23 February 2009 :  15:32:30  Show Profile  Visit sftah's Homepage
thats great it works, you can now delete as many spammers and all posts and only have to do a full update forum count as the last thing before logging off, bliss.<
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07