This Mod sends the author of a topic an email if the topic is moved.
Very simple Mod.
All changes to post_info.asp
at the top of the file, locate this code
if strAuthType = "db" then
strDBNTUserName = Request.Form("UserName")
end if
ADD the following imediately before it
Dim boolTopicMoved
boolTopicMoved = false
Now locate the following
if Request.Form("FORUM_ID") <> "" and Request.Form("FORUM_ID") <> aryForum(1) then
strSql = strSql & ", CAT_ID = " & aryForum(0)
strSql = strSql & ", FORUM_ID = " & aryForum(1)
end if
Change it to
if Request.Form("FORUM_ID") <> "" and Request.Form("FORUM_ID") <> aryForum(1) then
strSql = strSql & ", CAT_ID = " & aryForum(0)
strSql = strSql & ", FORUM_ID = " & aryForum(1)
boolTopicMoved = true
end if
Now scroll down a few lines till you find the
my_Conn.Execute(strSql)
Add the following code imediately after it
if booltopicmoved then
DoAutoMoveEmail(Request.Form("TOPIC_ID"))
end if
Now scroll down to the end of the file and insert the following sub before the closing %>
sub DoAutoMoveEmail(TopicNum)
'## Emails Topic Author if Topic Moved.
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.M_EMAIL, " & strTablePrefix & "TOPICS.T_SUBJECT "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "TOPICS "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "TOPICS.T_AUTHOR "
strSql = strSql & " AND " & strTablePrefix & "TOPICS.TOPIC_ID = " & TopicNum
set rs2 = my_Conn.Execute (strSql)
email = rs2("M_EMAIL")
user_name = rs2("M_NAME")
Topic_Title = rs2("T_SUBJECT")
rs2.close
if lcase(strEmail) = "1" then
strRecipientsName = user_name
strRecipients = email
strSubject = strForumTitle & " - Topic Moved"
strMessage = "Hello " & user_name & vbCrLf & vbCrLf
strMessage = strMessage & "Your posting on " & strForumTitle & "." & vbCrLf
strMessage = strMessage & "Regarding the subject - " & Topic_Title & "." & vbCrLf & vbCrLf
strMessage = strMessage & "Has been moved to a new forum, You can view it at " & vbCrLf & Left(Request.Form("refer"), InstrRev(Request.Form("refer"), "/")) & "link.asp?TOPIC_ID=" & TopicNum & vbCrLf
%>
<!--#INCLUDE FILE="inc_mail.asp" -->
<%
end if
end sub
That should be it.