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)
 Newsletter -Subscribe at registration
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 18 March 2005 :  00:42:37  Show Profile
This MOD allows for your users to have the option of being able to receive your sites Newsletter. I am not going to put line numbers, as it is up to you where you put it, and besides that, everyone has different line numbers in their files.

In the Alternative MOD Setup, run this:
[ALTER]
MEMBERS
ADD#M_RECEIVE_NEWSLETTER#varchar (3)#NULL#
[END]
[ALTER]
MEMBERS_PENDING
ADD#M_RECEIVE_NEWSLETTER#varchar (3)#NULL#
[END]
Then in inc_profile.asp:

Insert the following where you would like for your potential new users to have the option to receive the Newsletter during registration:
		if strMode = "Register" then
		Response.Write	"			<tr valign=""middle"">" & vbNewLine & _
				"				<td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" width=""50%"" ><b><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><font color=""" & strHiLiteFontColor & """>*</font> Receive Newsletter?: </font></b></td>" & vbNewLine
		Response.Write	"			<td bgColor=""" & strPopUpTableColor & """ valign=""middle""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
				"Yes <input type=""radio"" name=""ReceiveNewsletter"" value=""1""" & vbNewLine
			if strMode = "Register" then
			else
				if inStr(ChkString(rs("M_RECEIVE_NEWSLETTER"), "display"),"1") <> 0 then response.write "checked"
			end if
		Response.Write	">" & vbNewLine & _
				"No <input type=""radio"" name=""ReceiveNewsletter"" value=""0""" & vbNewLine
			if strMode = "Register" then
			else
				if inStr(ChkString(rs("M_RECEIVE_NEWSLETTER"), "display"),"0") <> 1 then response.write "checked"
			end if
		Response.Write	">" & vbNewLine & _
				"				</td>" & vbNewLine & _
				"			</tr>" & vbNewLine
		end if
register.asp

Insert the following to make it so user need to select if they want to or not receive the Newsletter:

		if trim(Request.Form("ReceiveNewsletter")) = "" then
			Err_Msg = Err_Msg & "<li>You must choose <b>Yes</b> or <b>No</b> to receive the Newsletter</li>"
		end if
You need to insert the following:

			if trim(Request.Form("ReceiveNewsletter")) = "1" then
			strDate = DatetoStr(now())
				strSQL_Insert = "INSERT INTO " & strTablePrefix & "maillist (email, date_created, active)" & _
						" VALUES ('" & chkString(Request.Form("Email"),"SQLString") & "', '" & strDate & "', '1');"
				my_Conn.Execute(strSQL_Insert)
			else
			end if
Just above this:
		if strEmail = "1" and strEmailVal = "1" then
				'Do Nothing
			else
				Call DoCount
			end if

			regHomepage = ""

I have not allowed for the removal, as if they do not like the Newsletters that they receive, there is the link to Unsubscribe.

I hope this helps you.

Cheers,

David Greening

Edited by - Classicmotorcycling on 18 March 2005 00:45:14

withanhdammit
Junior Member

USA
236 Posts

Posted - 18 March 2005 :  10:00:26  Show Profile  Visit withanhdammit's Homepage  Send withanhdammit an ICQ Message
Thanks David! I've been waiting for this to install the newsletter mod. I'll put it to use right away!

h

I reject your reality and substitute my own.
Go to Top of Page

withanhdammit
Junior Member

USA
236 Posts

Posted - 18 March 2005 :  11:04:33  Show Profile  Visit withanhdammit's Homepage  Send withanhdammit an ICQ Message
David,

I found a problem with the newsletter mod, the unsubscribe link is not working. When I click on the link to unsubscribe, I get this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'admin at mydomain dot com'. 

/nldeactivate.asp, line 34


The line of code that creates the unsubscribe link is
strMessage = strBody & vbcrlf & vbcrlf & "If you wish to unsubscribe " & strRecipients & " from the Mailing list, click on the link below.  You may need to copy the link and paste it into your browser.  By clicking on the link you will automatically be removed from this Mailing List." & vbCrlf & "I wish to remove " & strForumURL & "nldeactivate.asp?email=" & strRecipients & "&userid=" & strUserID & " from the " & strForumTitle & " Mailing List!" & vbCrLf & vbCrLf %>


The generated link in the newsletter email is
I wish to remove http://thepoopsheet.dnjhome.com/nldeactivate.asp?email=admin at mydomain dot com&userid= from the The PoopSheet Mailing List!


Any ideas?

Thanks!

h

<edited to remove email address>

I reject your reality and substitute my own.

Edited by - withanhdammit on 18 March 2005 11:19:49
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 18 March 2005 :  11:35:52  Show Profile
quote:
Originally posted by withanhdammit
strMessage = strBody & vbcrlf & vbcrlf & "If you wish to unsubscribe " & strRecipients & " from the Mailing list, click on the link below.  You may need to copy the link and paste it into your browser.  By clicking on the link you will automatically be removed from this Mailing List." & vbCrlf & "I wish to remove " & strForumURL & "nldeactivate.asp?email=" & strRecipients & "&userid=" & strUserID & " from the " & strForumTitle & " Mailing List!" & vbCrLf & vbCrLf %>

I don't see that line anywhere in David's code; looks like a problem with whichever newsletter mod you're using.


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

withanhdammit
Junior Member

USA
236 Posts

Posted - 18 March 2005 :  12:23:55  Show Profile  Visit withanhdammit's Homepage  Send withanhdammit an ICQ Message
You're right Shaggy, it really should be a separate topic. I reposted it over at http://forum.snitz.com/forum/topic.asp?TOPIC_ID=57583

h

I reject your reality and substitute my own.

Edited by - withanhdammit on 18 March 2005 14:16:19
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 18 March 2005 :  16:29:20  Show Profile
Thanks Shaggy.. As a matter of fact, I do not touch any of the Newsletter files, only the register.asp and the inc_profile.asp files and I have tested to see if the unsubscribe works, which it does..

withanhdammit, I might suggest to you to download the Newsletter MOD again and replace that nldeactivate.asp file with an un-edited version of the nldeactivate.asp file.

Cheers,

David Greening
Go to Top of Page

withanhdammit
Junior Member

USA
236 Posts

Posted - 18 March 2005 :  20:13:24  Show Profile  Visit withanhdammit's Homepage  Send withanhdammit an ICQ Message
Not a bad idea. I'll give that a try and see what happens.

h
Go to Top of Page

withanhdammit
Junior Member

USA
236 Posts

Posted - 19 March 2005 :  23:30:57  Show Profile  Visit withanhdammit's Homepage  Send withanhdammit an ICQ Message
I did that, no help. The unsubscribe still doesn't work.

And, I discovered another problem with your solution...when I sign a new user and select the Yes radio button, I get the following error:
Microsoft VBScript runtime error '800a01b6' 

Object doesn't support this property or method: 'gMDMessageInfo.Bcc' 

/inc_mail.asp, line 266

Thanks!

h

I reject your reality and substitute my own.
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 20 March 2005 :  03:02:12  Show Profile
Well there's your problem. I beleive that the original post on the Newsletter Mod only worked with aspemail, cdonts and jmail and not mdaemon. The code in you inc_mail.asp also makes reference to gMDMessageInfo.Bcc which the original inc_mail.asp file doesn't, so you must of modified your inc_mail.asp file, which means the error is caused by your modified files and nothing to do with the Newsletter Registration MOD.
	case "mdaemon"
		Set gMDUser = Server.CreateObject("MDUserCom.MDUser")
		mbDllLoaded = gMDUser.LoadUserDll
		if mbDllLoaded = False then
			response.write "Could not load MDUSER.DLL! Program will exit." & "<br />"
		else
			Set gMDMessageInfo = Server.CreateObject("MDUserCom.MDMessageInfo")
			gMDUser.InitMessageInfo gMDMessageInfo
			gMDMessageInfo.To = strRecipients
			gMDMessageInfo.From = strSender
			gMDMessageInfo.Subject = strSubject
			gMDMessageInfo.MessageBody = strMessage
			gMDMessageInfo.Priority = 0
			gMDUser.SpoolMessage gMDMessageInfo
			mbDllLoaded = gMDUser.FreeUserDll
		end if
		if Err <> 0 Then 
			Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
		end if
The above is the extract of the original inc_mail.asp for the mdaemon, and no where does it show gMDMessageInfo.Bcc. Please try the code with an unmodified version of Snitz, tell me if it works, then we can work on getting your personal alterations to to other files to work under a different topic.

I have done a quick search on MDaemon & BCC in Google and came across this: Q.Why doesn't MDaemon parse the BCC header? Located at: Mdaemon Frequently Asked Questions. It shows that BCC is not valid for Mdaemon as it requires SMTP.

Please do try all mods on a unmodifed copy of Snitz first and you will see they work if the instructions are followed. I hope that helps you.

Cheers,

David Greening
Go to Top of Page

withanhdammit
Junior Member

USA
236 Posts

Posted - 20 March 2005 :  10:12:09  Show Profile  Visit withanhdammit's Homepage  Send withanhdammit an ICQ Message
Yeah, I get what you're saying about testing on an unmodded version of Snitz. Mine is pretty heavily modded.

I killed the line about the MDaemon BCC and it did start working right, but the BCC with MDaemon has been working just fine up to now. The FAQ you showed talks about v3 and 2.8, etc. I'm running 7.2. It just seems weird that it works in other areas, but not this one. Oh well, such is life, right.

I posted the question about MD & BCC at http://forum.snitz.com/forum/topic.asp?TOPIC_ID=57607

Thanks again for the help, I appreciate it hugely!

h

<edited to add link to new topic>

I reject your reality and substitute my own.

Edited by - withanhdammit on 20 March 2005 10:58:28
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.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07