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)
 New member PM
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 9

big9erfan
Average Member

540 Posts

Posted - 12 June 2001 :  15:18:18  Show Profile
Not to sound like an ass, but if you go around being all demanding not too many people will want to help you out.

Now, in register.asp

Look for this around line 155

'## Forum_SQL
strSql = "INSERT INTO " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & "(M_NAME"
if strAuthType = "nt" then
strSql = strSql & ", M_USERNAME"
end if


now scroll down till you see this

strSql = strSql & ", M_HOBBIES"
strsql = strsql & ", M_LNEWS"
strSql = strSql & ", M_QUOTE"


and add this after the M_QUOTE but BEFORE a line that has the ) in it.

'########################### PM NEW MEMBER #####################
strSql = strSql & ", M_PMEMAIL"
'########################### PM NEW MEMBER #####################

it will now look like this

strSql = strSql & ", M_HOBBIES"
strsql = strsql & ", M_LNEWS"
strSql = strSql & ", M_QUOTE"
'########################### PM NEW MEMBER #####################
strSql = strSql & ", M_PMEMAIL"
'########################### PM NEW MEMBER #####################


Now, keep scrolling down and around line 288 you'll see this


if strQuote = "1" then
strSql = strSql & ", '" & ChkString(Request.Form("Quote"),"message") & "'"
else
strSql = strSql & ", ''"
end if


Paste this right after the end if but before strSql = strSql & ")"


'########################### PM NEW MEMBER #####################
strSql = strsql & ", '1'"
'########################### PM NEW MEMBER #####################


it should now look like this

if strQuote = "1" then
strSql = strSql & ", '" & ChkString(Request.Form("Quote"),"message") & "'"
else
strSql = strSql & ", ''"
end if
'########################### PM NEW MEMBER #####################
strSql = strsql & ", '1'"
'########################### PM NEW MEMBER #####################


Now, just a few lines down you should see this

my_Conn.Execute (strSql)

docount

regHomepage = ""


insert this right after that and before the line if lcase(strEmail) = "1" then




'########################### PM NEW MEMBER #####################
Dim objDict
Set objDict = Server.CreateObject("Scripting.Dictionary")
set objRec = my_Conn.execute("SELECT * FROM " & strTablePrefix & "MODS WHERE M_NAME = 'NewMemPM'")

while not objRec.EOF
objDict.Add objRec.Fields.Item("m_code").Value, objRec.Fields.Item("m_value").Value
objRec.moveNext
wend

if Request.Form("Method_Type") = "Write_Configuration" then
Err_Msg = ""

if Err_Msg = "" then

objDict.Item("Admin") = Request.Form("strAdmin")
objDict.Item("Subject") = Request.Form("strSubject")
objDict.Item("Message") = Request.Form("strMessage")
objDict.Item("OnOff") = Request.Form("strOnOff")
a = objDict.Keys
b = objDict.Items
For i = 0 To objDict.Count -1 ' Iterate the array.
strSql = "UPDATE " & strTablePrefix & "MODS "
strSql = strSql & " SET M_VALUE ='" & b(i) & "'"
strSQL = strSql & " WHERE M_NAME = 'Attachment' AND M_CODE = '" & a(i) & "' "
'response.write strSQL
my_Conn.Execute (strSql)
Next

Application(strCookieURL & "ConfigLoaded") = ""
%>

<% end if %>
<% strSql = "SELECT * FROM " & strTablePrefix & "CONFIG_NEWMEMPM " %>
<% end if

if objDict.Item("OnOff") = "1" then
strSql = "INSERT INTO " & strTablePrefix & "PM "
strSql = strSql & "(M_SUBJECT"
strSql = strSql & ", M_FROM"
strSql = strSql & ", M_TO"
strSql = strSql & ", M_SENT"
strSql = strSql & ", M_MESSAGE"
strSql = strSql & ", M_READ"
strSql = strSql & ", M_MAIL"
strSql = strSql & ", M_OUTBOX"
strSql = strSql & ") "
strSql = strSql & " VALUES ("
strSql = strSql & "'" & objDict.Item("Subject") & "'"
strSql = strSql & ", " & "'" & GetMemberID( objDict.Item("Admin")) & "'"
strSql = strSql & ", " & "'" & GetMemberID( Request.Form("Name")) & "'"
strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", " & "'" & objDict.Item("Message") & "'"
strSql = strSql & ", " & "'0'"
strSql = strSql & ", " & "'0'"
strSql = strSql & ", " & 1 & ")"

my_Conn.Execute (strSql)
end if
'########################### PM NEW MEMBER #####################



Now, before this will work you have to make sure you have the PM mod installed.


http://www.ugfl.net/forums

Edited by - big9erfan on 12 June 2001 15:20:45
Go to Top of Page

Ribkick
Junior Member

USA
296 Posts

Posted - 12 June 2001 :  15:49:09  Show Profile
Hi Big9, do you or anbody know if this requires a database setup? It doesn't have a mod_dbsetup file and I don't use the mod commander. Any other way?

I'm assuming the database has to be changed if we can assign saved messages and such.

Go to Top of Page

big9erfan
Average Member

540 Posts

Posted - 12 June 2001 :  16:02:10  Show Profile
Ribkick,

download this
http://www.eastpasco.com/files/new_mem_pm.zip

Open it up.

You should see a file called new_mem_pm_setup.asp

put that in your forum directory and run it. BAM! You're done
Well, besides the other code and such, of course, hee hee.




http://www.ugfl.net/forums
Go to Top of Page

Ribkick
Junior Member

USA
296 Posts

Posted - 12 June 2001 :  16:07:15  Show Profile
Got it!! Thanks '9er (BTW, I'm in the Bay Area and a '9er fan too, **** I miss Joe )

Go to Top of Page

Shep
New Member

74 Posts

Posted - 12 June 2001 :  16:24:03  Show Profile
quote:

Not to sound like an ass, but if you go around being all demanding not too many people will want to help you out.



If you don't want to come across like an "ass" as you put it - then simply don't respond like one. It was a legitimate question. If the tread was dead - I need to find another source.

Shep

BTW - thank you for the "helpful" part of your response.

Go to Top of Page

Ribkick
Junior Member

USA
296 Posts

Posted - 12 June 2001 :  17:01:12  Show Profile
Big(, that worked fine with two problems. One, the edited message doesn't show in the preview window and Two, when a new member signs on, no new PM is received. Yes, BTW the PM mod is installed and runs fine. Any ideas?

PS: Shep, around here politness goes a long way, not demands or smart comebacks. Just a word to the wise.

Go to Top of Page

Shep
New Member

74 Posts

Posted - 12 June 2001 :  17:27:31  Show Profile
quote:

PS: Shep, around here politness goes a long way, not demands or smart comebacks. Just a word to the wise.



What is it with you guys??? Nothing like ganging up on a guy.

First my responses were not meant to be offensive - just a plea for help. If they were taken that way I am sorry - but I have also learned that written word can often be misunderstood - you guys seem to be a little stressed out. Perhaps, you need to check your own hearts instead of judging me.

Second - I have not been unkind or impolite to anyone. My only fault was responding "in kind" to "9's" rude remard to me. Once again - I am sorry. There are a lot of great guys on this forum, and I am sure one or two rude remarks doesn't reflect the majority.

Shep

Go to Top of Page

Shep
New Member

74 Posts

Posted - 12 June 2001 :  17:29:42  Show Profile
Even with 9r's given code I get the following error:

Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/register.asp, line 322, column 7

Thanks for your help

Shep




Go to Top of Page

Ribkick
Junior Member

USA
296 Posts

Posted - 12 June 2001 :  17:58:35  Show Profile
Okay Shep, forget it and I will too. You're right, the written word is difficult, I've had that problem too and yes there are terrific people here, as a matter of fact, I can't think of any that aren't. Lets wait and see what kind of help we get.

For you, try looking at your code and make sure if you used a " mark in code you use it twice as in ""Welcome"" otherwise it looks like and end statement.


[edit] spelling (very poor spelling)


Edited by - ribkick on 12 June 2001 18:06:27
Go to Top of Page

Shep
New Member

74 Posts

Posted - 12 June 2001 :  18:34:32  Show Profile
quote:

Okay Shep, forget it and I will too. You're right, the written word is difficult, I've had that problem too and yes there are terrific people here, as a matter of fact, I can't think of any that aren't. Lets wait and see what kind of help we get.

For you, try looking at your code and make sure if you used a " mark in code you use it twice as in ""Welcome"" otherwise it looks like and end statement.
[edit] spelling (very poor spelling)
Edited by - ribkick on 12 June 2001 18:06:27



Thanks man - I will check it. All I did was cut and paste - but may have missed something - and I appreciate your "heart".

Shep



Edited by - shep on 12 June 2001 18:35:33
Go to Top of Page

Shep
New Member

74 Posts

Posted - 12 June 2001 :  19:13:56  Show Profile
quote:

Lets wait and see what kind of help we get.

Edited by - ribkick on 12 June 2001 18:06:27



Ribkick I got mine running - if there is anything I can do to help you get your going - please let me know. I found a link for the original download - unzipped the register.asp - copied and pasted the code in question - and it register.asp came up fine. Even did a test register and got the welcome message.

Shep

Go to Top of Page

big9erfan
Average Member

540 Posts

Posted - 12 June 2001 :  19:33:15  Show Profile
Rib,

There is something wrong with the preview message ( cookie related I belive, it's either not set or not read properly ).

As per the New Member PM, did you make sure and turn that function ON, also, try setting it to off, hitting submit, then setting to on and then submit.



http://www.ugfl.net/forums
Go to Top of Page

Shep
New Member

74 Posts

Posted - 12 June 2001 :  21:05:36  Show Profile
quote:

Is this thread dead? Why can't we get a response?.....



I wanted to appologize for this post - after re-reading - it does come across a bit harsh and demanding - I honestly didn't mean it that way. When I posted I did see any activity for a coupl of days and didn't see any for a coupld of days later - so just didn't know if anyone was still working on this. Anyway - I am sorry.

Shep

Go to Top of Page

big9erfan
Average Member

540 Posts

Posted - 12 June 2001 :  21:44:01  Show Profile
Shep,

Thanks for the apology. As I had said with my reply I didn't want to come across like an ass by telling you that, but I'm sure it very well could have come across like that especially when you're frustrated in code that just isn't working right, so I'm sorry it came across like that.

As per people replying to this topic in a timely manner, not everyone that knows this mod well have the ability to check the forums every day, let alone numerous times a day. I am one of the lucky few that can. Honestly I had not seen this that this thread had been bumped till today ( during a time when I needed a break from being deep in code at work ).

I'm glad your mod is now working correctly. Trust me when I say that 99.999999% of all people here are very friendly and helpful as we all remember when we were just starting in ASP and were terrified of having to go in and change code that we knew nothing about. There are many parts of the forums where I am still quite fuzzy as to how they work, but I'm getting there. Stick around and you'll be able to pick out the guys that code like they were born with an ASP book in their heads. You'll know who to ask help from and know when to plead to the forum.

Enjoy



http://www.ugfl.net/forums
Go to Top of Page

Shep
New Member

74 Posts

Posted - 13 June 2001 :  01:34:49  Show Profile
quote:

Shep,

Thanks for the apology. As I had said with my reply I didn't want to come across like an ass by telling you that, but I'm sure it very well could have come across like that especially when you're frustrated in code that just isn't working right, so I'm sorry it came across like that............



Thanks 9er. I guess I spoke too soon. When I try to change the message sent to the new user I get and error - from what I read I guess it has something to do with character space - not sure what to do about that.

Also - I got an error even when I tried to preview it - may be related. I guess if it errors for too many characters, it would preview either.

Thanks again,
Shep

Go to Top of Page
Page: of 9 Previous Topic Topic Next Topic  
Previous Page | Next Page
 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.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07