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/O Code)
 An auto-post merge mod for double posts???
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 08 December 2006 :  14:27:31  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
well yeah but to me a double post is somthing that u do within the minute after a post, anything after that and it is more than likly a new reply/topic. if peopel are waiting until after that minute just to post a word or to add a sentence is just stupid. that is somthign i would expect from a silly 12 year old kid. and if thats the case then its down to moderation of the posts by the admins/mods<

© 1999-2010 MaD2ko0l
Go to Top of Page

CalloftheHauntedMaster
Junior Member

289 Posts

Posted - 08 December 2006 :  14:37:10  Show Profile  Reply with Quote
Nah, it's when people make a post. Have another idea and come back a few minutes later. This prevents that. Again, can someone write sample code for this?<

This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums!
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 08 December 2006 :  14:41:15  Show Profile  Visit JJenson's Homepage  Reply with Quote
Call didn't HuwR already say he would but it would be a little later?<
Go to Top of Page

CalloftheHauntedMaster
Junior Member

289 Posts

Posted - 08 December 2006 :  14:57:16  Show Profile  Reply with Quote
Yes, he did. But is there anything wrong with different versions of a mod?

After all, how many programmers does it take to screw in a light bulb?

Truth be told, no one knows. Here's my take on it. Five programmers. One to screw in the light bulb. One to make sure the coding on the bulb is correct. One to check the coding of the bulb. Another to make sure the bulb is properly screwed in. And a fifth to double check the other four.
<

This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums!
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 08 December 2006 :  18:38:17  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
Patience Is A Virtue<

© 1999-2010 MaD2ko0l
Go to Top of Page

CalloftheHauntedMaster
Junior Member

289 Posts

Posted - 09 December 2006 :  10:46:02  Show Profile  Reply with Quote
Sure is. Now we wait.<

This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums!
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 10 December 2006 :  08:53:27  Show Profile  Visit HuwR's Homepage  Reply with Quote
Ok, I haven't test this at all, so make sure you take a backup of post_info.asp before proceeding. It is a fairly basic attempt and may not do exactly what you wanted, but it is only a start and was just a quick attempt. it ONLY UPDATES REPLIES, so if someone posts a reply immediately after posting a topic it will NOT merge them, that would basically require rewriting most of post_info.asp to accomplish.

Once you have backed up your post_info.asp, you need to look for the section that starts with

'## Forum_SQL
strSql = "INSERT INTO " & strTablePrefix & "REPLY "

in a clean post_info.asp it will be around line 1005, you need to replace the whole section in between the '## Forum_SQL and the
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords line (about line 1050)

with the following code

'## Mod to merge double post replies
boolDoPost = true
' Did this user make the last post
strSqlCheck = "SELECT T_LAST_POST_REPLY_ID FROM " & strActivePrefix & "TOPICS "
strSqlCheck = strSqlCheck + "WHERE T_REPLIES > 0 AND T_LAST_POST_AUTHOR = " & rs("MEMBER_ID")
set rsDCheck = my_Conn.Execute (strSqlCheck)
if rsDCheck.EOF or rsDCheck.BOF then 'didn't double post so let's carry on normally
set rsDCheck = nothing
'## Mod to merge double post replies
strSql = "INSERT INTO " & strTablePrefix & "REPLY "
strSql = strSql & "(TOPIC_ID"
strSql = strSql & ", FORUM_ID"
strSql = strSql & ", CAT_ID"
strSql = strSql & ", R_AUTHOR"
strSql = strSql & ", R_DATE "
if strIPLogging <> "0" then
strSql = strSql & ", R_IP"
end if
strSql = strSql & ", R_STATUS"
strSql = strSql & ", R_SIG"
strSql = strSql & ", R_MESSAGE"
strSql = strSql & ") VALUES ("
strSql = strSql & Topic_ID
strSql = strSql & ", " & Forum_ID
strSql = strSql & ", " & Cat_ID
strSql = strSql & ", " & rs("MEMBER_ID")
strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'"
if strIPLogging <> "0" then
strSql = strSql & ", " & "'" & UserIPAddress & "'"
end if
' DEM --> Added R_STATUS to allow for moderation of posts
' Used R_STATUS = 1 to match the topic status code.
if Moderation = "Yes" then
strSql = strSql & ", 2"
else
strSql = strSql & ", 1"
end if
' DEM --> End of Code added
if Request.Form("sig") = "yes" and strDSignatures = "1" then
strSql = strSql & ", 1 "
else
strSql = strSql & ", 0 "
end if
strSql = strSql & ", " & "'" & txtMessage & "'"
strSql = strSql & ")"
'## Mod to merge double post replies
else
boolDoPost = false ' they double posted, lets update the last reply
strSql = "UPDATE " & strActivePrefix & "REPLY "
strSql = strSql & "SET R_MESSAGE = R_MESSAGE + '" & txtMessage & "' "
' DEM --> Added R_STATUS to allow for moderation of posts
' Used R_STATUS = 1 to match the topic status code.
if Moderation = "Yes" then
strSql = strSql & ",R_STATUS = 2 "
else
strSql = strSql & ",R_STATUS = 1 "
end if
strSql = strSql & "WHERE REPLY_ID=" & rsDCheck("T_LAST_POST_REPLY_ID")
set rsDCheck = nothing
'do the update
end if
'## Mod to merge double post replies


a couple of lines after the my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords , replace

if Moderation = "No" then
with
if Moderation = "No" and boolDoPost then




Now scroll down a bit further till you find this code

			'## Forum_SQL - Update Unmoderated post count
			strSql = "UPDATE " & strActivePrefix & "TOPICS "
			strSql = strSql & " SET T_UREPLIES = T_UREPLIES + 1 "
			strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
			my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords

and replace it with

			'## Forum_SQL - Update Unmoderated post count
			strSql = "UPDATE " & strActivePrefix & "TOPICS "
			strSql = strSql & " SET T_UREPLIES = T_UREPLIES + 1 "
			strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
			if boolDoPost then 'added for double post merge
				my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
			end if 'added for double post merge


I offer NO guarantees as to whether this will work or not as I do not have an asp forum running at the moment I can test it on



<
Go to Top of Page

CalloftheHauntedMaster
Junior Member

289 Posts

Posted - 10 December 2006 :  10:12:55  Show Profile  Reply with Quote
Well, I added it and got this error when trying to post:

Microsoft VBScript runtime error '800a01a8'

Object required: 'rsTCheck'

/bbs/post_info.asp, line 1856

Here's a text file of the post_info.asp without this code:

http://www.schoolofduel.com/bbs/post_info.txt<

This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums!
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 10 December 2006 :  11:51:59  Show Profile  Visit HuwR's Homepage  Reply with Quote
this line is wrong
if rsDCheck.EOF or rsTCheck.BOF then 'didn't double post so let's carry on normally

should be
if rsDCheck.EOF or rsDCheck.BOF then 'didn't double post so let's carry on normally<
Go to Top of Page

CalloftheHauntedMaster
Junior Member

289 Posts

Posted - 10 December 2006 :  13:03:35  Show Profile  Reply with Quote
Hm. Now I'm getting this error whenever I try to post:

ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/bbs/topic.asp, line 463


<

This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums!
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 10 December 2006 :  13:11:34  Show Profile  Visit HuwR's Homepage  Reply with Quote
quote:
I offer NO guarantees as to whether this will work or not as I do not have an asp forum running at the moment I can test it on
<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 10 December 2006 :  13:17:55  Show Profile  Visit HuwR's Homepage  Reply with Quote
just ran a quick test site up, and the code I posted works fine, so it is either something you have done wrong or something different in your post.asp, nothing I posted has anything to do with line 463 or any of the code near that line, so I would suggest you re-examine the code you changed.<
Go to Top of Page

CalloftheHauntedMaster
Junior Member

289 Posts

Posted - 10 December 2006 :  13:43:02  Show Profile  Reply with Quote
Fixed an error I made. Now I get this:

Microsoft OLE DB Provider for SQL Server error '80040e14'

Invalid operator for data type. Operator equals add, type equals ntext.

/bbs/post_info.asp, line 1914



What does this mean?<

This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums!
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 10 December 2006 :  13:59:22  Show Profile  Visit HuwR's Homepage  Reply with Quote
quote:
What does this mean?
I have no idea.

As I said above, I have tested this code on a virgin standard Snitz install and everything works without error, if you are getting errors it is either because you have inserted the code incorrectly or something else in your post_info.asp that is not standard, either way I can't help.<
Go to Top of Page

CalloftheHauntedMaster
Junior Member

289 Posts

Posted - 10 December 2006 :  14:44:15  Show Profile  Reply with Quote
Here is a text file of the post_info.asp as it looks like with your code (ignore the edited file name):

http://www.schoolofduel.com/bbs/post_info_edit.txt

Can you please check to make sure I didn't make a mistake in adding this code? I've looked over it twice and can't find anything wrong.

It is rather modded though.

Anyhow, your changes start at line 1851.<

This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums!
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07