Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Welcome PM for new registrations

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
endomorph Posted - 16 March 2008 : 03:24:51
I have seen requests before for this but not sure if anyone did anything, so I did.

This MOD will send a PM to all new registrations - A "Welcome to our site" kind of message.

In register.asp, look for the following code -

if strEmail = "1" and strEmailVal = "1" then
'Do Nothing
else
Call DoCount
end if

regHomepage = ""


Immediately above this, insert the following code -

'<!-- Send Welcome PM Message -->

' First lets get the members ID
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_EMAIL "
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.MEMBER_ID "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS"
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_EMAIL like '" & chkString(Request.Form("Email"),"SQLString") & "'"
set rs = my_Conn.Execute (strSql)

' This is the string for your welcome PM subject
welcomepmsubject = "Welcome to ...."

' This is the string for your welcome PM message
welcomepmmessage = "Welcome to ...."

' Do not change these
strpmtoid = rs("MEMBER_ID")
strpmrid = "1"
TF = "0"

strSql = "INSERT INTO " & strTablePrefix & "PM ("
strSql = strSql & " M_SUBJECT"
strSql = strSql & ", M_MESSAGE"
strSql = strSql & ", M_TO"
strSql = strSql & ", M_FROM"
strSql = strSql & ", M_SENT"
strSql = strSql & ", M_MAIL"
strSql = strSql & ", M_READ"
strSql = strSql & ", M_OUTBOX"
strSql = strSql & ") VALUES ("
strSql = strSql & " '" & welcomepmsubject & "'"
strSql = strSql & ", '" & welcomepmmessage & "'"
strSql = strSql & ", " & strpmtoid
strSql = strSql & ", " & strpmrid
strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", " & TF
strSql = strSql & ", " & "0"
strSql = strSql & ", '" & 0 & "')"


my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
set rs = nothing
'<!-- Send Welcome PM -->


Thats it ! Easy



<
15   L A T E S T    R E P L I E S    (Newest First)
cripto9t Posted - 09 May 2008 : 08:59:49
quote:
Originally posted by leatherlips

Does this mod require that email is enabled?

From what I could tell looking at the file last night, it depends on where you place the code. Actually to be a complete working mod it needs to be in at least 2 places in the file, maybe more. One could probably write a sub and call it when the conditions are right.<
leatherlips Posted - 08 May 2008 : 19:54:23
MarkJH, there is another thread with a possible fix for you here: http://forum.snitz.com/forum/topic.asp?TOPIC_ID=67019<
leatherlips Posted - 08 May 2008 : 15:59:09
Does this mod require that email is enabled?<
leatherlips Posted - 07 May 2008 : 14:11:42
I also noticed that you have placed some formatting in your welcome message such as: post in the ""Forum/Site Suggestions"" forum.<br><br>. They may cause it to not be working correctly. When I tried adding quotes and breaks it gave me issues. You could try removing those things in your message and see if it works.<
leatherlips Posted - 07 May 2008 : 14:08:00
It looks like your code is in the correct place. I did notice this at the very beginning of your file:



I'm not sure what that is. My file does not have that.

Are you getting any errors or is it just not sending?<
MarkJH Posted - 07 May 2008 : 13:52:08
Thanks. Here it is. It should be around line 348. Note that I've tried it with chkString(Request.Form("Email"),"SQLString") and chkString(rsKey("M_EMAIL"),"SQLString").
<
leatherlips Posted - 07 May 2008 : 12:01:18
Post a .txt of your file and I'll see if I can spot anything. I don't drink alcohol but thanks for the offer! <
MarkJH Posted - 07 May 2008 : 11:59:07
Yep, put everything where it should go. Well, as far as I can see...

I can post a .txt version of my register.asp, if you'd care to take a look? I'll buy you a beer if you can figure it out! <
leatherlips Posted - 04 May 2008 : 09:14:00
I also have the same anti-spam mod as you do. I do not have the time adjust mod. Did you place the Welcome PM code in the spot indicated by modifichicci? It should come right after the first Call DoCount.<
MarkJH Posted - 04 May 2008 : 05:36:06
Hmm, I'm now getting this error upon conformation of registration (http://www.bandlink.net/forum/register.asp?actkey=):

Microsoft OLE DB Provider for SQL Server error '80040e10'

No value given for one or more required parameters.

/forum/register.asp, line 388

The line being:
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords

Is this because I have other MODs involved? I have a timezone adjust MOD and a captcha MOD installed.<
Etymon Posted - 03 May 2008 : 21:50:53
Hey leatherlips,

I haven't forgotten about your e-mail question. I've been at appointments all week. I get back to you soon. If I take too long, give me a holler.

Etymon
<
leatherlips Posted - 03 May 2008 : 09:44:28
Now I have another question. How can we have paragraph breaks in the welcome message? When I try to do one I get an error at the spot of the break.<
leatherlips Posted - 03 May 2008 : 09:18:56
quote:
Originally posted by modifichicci

try changing
chkString(Request.Form("Email"),"SQLString")
to

chkString(rsKey("M_EMAIL"),"SQLString")

in routine

Beautiful! It works perfectly now! Thank you! <
modifichicci Posted - 03 May 2008 : 09:09:30
try changing
chkString(Request.Form("Email"),"SQLString")
to

chkString(rsKey("M_EMAIL"),"SQLString")

in routine<
leatherlips Posted - 03 May 2008 : 08:29:52
I placed the code where you said modifichicci and I did not get the error anymore. However, the Welcome PM did not get sent either to the new member. There must be something else wrong too. <

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.07