Quote:
Originally posted by dost
Well, I'd really appreciate it if you could tell me how to make it so that it won't start a new thread when the subject is changed in replies
|
Well, if you really want it that way. What happens sometimes is that people will start a new thread by replying to a different message, which ends up putting it in the existing thread. Then when a reply is made on the forums, it doesn't have the same subject as you might be replying to. However, if you merge a thread together, it'll insert future replies correctly into the thread. I figured that if someone is going to change the subject, they are probably drifting off to another topic which merits new thread, and can be merged if by a moderator if it didn't.
Anyways, here's a change that I think will work, I haven't tested it though:
Replace this line:
Code:
$get_threadid=$DB_site->query("SELECT thread.threadid FROM thread,post WHERE thread.threadid=post.threadid and (thread.title='".addslashes($subject)."' OR post.title LIKE '%".addslashes($subject)."' OR thread.title='".addslashes($altsubject)."' OR post.title LIKE '%".addslashes($altsubject)."') and (post.msgid='".preg_replace("/\s/sU","' OR post.msgid='",addslashes(trim($message[references])))."') AND (thread.forumid=". implode(" OR thread.forumid=", $group[forum]) . ") ORDER BY post.dateline DESC LIMIT 1");
With this line:
Code:
$get_threadid=$DB_site->query("SELECT thread.threadid FROM thread,post WHERE thread.threadid=post.threadid and (post.msgid='".preg_replace("/\s/sU","' OR post.msgid='",addslashes(trim($message[references])))."') AND (thread.forumid=". implode(" OR thread.forumid=", $group[forum]) . ") ORDER BY post.dateline DESC LIMIT 1");
I'd give you a line number, but I don't have access to a real text editor at the moment. Be careful with this one, there is a query just a few lines down that is similar. This is the first one and comes right after "if ($message[references])".