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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD : Stopping double-posters
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

laser
Advanced Member

Australia
3859 Posts

Posted - 23 November 2004 :  06:29:47  Show Profile
I know this MOD won't appeal to everyone, but on the forums I administer we have rules to prohibit double-posting. Most of the moderators spend lots of time explaining what double-posting is, and how to avoid it. Well, some really bright spark (a young V8central editor called Dev) said tonight - why don't you change the code to prohibit them from doing it ?

So here it is, ONE simple change, and a whole lot of (now) lazy moderators. The file is post_info.asp, just find the lines that match (in black) and add the lines (the red ones) and take it for a spin !


	select case MethodType
		case "Topic"
			if (Forum_Type = 1) then
				Go_Result "You have attempted to post a New Topic to a Forum designated as a Web Link",0
			end if
			if (blnCStatus = 0) and (AdminAllowed = 0) then
				Go_Result "You have attempted to post a New Topic to a Locked Category", 0
			end if
			if (blnFStatus = 0) and (AdminAllowed = 0) then
				Go_Result "You have attempted to post a New Topic to a Locked Forum", 0
			end if
		case "EditTopic"
			if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (AdminAllowed = 0) then
				Go_Result "You have attempted to edit a Locked Topic", 0
			end if
		case "Reply", "ReplyQuote", "TopicQuote"
			if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (AdminAllowed = 0) then
				Go_Result "You have attempted to Reply to a Locked Topic", 0
			end if

			strSql = "SELECT T_LAST_POST_AUTHOR "
			strSql = strSql & " FROM " & strActivePrefix & "TOPICS "
			strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
			set rs = my_Conn.Execute (strSql)
			If MemberID = rs("T_LAST_POST_AUTHOR") Then
				Go_Result "You have attempted to double-post, please just edit your last post on this thread", 0
			end if
		
			rs.Close
			set rs = nothing


		case "Edit"
			if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (AdminAllowed = 0) then
				Go_Result "You have attempted to Edit a Reply to a Locked Topic", 0
			end if
	end select
	if strPrivateForums = "1" and ForumChkSkipAllowed = 0 then
		if not(chkForumAccess(Forum_ID,MemberID,false)) then
    			Go_Result "You do not have access to post to this forum", 0
  		end if
	end if
end if

' If Creating a new topic or reply, the subscription and moderation capabilities will need to be checked.

dayve
Forum Moderator

USA
5820 Posts

Posted - 23 November 2004 :  07:03:54  Show Profile  Visit dayve's Homepage
Not a bad idea.

Sometimes I find myself adding a reply to a thread where I was the last person that replied. I only do this if a significant amount of time has passed. I generally try to edit my posts if it is within a short period of time. I might do something like you did here, but only within a certain time-difference of the last and current post for the same user because we do have problems at our forum from time to time with people insisting they need to reply to themselves within seconds of eachother.

Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 23 November 2004 :  13:14:49  Show Profile  Visit muzishun's Homepage
dayve, if you get that working, I'd like to see the code for it as well. This is a great idea, laser. Though, like dayve, I would probably like to have some sort of time restriction to it.

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

sr_erick
Senior Member

USA
1318 Posts

Posted - 23 November 2004 :  13:48:34  Show Profile  Visit sr_erick's Homepage  Send sr_erick a Yahoo! Message
I thought you meant like double posting the same topic or exact same post multiple times. I'd like to see something which compares a post a person makes with thier last post. If they match, don't allow them to post. This would work good for those fools coming through with thier cut and paste advertising where they post it in like 10 forums and leave.




Erick
Snowmobile Fanatics

Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 23 November 2004 :  14:46:31  Show Profile
dayve & musishun00, you just need an AND clause in my new IF. I'll have a look at it later to see what I can do.
Go to Top of Page

Jorrit787
Average Member

Netherlands
681 Posts

Posted - 24 November 2004 :  08:08:26  Show Profile  Visit Jorrit787's Homepage  Send Jorrit787 an AOL message  Send Jorrit787 a Yahoo! Message
What a good idea This'll certainly help to stop spammers. I took the liberty of adding this line in order to disable the filter for Moderators and Admins:
If Not (mLev = 4) or (mLev = 3) Then
...

eXtremeGossip

Edited by - Jorrit787 on 24 November 2004 08:19:48
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 24 November 2004 :  13:00:40  Show Profile  Visit MarkJH's Homepage
quote:
I thought you meant like double posting the same topic or exact same post multiple times. I'd like to see something which compares a post a person makes with thier last post. If they match, don't allow them to post. This would work good for those fools coming through with thier cut and paste advertising where they post it in like 10 forums and leave.
That would make one heck of a useful MOD. Wouldn't be a cure but might prevent some of the lazier spammers.

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

CmptrDude1
Starting Member

6 Posts

Posted - 24 November 2004 :  21:47:56  Show Profile
This is a good idea... I don't like the idea of blocking out double-replying indefinitely. For my forums, if a reasonable amount of time has passed, I'm okay with replying multiple times in a row. I'll tweak around with this code and see if I can add some sort of DateDiff check to allow double posts after a certain amount of time.

Edit: I tweaked around with this and think I have a to get this to work. Here's my code:


If Not (mLev = 4) or (mLev = 3) Then
	'MOD: Disallow Double Replies
	strSql = "SELECT T_LAST_POST_AUTHOR, T_LAST_POST "
	strSql = strSql & " FROM " & strActivePrefix & "TOPICS "
	strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
	set rs = my_Conn.Execute (strSql)
	If MemberID = rs("T_LAST_POST_AUTHOR") And DateDiff("n",chkDate(rs("T_LAST_POST"),"",true),Date() & " " & Time()) < 60 Then
		Go_Result "You have attempted to make consecutive replies.  Please just edit your last post on this thread.", 0
	end if
					
	rs.Close
	set rs = nothing
	'/MOD
End If


The significant changes are highlighted in red. The number highlighted in blue specifies the amount of elapsed time (in minutes) before a member can make a consecutive reply.

Enjoy!

Edited by - CmptrDude1 on 24 November 2004 22:17:55
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 24 November 2004 :  21:57:00  Show Profile  Visit dayve's Homepage
I incorporated this mod. I allow Administrators and Moderators to consecutively post. I also allow members to have a consecutive post after 30 mintues


If Not (mLev = 4) or (mLev = 3) Then
 strSql = "SELECT T_LAST_POST_AUTHOR, T_LAST_POST "
 strSql = strSql & " FROM " & strActivePrefix & "TOPICS "
 strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
 set rs = my_Conn.Execute (strSql)
  LastPostTime = datediff("n",ChkDate(rs("T_LAST_POST"),"",true),strForumTimeAdjust)
   If MemberID = rs("T_LAST_POST_AUTHOR") and LastPostTime < 30 Then
	Go_Result "You have attempted to double-post, please just edit your last post on this thread ", 0
   end if		
 rs.Close
 set rs = nothing
End If


Edited by - dayve on 24 November 2004 21:59:28
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 24 November 2004 :  22:21:22  Show Profile  Visit dayve's Homepage
CmptrDude1, I guess you missed my post that was done 18 mintues prior

You should use strForumTimeAdjust and not Date() & " " & Time(). Some people have their forums time zones set differently.


Edited by - dayve on 24 November 2004 22:28:41
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 24 November 2004 :  23:20:08  Show Profile  Visit muzishun's Homepage
Thanks much guys!

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

rasure
Junior Member

289 Posts

Posted - 25 November 2004 :  09:48:10  Show Profile  Visit rasure's Homepage
quote:
Originally posted by dayve

I also allow members to have a consecutive post after 30 mintues



I take it you can change that time to suit your own needs, for example lest say I needed it for 24 hours would 1440 work as the minutes?

Psychic & Spiritual Development Resources
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 25 November 2004 :  11:59:39  Show Profile  Visit dayve's Homepage
quote:
Originally posted by rasure

quote:
Originally posted by dayve

I also allow members to have a consecutive post after 30 mintues



I take it you can change that time to suit your own needs, for example lest say I needed it for 24 hours would 1440 work as the minutes?


yes.

Go to Top of Page

rasure
Junior Member

289 Posts

Posted - 25 November 2004 :  12:52:14  Show Profile  Visit rasure's Homepage
thank you

Psychic & Spiritual Development Resources
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 25 November 2004 :  17:11:45  Show Profile  Visit masterao's Homepage
I added this mod to my forum, using dayve's version. I have noticed one thing which I didn't expect. If a member edits an earlier reply and then tries to post a new reply, it will trigger the double-post error message. I didn't expect this when I added the mod, but I see why it happens as this mod uses the lastpostdate and lastpostauthor fields.

Any suggestions on how to allow a member to edit previous replies and post a new reply without triggering the doublepost check?

Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 25 November 2004 :  21:26:52  Show Profile
In reality, they are still the lastpostauthor because if you click on the "jump to last post" link then you will go to their editted message (even if it's page 1 of a 10 page thread).

You could change the code to work the way you want, but I'll leave that for someone else to do. Good to see this mod getting a bit of mileage as well
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next 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.99 seconds. Powered By: Snitz Forums 2000 Version 3.4.07