Email with the full text of a new post - Postet den (3359 Views)
Starting Member
ale34
Innlegg: 13
13
Hi,
my forum members are asking me for having by email the full text of a new post (forum subscription) instead of receiving a message with the link. Is it possible?
Thank you for your help

Alex<
   
 Sidestørrelse 
Postet den
Advanced Member
JJenson
Innlegg: 2121
2121
I am guessing you are looking for the rss feed mod and you can find it on snitzbitz.com<
Postet den
Starting Member
ale34
Innlegg: 13
13
Hi Jeff,
I have already seen the rss mod but I think it does too much work for what I need smile I would like just to receive in the notification sent by email to subscribed members: the post (full text) + the link where to follow the discussion.
The forum members asking me for that, seem too busy or are receiving too many emails and they consider a waste of time to follow a link instead of having the content of the new post in their mail.
I think that someone must have already implemented this function, don't you think so?<
Postet den
Advanced Member
JJenson
Innlegg: 2121
2121
It is possible that someone has. I am not aware of anything but the rss feed but again I am not all knowledgable like most people on here. I only share the minimal things I have learned. lol

Good luck and I am sure shaggy knows he seems to know everything.
<
Postet den
Support Moderator
Shaggy
Innlegg: 6780
6780
... well, if you insist ...
Find the following on line 45 of inc_subscription.asp
Code:
	StrSql = "SELECT C.CAT_SUBSCRIPTION, C.CAT_NAME, F.F_SUBJECT, F.F_SUBSCRIPTION, " & _
" T.T_SUBJECT, M.M_NAME " & _
" FROM " & strTablePrefix & "CATEGORY C, " & _
" " & strTablePrefix & "FORUM F, " & _
" " & strTablePrefix & "TOPICS T, " & _
" " & strMemberTablePrefix & "MEMBERS M " & _
" WHERE C.CAT_ID = " & CatID & " AND F.FORUM_ID = " & ForumID & _
" AND T.TOPIC_ID = " & TopicID & " AND M.MEMBER_ID = " & pMemberID
And replace it with the following:
Code:
	StrSql = "SELECT C.CAT_SUBSCRIPTION, C.CAT_NAME, F.F_SUBJECT, F.F_SUBSCRIPTION, " & _
" T.T_SUBJECT, T.T_MESSAGE, M.M_NAME " & _
" FROM " & strTablePrefix & "CATEGORY C, " & _
" " & strTablePrefix & "FORUM F, " & _
" " & strTablePrefix & "TOPICS T, " & _
" " & strMemberTablePrefix & "MEMBERS M " & _
" WHERE C.CAT_ID = " & CatID & " AND F.FORUM_ID = " & ForumID & _
" AND T.TOPIC_ID = " & TopicID & " AND M.MEMBER_ID = " & pMemberID
Find the following on line 69:
Code:
	CatSubscription   = allSubsData(0, 0)
CatName = allSubsData(1, 0)
ForumName = allSubsData(2, 0)
ForumSubscription = allSubsData(3, 0)
TopicName = allSubsData(4, 0)
MemberName = allSubsData(5, 0)
And replace it with the following:
Code:
	CatSubscription   = allSubsData(0, 0)
CatName = allSubsData(1, 0)
ForumName = allSubsData(2, 0)
ForumSubscription = allSubsData(3, 0)
TopicName = allSubsData(4, 0) TopicContent = allSubsData(5, 0) MemberName = allSubsData(6, 0)
Finally, you'll need to edit the following two lines on line 187 to customise the message that gets sent to suit your needs:
Code:
				strMessage = strMessage & "Regarding the subject - " & TopicName & "." & vbNewline & vbNewline
strMessage = strMessage & "You can view the posting at " & strForumURL & "topic.asp?whichpage=-1&TOPIC_ID=" & TopicId & vbNewline
You will need to pass the TopicContent vriable through the FormatStr function so that all the forum code is parsed. I would, however, highly recommend that you then pass it through a custom function to strip out all the HTML for those whose e-mail clients cannot read HTML mails or may not display it correctly.
<
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.”
Postet den
Starting Member
ale34
Innlegg: 13
13
Ooops, Shaggy was there!! I am trying this and in 10 minutes I will let you know...
The only thing I need to understand is this part of your post:

You will need to pass the TopicContent vriable through the FormatStr function so that all the forum code is parsed. I would, however, highly recommend that you then pass it through a custom function to strip out all the HTML for those whose e-mail clients cannot read HTML mails or may not display it correctly.
Could you explain to me how to pass the TopicContent through the FormatStr function, please?<
Postet den
Advanced Member
JJenson
Innlegg: 2121
2121
Shaggy I just want to say your my hero lol. Well as far as snitz support goes lol wink<
Postet den
Support Moderator
Shaggy
Innlegg: 6780
6780
Could you explain to me how to pass the TopicContent through the FormatStr function, please?
When inserting TopicContent in your message do so like so:

strMessage="dooby-doobby "&FormatStr(TopicContent)&" blah-de-blah"
<
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.”
Postet den
Starting Member
ale34
Innlegg: 13
13
Unfortunetly it does not work as I wish.
It sends by email the text of the first topic (the oldest one)
but not the reply to the topic being posted (the new one). What am I doing wrong?<
Postet den
Support Moderator
Shaggy
Innlegg: 6780
6780
Ah, yes, of course it would blush Sorry, winding down from a long day with a 0600 start wink
Lemme sleep on it & I'll get back to you tomorrow.
<
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.”
Postet den
Starting Member
ale34
Innlegg: 13
13
Ok Shaggy,
I hope you will have a good fruitful night wink<
Du må legge inn en melding