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)
 MOD for including post in subscription email
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

kickstand
Starting Member

USA
2 Posts

Posted - 15 June 2005 :  14:54:39  Show Profile  Visit kickstand's Homepage
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  Show Profile
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.”
Go to Top of Page

palmdoc
Starting Member

23 Posts

Posted - 11 July 2005 :  21:43:07  Show Profile  Visit palmdoc's Homepage
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
Go to Top of Page

palmdoc
Starting Member

23 Posts

Posted - 13 July 2005 :  09:02:02  Show Profile  Visit palmdoc's Homepage
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
Go to Top of Page
  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.13 seconds. Powered By: Snitz Forums 2000 Version 3.4.07