The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
Ok be nice everyone first attempt at anything remotely like this.
Ok I asked Davio if I could take a shot at trying the email function on his mod. Basically I want to continue learning and this seemed like a great way and he was gracious enough to let me.
I would like to know where I have errored in my thinking on this cause I am sure there are many spots lol. Basically I have taken the original code for the emailing a person when their topic is moved and copied it and renamed the function DoAutoMoveEmailMerge and also have done this with the sub for this function. I will post code of this below. In my limited understanding of this and logic it seems like this should email someone if topic is merged.
This is the emailing function in post_info.asp
Here is the sub also in post_info.asp
If someone could just point me and help me understand this a little better I would greatly appreciate it.
Thanks All
Ok I asked Davio if I could take a shot at trying the email function on his mod. Basically I want to continue learning and this seemed like a great way and he was gracious enough to let me.
I would like to know where I have errored in my thinking on this cause I am sure there are many spots lol. Basically I have taken the original code for the emailing a person when their topic is moved and copied it and renamed the function DoAutoMoveEmailMerge and also have done this with the sub for this function. I will post code of this below. In my limited understanding of this and logic it seems like this should email someone if topic is merged.
This is the emailing function in post_info.asp
Code:
if MergeTopic then 'not implemented yet
'Send mail to author letting him know his topic was merged with another.
DoAutoMoveEmailMerge(allRec(Topic_ID, intOlderTopic))
strSql = "SELECT M.MEMBER_ID, M.M_NAME, M.M_EMAIL, T.FORUM_ID, T.T_SUBJECT "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strActivePrefix & "TOPICS T "
strSql = strSql & " WHERE M.MEMBER_ID = T.T_AUTHOR "
strSql = strSql & " AND T.TOPIC_ID = " & TopicNum
set rs2 = my_Conn.Execute (strSql)
email = rs2("M_EMAIL")
user_name = rs2("M_NAME")
Topic_Title = rs2("T_SUBJECT")
ForumId = rs2("FORUM_ID")
Usernum = rs2("MEMBER_ID")
rs2.close
strRecipientsName = user_name
strRecipients = email
strSubject = strForumTitle & " - Topic Moved"
strMessage = "Hello " & user_name & vbNewLine & vbNewLine
strMessage = strMessage & "Your posting on " & strForumTitle & "." & vbNewLine
strMessage = strMessage & "Regarding the subject - " & Topic_Title & "." & vbNewLine & vbNewLine
if not(chkForumAccess(ForumID,Usernum,false)) then
strMessage = strMessage & "Has been removed from public display. If you have any questions regarding this, please contact the Administrator of the forum" & vbNewLine
else
strMessage = strMessage & "Has been moved to a new forum, You can view it at " & vbNewLine & Left(Request.Form("refer"), InstrRev(Request.Form("refer"), "/")) & "topic.asp?TOPIC_ID=" & TopicNum & vbNewLine
end if
%>
<!--#INCLUDE FILE="inc_mail.asp" -->
<%
end if
'ProcessSubscriptions Reply_Author, Cat_ID, Forum_ID, NewTopicID, Moderation
else
Go_Result "That topic does not exist in the database. Make sure the url you entered has the correct ID of the topic.", 0
end if
'Response.End
Go_Result err_Msg, 1
Response.End
end ifHere is the sub also in post_info.asp
Code:
sub DoAutoMoveEmailMerge(TopicNum)
'## Emails Topic Author if Topic Moved.
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID," & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.M_EMAIL, " & strActivePrefix & "TOPICS.FORUM_ID, " & strActivePrefix & "TOPICS.T_SUBJECT "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strActivePrefix & "TOPICS "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strActivePrefix & "TOPICS.T_AUTHOR "
strSql = strSql & " AND " & strActivePrefix & "TOPICS.TOPIC_ID = " & TopicNum
set rs2 = my_Conn.Execute (strSql)
email = rs2("M_EMAIL")
user_name = rs2("M_NAME")
Topic_Title = rs2("T_SUBJECT")
ForumId = rs2("FORUM_ID")
Usernum = rs2("MEMBER_ID")
rs2.close
set rs2 = nothing
if lcase(strEmail) = "1" then
strRecipientsName = user_name
strRecipients = email
strSubject = strForumTitle & " - Topic Moved"
strMessage = "Hello " & user_name & vbNewLine & vbNewLine
strMessage = strMessage & "Your posting on " & strForumTitle & "." & vbNewLine
strMessage = strMessage & "Regarding the subject - " & Topic_Title & "." & vbNewLine & vbNewLine
if not(chkForumAccess(ForumID,Usernum,false)) then
strMessage = strMessage & "Has been removed from public display, If you have any questions regarding this, please contact the Administrator of the forum" & vbNewLine
else
strMessage = strMessage & "Has been moved to a new forum, You can view it at " & vbNewLine & Left(Request.Form("refer"), InstrRev(Request.Form("refer"), "/")) & "topic.asp?TOPIC_ID=" & TopicNum & vbNewLine
end if
%>
<!--#INCLUDE FILE="inc_mail.asp" -->
<%
end if
end subIf someone could just point me and help me understand this a little better I would greatly appreciate it.
Thanks All