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/Code)
 3.4 moderation email
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

kwoods
Starting Member

5 Posts

Posted - 11 October 2004 :  10:26:14  Show Profile
I am looking for a way to be notified when a new post/reply is sen with moderation turned on for all posts. I did see code for this for vers. 3.3

I have included the code but can't seem to get it to work.

I have forum subscriptions turned off and since some of the changes to the inc_subscription, I would assume I would have to turn it on?

Is there a way to add this to the post_info.asp for 3.4 and the other code to inc_moderation.asp?

any help would be appreciated!

Try this. *** DISCLAIMER *** this has NOT been tested AT all. Debug at your own risk.....

In post_info.asp, look for(line 695 in v3.3.03):

ProcessSubscriptions rs("Member_ID"), Cat_ID, Forum_ID, NewTopicID

add the following two lines right after:

else
NotifyModerators rs("MEMBER_ID"), Cat_ID, Forum_ID, NewTopicID


Then look for (line 805 in v3.3.03):
ProcessSubscriptions rs("Member_ID"), Cat_ID, Forum_ID, Topic_ID

add the following two lines right after:

else
NotifyModerators rs("Member_ID"), Cat_ID, Forum_ID, NewTopicID



Add the following code to the end of inc_subscriptions:

sub NotifyModerators(MemberId, ForumId, TopicId)
' -- If email is not turned on, exit
if strEmail = 0 then
exit sub
end if

' -- Get the topic title and Author nam
strSql = "SELECT T.T_SUBJECT, M.M_NAME FROM " & strTablePrefix & "TOPICS T, " & _
strMemberTablePrefix & "MEMBERS M " &_
" WHERE T.TOPIC_ID = " & TopicId & " " &_
" AND M.MEMBER_ID = " & MemberID

Set rsSub = Server.CreateObject("ADODB.Recordset")
rsSub.open strSql, my_Conn
if rsSub.EOF or rsSub.BOF then
TopicName = ""
MemberName = ""
Exit Sub
else
TopicName = rsSub("T_SUBJECT")
MemberName = rsSub("M_NAME")
end if
rsSub.Close
set rsSub = Nothing

'## Emails all users who wish to receive a mail if a topic or reply has been made. This sub will
'## check for subscriptions based on the topic, forum, category and across the board. It will
'## ignore the posting member.
strSql = "SELECT M.Member_ID, " & _
"M.M_NAME, M.M_EMAIL " & _
" FROM " & strMemberTablePrefix & "MEMBERS M" & _
", " & strTablePrefix & "MODERATOR FM" &_
" WHERE M.Member_ID = FM.Member_ID" & _
" AND FM.FORUM_ID = " & Forum_ID

Set rsLoop = Server.CreateObject("ADODB.Recordset")
rsLoop.open strSql, my_Conn
do while (not rsLoop.EOF) and (not rsLoop.BOF)
strRecipientsName = rsLoop("M_Name")
strRecipients = rsLoop("M_EMAIL")
strMessage = "Hello " & rsLoop("M_NAME") & vbNewline & vbNewline
strSubject = strForumTitle & " - Posting needs validated"
strMessage = strMessage & " A posting has been made to " & strForumTitle & " which needs approved. "
strMessage = strMessage & "Regarding the subject - " & TopicName & "." & vbNewline & vbNewline
strMessage = strMessage & "You can view the posting at " & strForumURL & "link.asp?TOPIC_ID=" & TopicId & vbNewline
%>
<!--#INCLUDE FILE="inc_mail.asp" -->
<%
rsLoop.MoveNext
loop
rsLoop.Close
set rsLoop = nothing
end sub


Like I said, this has NOT been tested, but should be OK. This will notify EVERY moderator regardless of whether they want to be notified or not.....


Dave Maxwell
--------------
Proud to be a "World Class" Knucklehead



Sic Parvis Magnum - Small Things Have Great Beginnings
re is the code:

  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07