Author |
Topic |
|
kickstand
Starting Member
USA
2 Posts |
Posted - 15 June 2005 : 14:54:39
|
This mod will add the text of the message to the email message sent by the subscription feature:
File inc_subscription.asp line 188 (line after "Regarding the subject - "):
' ## Add onto strMessage if you wish the posting to be added to the mail message. strMessage = strMessage & "Post Follows:" & vbNewline & txtMessage & vbNewline & vbNewLine
-kickstand (Fort Worth Bicycling Club Webmaster) |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 16 June 2005 : 10:21:16
|
You'll need to pass txtMessage through the formatStr function to parse the smilies, etc..
However, I'd recommend that you strip all HTML from the messages afterwards from those with non-HTML enabled e-mail clients.
|
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.” |
|
|
palmdoc
Starting Member
23 Posts |
Posted - 11 July 2005 : 21:43:07
|
quote: Originally posted by Shaggy
You'll need to pass txtMessage through the formatStr function to parse the smilies, etc..
However, I'd recommend that you strip all HTML from the messages afterwards from those with non-HTML enabled e-mail clients.
Thanks for the tip. I am a newbie and would appreciate some help on - how to pass txtMessage through the formatStr function - how to strip the HTML from the messages. TIA!
|
Edited by - palmdoc on 12 July 2005 00:30:27 |
|
|
palmdoc
Starting Member
23 Posts |
Posted - 13 July 2005 : 09:02:02
|
OK now I am not sure if I did this correctly but so far it seems to work (I am really new at this ASP thing)
The line now looks like this:
strMessage = strMessage & "Post Follows:" & vbNewline & stripHTML(formatStr(txtMessage)) & vbNewline & vbNewLine Where the function stripHTML is:
Function stripHTML(strHTML) 'Strips the HTML tags from strHTML
Dim objRegExp, strOutput Set objRegExp = New Regexp
objRegExp.IgnoreCase = True objRegExp.Global = True objRegExp.Pattern = "<(.|\n)+?>"
'Replace all HTML tag matches with the empty string strOutput = objRegExp.Replace(strHTML, "") 'Replace all < and > with < and > strOutput = Replace(strOutput, "<", "<") strOutput = Replace(strOutput, ">", ">") stripHTML = strOutput 'Return the value of strOutput
Set objRegExp = Nothing End Function
source |
|
|
|
Topic |
|