Moderator E-mail Notification - Posted (698 Views)
Starting Member
Velcrobelly
Posts: 4
4
Pardon me if this has already been covered, but I have not been able to locate this in the forum.
I would like my moderators to be notified via e-mail when someone posts a new topic for consideration. All categories have been set up so that the posts need approved before being displayed and I want the process to be as expedient as possible.
I am not seeing a setting for this notification anywhere. If they are supposed to be notified by e-mail by default, then I am wondering if there is something wrong with my setup.
Thanks in advance,
VB

]< Moved to MOD Add-On Forum (W/O Code) by Shaggy /><
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Average Member
SiSL
Posts: 671
671
So if I understand correctly, you want moderators of forum in question or admins for all forums to be notified via email, if you set "first posts to be moderated"<
Posted
Member Locked
laser
Posts: 3859
3859
Velcrobelly, this isn't standard functionality and I haven't heard of it being done, but you could tie it into the post_info.asp page if you need it.<
Posted
Average Member
SiSL
Posts: 671
671
There is this function if "Subscriptions" allowed on forum. However, if not, it does not email anything :(<
Posted
Starting Member
Velcrobelly
Posts: 4
4
SiSl,

You are correct. I have a low-trafic forum, but enough SPAM trafic gets through that it needs to be moderated. I would like to have an e-mail be sent to the moderator to let them know they need to check and confirm/deny the posting. The subscriptions feature doesn't really work the way I need it to for this situation, as it only e-mails 'after' the message has been approved and posted.
Laser,

Unfortunately, I am not a coder and am not sure how to tie it into the post_info.asp page. I can do a killer HTML page, but ASP is beyond me.<
Posted
Average Member
SiSL
Posts: 671
671
I will try to help you as soon as I can reach to my own computer that I have snitz on :) It is not really hard thing to do.. Do you like only for topics or replies as well?<
Posted
Average Member
SiSL
Posts: 671
671
My post_info.asp is modified so line numbers may not be exact, also if you open forum subscriptions, this may also email twice..
Find line around 941


Code:
		'## Forum_SQL - Add new post to Topics Table
strSql = "INSERT INTO " & strTablePrefix & "TOPICS (FORUM_ID"
strSql = strSql & ", CAT_ID"

Just paste below line "above" this before "end if"

Code:
		gonderen = rs("M_NAME")


Find this around line 1152

Code:
	ProcessSubscriptions rs("MEMBER_ID"), Cat_ID, Forum_ID, NewTopicID, Moderation

Paste below code "above" this:



Code:
		strSql = "SELECT MOD.FORUM_ID, MOD.MEMBER_ID, M.M_EMAIL, M.M_NAME, M.M_LEVEL, M.MEMBER_ID "
strSql = strSql & "FROM " & strTablePrefix & "MODERATOR MOD, " & strTablePrefix & "MEMBERS M WHERE "
strSql = strSql & "MOD.FORUM_ID = " & Forum_Id & " AND M.MEMBER_ID = MOD.MEMBER_ID AND M.M_LEVEL = 2"

Set rsModEmail = Server.CreateObject("ADODB.Recordset")
rsModEmail.open strSql, my_Conn

if rsModEmail.EOF or rsModEmail.BOF Then
' Do nothing
Else
allLarvaData = rsModEmail.GetRows(adGetRowsRest)
toplamLarva = UBound(allLarvaData,2)
End If

lForum_Id = allLarvaData(0, 0)
lMod_Member_id = allLarvaData(1, 0)
lMod_email = allLarvaData(2, 0)
lMod_name = allLarvaData(3, 0)


For iLarvaMod = 0 to toplamLarva

strRecipientsName = lMod_name
strRecipients = lMod_email
strSubject = strForumTitle & " - New Member Posting"
strMessage = strMessage & gonderen & " has posted to the " & strForumTitle & " board that you requested notification on. "

strMessage = strMessage & "Regarding the subject - " & txtSubject & "." & vbNewline & vbNewline
strMessage = strMessage & "You can view the posting at :" & vbcrlf & strForumURL & "topic.asp?TOPIC_ID=" & NewTopicID & vbNewline
%>
<!--#INCLUDE FILE="inc_mail.asp" -->
<%

Next


rsModEmail.close
set rsModEmail = nothing
<
Posted
Starting Member
Velcrobelly
Posts: 4
4
SiSL,

Thanks for the reply! Yes, this would be for all posts. We just have a lot of people posting advertisements in our forum.
I will let you know how it goes.<
Posted
Starting Member
Velcrobelly
Posts: 4
4
SiSL,

This works for initial posts just fine. What mods do I need to for the replies?<
Posted
Average Member
SiSL
Posts: 671
671

OK, here we go

Find this around 1172

Code:
if MethodType = "Reply" or MethodType = "ReplyQuote" or MethodType = "TopicQuote" then
'## Forum_SQL
strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, M_LASTPOSTDATE, " & strDBNTSQLname

Change last line like:

Code:
	strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, M_NAME, M_LASTPOSTDATE, " & strDBNTSQLname


(Forgot you should add M_NAME to previous as well)

Then find these lines around 1220:

Code:
		'## Forum_SQL
strSql = "INSERT INTO " & strTablePrefix & "REPLY "
strSql = strSql & "(TOPIC_ID"


Add this above those lines:

Code:
		gonderen = rs("M_NAME")

Aroudn 1319 find this:

Code:
	ProcessSubscriptions rs("MEMBER_ID"), Cat_ID, Forum_ID, Topic_ID, Moderation

Add following above it:

Code:
		strSql = "SELECT MOD.FORUM_ID, MOD.MEMBER_ID, M.M_EMAIL, M.M_NAME, M.M_LEVEL, M.MEMBER_ID "
strSql = strSql & "FROM " & strTablePrefix & "MODERATOR MOD, " & strTablePrefix & "MEMBERS M WHERE "
strSql = strSql & "MOD.FORUM_ID = " & Forum_Id & " AND M.MEMBER_ID = MOD.MEMBER_ID AND M.M_LEVEL = 2"

Set rsModEmail = Server.CreateObject("ADODB.Recordset")
rsModEmail.open strSql, my_Conn

if rsModEmail.EOF or rsModEmail.BOF Then
' Do nothing
Else
allLarvaData = rsModEmail.GetRows(adGetRowsRest)
toplamLarva = UBound(allLarvaData,2)
End If

lForum_Id = allLarvaData(0, 0)
lMod_Member_id = allLarvaData(1, 0)
lMod_email = allLarvaData(2, 0)
lMod_name = allLarvaData(3, 0)


For iLarvaMod = 0 to toplamLarva

strRecipientsName = lMod_name
strRecipients = lMod_email
strSubject = strForumTitle & " - New Member Posting"
strMessage = strMessage & gonderen & " has posted to the " & strForumTitle & " board that you requested notification on. "

strMessage = strMessage & "Regarding the subject - " & txtSubject & "." & vbNewline & vbNewline
strMessage = strMessage & "You can view the posting at :" & vbcrlf & strForumURL & "topic.asp?whichpage=-1&TOPIC_ID=" & Topic_ID & "&REPLY_ID=" & NewReplyID & vbNewline
%>
<!--#INCLUDE FILE="inc_mail.asp" -->
<%

Next


rsModEmail.close
set rsModEmail = nothing
<
Posted
Starting Member
Brachole
Posts: 33
33
I get the following message when trying to post after the 1st MOD:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'MOD.FORUM_ID'.

/Forum/post_info.asp, line 924


My line 924 is:

rsModEmail.open strSql, my_Conn

if rsModEmail.EOF or rsModEmail.BOF Then
' Do nothing
Else
allLarvaData = rsModEmail.GetRows(adGetRowsRest)
toplamLarva = UBound(allLarvaData,2)
End If

lForum_Id = allLarvaData(0, 0)
lMod_Member_id = allLarvaData(1, 0)
lMod_email = allLarvaData(2, 0)
lMod_name = allLarvaData(3, 0)<
You Must enter a message