Author |
Topic |
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 10 December 2006 : 14:55:36
|
will take a look later, but don't have access to my editing stuff at the moment, am currently sat watching BBC Sports personality of the year< |
|
|
CalloftheHauntedMaster
Junior Member
289 Posts |
Posted - 10 December 2006 : 15:03:00
|
That's fine HuwR. Just let me know what I messed up with so I can get this working.
Thanks< |
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! |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 10 December 2006 : 15:39:56
|
from the error it would appear that your REPLY tables R_MESSAGE field is of type nText rather than Text as is standard for Snitz, which is why the code I posted is failing, it will need rewriting to work with an nText field< |
|
|
CalloftheHauntedMaster
Junior Member
289 Posts |
Posted - 10 December 2006 : 15:52:31
|
Is this something you could please do?
Again, if I was familiar with snitz, I'd do this myself. But, I'm not and that's the main reason I come to these forums for help.< |
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! |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 10 December 2006 : 16:16:43
|
try replacing the main block of code I posted previously with the one below.
Once again, can't guarentee it at all, I don't even have any Snitz code on this laptop, so am just taking a gues
One thing I did realise is that the code will still update the users post count, will post some code to fix that later when I am back on my main machine.< |
|
|
CalloftheHauntedMaster
Junior Member
289 Posts |
Posted - 10 December 2006 : 16:41:01
|
Well, no error messages this time. However, after I make a post, all posts in the topic disappear and the "Topic" bar appears twice.
Let me know what I can do to correct 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! |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 10 December 2006 : 17:15:25
|
I have absolutely no idea, all the code does that I posted is to update the last reply with the current posted text, it should have no other affect whatsoever. I'm sorry but I can not offer any further help, your code is not standard code and your database is not a standard database, I therefore have no way whatsoever of working out what your code is doing or why it would behave the way it does, sorry but you are on your own< |
|
|
CalloftheHauntedMaster
Junior Member
289 Posts |
Posted - 10 December 2006 : 17:18:09
|
Hm. Is this line correct: strSql = strSql & "(TOPIC_ID"
The database is a regular MS SQL. The code does seem to have been strangely modified before I became server admin.< |
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! |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 10 December 2006 : 17:29:01
|
your database is not a regular Snitz database if it was the R_MESSAGE field would be a TEXT not nTEXT field, as for 'Is this line correct: strSql = strSql & "(TOPIC_ID" ' I have no idea, since I don't know what line you are referring to, as I said, sorry but I can't help any further.< |
|
|
CalloftheHauntedMaster
Junior Member
289 Posts |
Posted - 14 December 2006 : 18:24:28
|
*sigh* thanks for the efforts.
Anyone familiar with the oddly modified code I have who is willing to try and help out? < |
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! |
|
|
kyodai
New Member
Azerbaijan
74 Posts |
Posted - 29 May 2009 : 18:17:55
|
SOrry to reply to such an old thread but this is the only one related to what i wanted to do. I like the idea of merging double posts, as it became quite common on my forums, on one site by spammers who just wanted to up their post count, then by newbies who simply didnt care to read rules or think about the edit button and then by people who want to "bump" their post up to top of the list.
Well to make it short - the posted solution here simply didnt work for me. No idea, but it's probably because i already got so many mods installed??? I really dont know much about asp so i tried to uderstand what the error was, but simply didnt get it. I fixed some mods that didn't work out-of-the-box yet, but here i really didnt get what was wrong.
So i made my own version from scratch, as good as i understand asp and after some trial and error it finally worked! No more double posts in my forums...
My Table is called FORUM_TOPICS, if you have another prefix you might want to change it. This is a very basic mod, but i think beside the table name it is very compatible with all other mods and addons.
All it does is checking whether the last post in the topic was by the current user and if yes and he tries to reply he will get an error message to rather use the edit button. I hope this helps some people.
Kyodai Anti Double Post Mod 1.0
Last Updated 05/29/2009
Description:
This mod simply disallows double posting, which means a member can't reply twice to a thread. If a member posts a
reply and then tries to post a second reply an error message appears that says "Sorry, double posting is not
allowed. Please use the edit button if you want to add information to your previous post."
Features:
Disallows double posting
Disables members to reply to their own topic if noone else has posted yet
Obviously also disables the typical "bumps" members do to get their Topic on top
Possible Features for future releases:
Maybe change this so instead of displaying the message it automatically merges the reply with the previous one.
Installation difficulty: 2 (1=Easy - 10=Hard)
###############
## INSTALLATION
###############
There are no files supplied with this mod as it is intended to edit your current file
Be sure to backup your file first!
####################################################################
## Post_info.asp
####################################################################
around line 1000 - find this:
if MethodType = "Reply" or MethodType = "ReplyQuote" or MethodType = "TopicQuote" then
'## Forum_SQL
below this add:
' Kyodai anti-double post
strSQL = "SELECT T_LAST_POST_AUTHOR FROM FORUM_TOPICS WHERE TOPIC_ID = " & Topic_ID
set rs = my_Conn.Execute (strSql)
if rs.BOF or rs.EOF then '## no result
rs.close
set rs = nothing
' "No Result"
else
myPostAuthor = rs("T_LAST_POST_AUTHOR")
rs.close
set rs = nothing
' Saved last Post Author name
end if
' end Kyodai Anti-double post
A few lines below that - find this:
err_Msg = "Invalid Password or User Name"
Go_Result(err_Msg), 0
Response.End
else
add this directly below:
'kyodai anti double post
MyMemberName = rs("MEMBER_ID")
'end kyodai anti-double post
Another few lines below find this:
if txtMessage = " " then
Go_Result "You must post a message!", 0
Response.End
end if
add this directly below:
'kyodai anti double post
if myPostAuthor = myMemberName then
rs.close
set rs = nothing
err_Msg = "Sorry, double posting is not allowed. Please use the edit button if you want to add
information to your previous post."
Go_Result(err_Msg), 0
Response.End
end if
'end kyodai anti-double post
|
Edited by - kyodai on 13 June 2009 17:09:34 |
|
|
kyodai
New Member
Azerbaijan
74 Posts |
Posted - 30 June 2009 : 16:23:38
|
On a side note: Afterwards i added an "if mLev < 3 then" to allow staff members to double post, because for staff sometimes it does make sense. AT least my staff complained about it, i added it and now users may not double post but staff does. Awwww I'm just the man for solutions... ^__^ |
|
|
Topic |
|