Author |
Topic  |
Jorrit787
Average Member
  
Netherlands
681 Posts |
Posted - 18 February 2005 : 17:32:27
|
I am working on a function that automatically send a new registering user a welcome PM, but I've gotten stuck somehwere in the middle I created a file called inc_func_pm , and right now it contains the following function:
<deleted>
(Does this belong in the DEV forum?)< |
eXtremeGossip  |
Edited by - Jorrit787 on 19 February 2005 19:34:48 |
|
MarkJH
Senior Member
   
United Kingdom
1722 Posts |
|
Jorrit787
Average Member
  
Netherlands
681 Posts |
Posted - 19 February 2005 : 19:33:22
|
I'm having trouble getting the MEMBER_ID to send the Welcome PM to from the database. Right now the code I have is this:
'### Forum SQL - Get the Member ID to send the Welcome PM to
strSql = "SELECT MEMBER_ID FROM " & strTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_WPMSENT = 0 "
set rsMember = my_conn.Execute(strSql)
strPMNID = rsMember
RsMember.close
set RsMember = nothing Is this the right way to select the MEMBER_ID and to pass it on to PMNID (the value that determines to whom the PM is sent) < |
eXtremeGossip  |
Edited by - Jorrit787 on 20 February 2005 18:05:40 |
 |
|
TStewartFan
Junior Member
 
190 Posts |
Posted - 19 February 2005 : 23:15:33
|
I took out that widdle pm mod out from my site so I don't know for sure if anything if this will be right but it outta be close. Two things with this sql statement which presents a problem....what happens if there is never a value of 0?!? You will get an error page that the statement is true so you need an if else statement. And the second it doesn't appear as if it is saving anything. Try something like this:
'### Forum SQL - Get the Member ID to send the Welcome PM to strSql = "SELECT MEMBER_ID FROM " & strTablePrefix & "MEMBERS " strSql = strSql & " WHERE M_WPMSENT = 0 "
set rsMember = my_conn.Execute(strSql) do while not rsMember.EOF myMember = rsMember ("MEMBER_ID")
'the action you want to perform goes here
rsMember.MoveNext loop rsMember.close set RsMember = nothing
Essientially this will run through the database and perform an action if a member has a value = to 0. Also be sure within the loop to update the value to 1 otherwise the loop will run forever. Again this is just an educated guess based on past sql statements I have had to write but since I don't have the mod installed anymore I can't test the theory out for you. Good luck!< |
If You Have to Ask, You Wouldn't Understand. |
 |
|
Jorrit787
Average Member
  
Netherlands
681 Posts |
Posted - 20 February 2005 : 13:11:09
|
quote: Originally posted by TStewartFan
what happens if there is never a value of 0?!? You will get an error page that the statement is true so you need an if else statement.
I only call the function on register.asp after the userinfo has either been (1) added directly to the members table with M_WPMSENT = 0 or (2) removed from the members pending table and added to the members table with M_WPMSENT = 0, so the statement is always true for at least one member when the function is called. In fact, it is only designed to handle one at a time (I think).
quote: And the second it doesn't appear as if it is saving anything.
The code above is not the whole code... I'm not that dense 
I think I'm about done... I'll do some final bug-checking and then I'll post the MOD here. So far the MOD sends the new user a welcome PM and it notifies Admins of the new member's registration.< |
eXtremeGossip  |
Edited by - Jorrit787 on 20 February 2005 18:49:14 |
 |
|
mortioli
Average Member
  
United Kingdom
898 Posts |
Posted - 31 August 2005 : 11:05:05
|
This MOD is just what I needed, so was wondering if you managed to complete it?
Thanks, Oli< |
 |
|
mortioli
Average Member
  
United Kingdom
898 Posts |
Posted - 05 September 2005 : 13:53:51
|
*bump* ?< |
 |
|
mortioli
Average Member
  
United Kingdom
898 Posts |
Posted - 08 September 2005 : 13:27:39
|
Sorry to bump again, but does anyone know if this was ever continued please?
Thanks< |
 |
|
MarkJH
Senior Member
   
United Kingdom
1722 Posts |
|
Jorrit787
Average Member
  
Netherlands
681 Posts |
Posted - 13 November 2005 : 16:13:02
|
Several people have emailed me about this; I am not working on this any more.< |
eXtremeGossip  |
 |
|
MarkJH
Senior Member
   
United Kingdom
1722 Posts |
Posted - 13 November 2005 : 17:31:56
|
Hmm. Maybe you could post what you have? A lot of people would be interested in this and it's a shame that it was left in limbo after:
quote: I think I'm about done...
< |
Bandlink.net - http://www.bandlink.net/ Bandlink Music Forums - http://www.bandlink.net/forum/ |
 |
|
Jorrit787
Average Member
  
Netherlands
681 Posts |
Posted - 13 November 2005 : 17:49:22
|
I lost the preliminary package I had made in a hard disk crash a while ago, and it's been too long since I have even looked at it, so I doubt that I would be able to re-assemble it.
From what I remember it was not all that difficult of a venture, so why don't you (or someome else) give it a shot yourself? I'll see if I can help in case you get stuck.< |
eXtremeGossip  |
 |
|
MarkJH
Senior Member
   
United Kingdom
1722 Posts |
|
Jorrit787
Average Member
  
Netherlands
681 Posts |
Posted - 13 November 2005 : 17:59:36
|
quote: Originally posted by MarkJH
quote: I lost the preliminary package I had made in a hard disk crash a while ago
Ooh, that's bad luck. Sorry to hear that.
Not if Mr. Me had been smart enough to make some backups < |
eXtremeGossip  |
 |
|
giorgiuss
Starting Member
Italy
3 Posts |
Posted - 24 January 2006 : 03:58:34
|
Hi :-) Any news about this great mod?< |
 |
|
modifichicci
Average Member
  
Italy
787 Posts |
|
Topic  |
|