Email content - نوشته شده در (5581 Views)
Starting Member
elvis711
مطلب: 6
6
New guy here--I inherited our forums and am in no way shape or form a programmer. I am wanting to know if it is possible to modify what is sent to subscribers when a post/reply is made? Currently the forum subject is sent. My subscribers are asking if the forum "message" can include the actual message, instead of just the subject. Thanks for any assistance<
new guy
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Support Moderator
Shaggy
مطلب: 6780
6780
Yes, it's possible; the file you need to edit is inc_subscription.asp and a wuick search will provide you with a few topics explaining the changes that need to be made.
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
نوشته شده در
Junior Member
PPSSWeb
مطلب: 312
312
Below is the code I used in the past. I found that it encouraged people to NOT visit the forums though as they would just read the email and only go to the forums if they chose to reply, so I have removed it.
Code:
To add or modify the email subject/body for subscription notifications

Change the section of inc_subscription.asp starting at line 171 to

=====================================================================================================================
if LoopTopicID > 0 then
' strSubject = strForumTitle & " - Reply to a posting"
' strMessage = strMessage & MemberName & " has replied to a topic on " & strForumTitle & " that you requested notification to. "

strSubject = strForumTitle & " - Reply to a posting in " & ForumName & " - " & TopicName
strMessage = strMessage & MemberName & " has replied to the topic '" & TopicName & "' on the forum '" & ForumName & "' at " & strForumTitle & " that you requested notification on. " & vbNewline & vbNewline
strMessage = strMessage & "Subject: " & TopicName & vbNewline & vbNewline
' strMessage = strMessage & "Message: " & vbNewline & "==========================" & vbNewline
' strMessage = strMessage & StripCode(strNewMessage) & vbNewline & "==========================" & vbNewline & vbNewline & vbNewline

else
' strSubject = strForumTitle & " - New posting"
' strMessage = strMessage & MemberName & " has posted to the forum '" & ForumName & "' at " & strForumTitle & " that you requested notification on. "

strSubject = strForumTitle & " - New posting in " & ForumName & " - " & TopicName
strMessage = strMessage & MemberName & " has posted the following to the forum '" & ForumName & "' at " & strForumTitle & " that you requested notification on. " & vbNewline & vbNewline
strMessage = strMessage & "Subject: " & TopicName & vbNewline & vbNewline
' strMessage = strMessage & "Message: " & vbNewline & "==========================" & vbNewline
' strMessage = strMessage & StripCode(strNewMessage) & vbNewline & "==========================" & vbNewline & vbNewline & vbNewline

end if
else
' strSubject = strForumTitle & " - New posting"
' strMessage = strMessage & MemberName & " has posted to the category '" & CatName & "' at " & StrForumTitle & " that you requested notification on. "

strSubject = strForumTitle & " - New posting in " & ForumName & " - " & TopicName
strMessage = strMessage & MemberName & " has replied to the topic '" & TopicName & "' on the forum '" & ForumName & "' in the category '" & CatName & "' at " & strForumTitle & " that you requested notification on. " & vbNewline & vbNewline
strMessage = strMessage & "Subject: " & TopicName & vbNewline & vbNewline
' strMessage = strMessage & "Message: " & vbNewline & "==========================" & vbNewline
' strMessage = strMessage & StripCode(strNewMessage) & vbNewline & "==========================" & vbNewline & vbNewline & vbNewline

end if
else
strSubject = strForumTitle & " - New posting"
strMessage = strMessage & MemberName & " has posted to the " & strForumTitle & " board that you requested notification on. "
end if
' strMessage = strMessage & "Regarding the subject - " & TopicName & "." & vbNewline & vbNewline
strMessage = strMessage & "You can view the posting at " & strForumURL & "topic.asp?TOPIC_ID=" & TopicId & vbNewline

=====================================================================================================================


To remove html/forumcode from the email body for subscription notifications

Include the following function in the inc_subscription.asp file. This removes all content between braces [] [/] and <></> repectively

======================================================================================================================
Function StripCode(ByVal fString)
if fString = "" or IsNull(fString) then
fString = " empty string test"
elseif strAllowForumCode = "1" then
'filter out forumcode
fStringLeft = ""
fFound = False
Do While InStr(fString, "[")
fFound = True
fStringLeft = fStringLeft & " " & Left(fString, InStr(fString, "[")-1)
fString = MID(fString, InStr(fString, "]") + 1)
Loop
StripCode = fStringLeft & fString
If Not fFound Then StripCode = fString
elseif strAllowHTML = "1" then
' filter out html code

fStringLeft = ""
fFound = False
Do While InStr(fString, "<")
fFound = True
fStringLeft = fStringLeft & " " & Left(fString, InStr(fString, "<")-1)
fString = MID(fString, InStr(fString, ">") + 1)
Loop
StripCode = fStringLeft & fString
If Not fFound Then StripCode = fString
end if
if strBadWordFilter = "1" then
fString = ChkBadWords(fString)
end if
StripCode = fString
End Function
<
نوشته شده در
Starting Member
elvis711
مطلب: 6
6
Thank you for your immediate and awesome response. I have passed this onto our developer.<
new guy
نوشته شده در
Starting Member
elvis711
مطلب: 6
6
new guy
نوشته شده در
Forum Moderator
AnonJr
مطلب: 5768
5768
There is no "attach" option, but you could save it as a .txt file and link to it. wink
At the very least, use the [scrollcode] tags around your code...<
نوشته شده در
Junior Member
TastyNutz
مطلب: 251
251
If people want everything in email, why bother with a forum at all? A listserv will serve the purpose.<
نوشته شده در
Starting Member
elvis711
مطلب: 6
6
Only about a third of the people want just the e-mail, everyone else is ok navigating to the forum and reading the message<
new guy
نوشته شده در
Forum Moderator
AnonJr
مطلب: 5768
5768
Funny this would pop back up as I'm reading a chapter on "Tough Love"...<
نوشته شده در
Starting Member
sokkmonkey
مطلب: 5
5
Originally posted by TastyNutz
If people want everything in email, why bother with a forum at all? A listserv will serve the purpose.

I work with a group of diverse demographics and ages.. While 70% understand the forum concept.. 30% still think the internet is a series of tubes.. I need to make sure they get some forum posts because they forget to check/ log on/ whatever.<
نوشته شده در
Starting Member
desmo907
مطلب: 19
19
I tried adding the first set of code below; replacing the code from line 171-189 and got an internal server error. I am not a programmer so suspect I am doing something wrong.
Thoughts?
Originally posted by PPSSWeb
Below is the code I used in the past. I found that it encouraged people to NOT visit the forums though as they would just read the email and only go to the forums if they chose to reply, so I have removed it.
Code:
To add or modify the email subject/body for subscription notifications

Change the section of inc_subscription.asp starting at line 171 to

=====================================================================================================================
if LoopTopicID > 0 then
' strSubject = strForumTitle & " - Reply to a posting"
' strMessage = strMessage & MemberName & " has replied to a topic on " & strForumTitle & " that you requested notification to. "

strSubject = strForumTitle & " - Reply to a posting in " & ForumName & " - " & TopicName
strMessage = strMessage & MemberName & " has replied to the topic '" & TopicName & "' on the forum '" & ForumName & "' at " & strForumTitle & " that you requested notification on. " & vbNewline & vbNewline
strMessage = strMessage & "Subject: " & TopicName & vbNewline & vbNewline
' strMessage = strMessage & "Message: " & vbNewline & "==========================" & vbNewline
' strMessage = strMessage & StripCode(strNewMessage) & vbNewline & "==========================" & vbNewline & vbNewline & vbNewline

else
' strSubject = strForumTitle & " - New posting"
' strMessage = strMessage & MemberName & " has posted to the forum '" & ForumName & "' at " & strForumTitle & " that you requested notification on. "

strSubject = strForumTitle & " - New posting in " & ForumName & " - " & TopicName
strMessage = strMessage & MemberName & " has posted the following to the forum '" & ForumName & "' at " & strForumTitle & " that you requested notification on. " & vbNewline & vbNewline
strMessage = strMessage & "Subject: " & TopicName & vbNewline & vbNewline
' strMessage = strMessage & "Message: " & vbNewline & "==========================" & vbNewline
' strMessage = strMessage & StripCode(strNewMessage) & vbNewline & "==========================" & vbNewline & vbNewline & vbNewline

end if
else
' strSubject = strForumTitle & " - New posting"
' strMessage = strMessage & MemberName & " has posted to the category '" & CatName & "' at " & StrForumTitle & " that you requested notification on. "

strSubject = strForumTitle & " - New posting in " & ForumName & " - " & TopicName
strMessage = strMessage & MemberName & " has replied to the topic '" & TopicName & "' on the forum '" & ForumName & "' in the category '" & CatName & "' at " & strForumTitle & " that you requested notification on. " & vbNewline & vbNewline
strMessage = strMessage & "Subject: " & TopicName & vbNewline & vbNewline
' strMessage = strMessage & "Message: " & vbNewline & "==========================" & vbNewline
' strMessage = strMessage & StripCode(strNewMessage) & vbNewline & "==========================" & vbNewline & vbNewline & vbNewline

end if
else
strSubject = strForumTitle & " - New posting"
strMessage = strMessage & MemberName & " has posted to the " & strForumTitle & " board that you requested notification on. "
end if
' strMessage = strMessage & "Regarding the subject - " & TopicName & "." & vbNewline & vbNewline
strMessage = strMessage & "You can view the posting at " & strForumURL & "topic.asp?TOPIC_ID=" & TopicId & vbNewline

=====================================================================================================================


To remove html/forumcode from the email body for subscription notifications

Include the following function in the inc_subscription.asp file. This removes all content between braces [] [/] and <></> repectively

======================================================================================================================
Function StripCode(ByVal fString)
if fString = "" or IsNull(fString) then
fString = " empty string test"
elseif strAllowForumCode = "1" then
'filter out forumcode
fStringLeft = ""
fFound = False
Do While InStr(fString, "[")
fFound = True
fStringLeft = fStringLeft & " " & Left(fString, InStr(fString, "[")-1)
fString = MID(fString, InStr(fString, "]") + 1)
Loop
StripCode = fStringLeft & fString
If Not fFound Then StripCode = fString
elseif strAllowHTML = "1" then
' filter out html code

fStringLeft = ""
fFound = False
Do While InStr(fString, "<")
fFound = True
fStringLeft = fStringLeft & " " & Left(fString, InStr(fString, "<")-1)
fString = MID(fString, InStr(fString, ">") + 1)
Loop
StripCode = fStringLeft & fString
If Not fFound Then StripCode = fString
end if
if strBadWordFilter = "1" then
fString = ChkBadWords(fString)
end if
StripCode = fString
End Function
<
شما باید یک متن وارد کنید