PDA

View Full Version : Auto PM new members?


mojotim
07-17-2001, 09:19 AM
Anyone have any ideas on how to do this? I know there is an auto-email new users, but I think an auto PM would be better.

Znaper
07-17-2001, 02:53 PM
Search for this code in the register.php:


if ($verifyemail) {
$getjoindate=$DB_site->query_first("SELECT joindate FROM user WHERE userid='$userid'");
$activateid=$getjoindate[joindate];

eval("\$message = \"".gettemplate("email_activateaccount",1,0)."\";");
eval("\$subject = \"".gettemplate("emailsubject_activateaccount",1,0)."\";");

mail ($email,$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");

}



After it at this code:


if (!$verifyemail && $welcomeuser) {
$fromuserid = "1";
$message = "Insert here your Welcome Message!";
$title = "Insert here your Subject of the PM!";
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,showsignature,iconid,messageread ,folderid) VALUES (NULL,$userid,$userid,$fromuserid,'".addslashes(htmlspecialchars($title))."','".addslashes($message)."',".time().",'0','1',0,0)");
}

mojotim
07-17-2001, 07:10 PM
Hmm, I changed the forumuserid to my id# and change the text to what I wanted sent.
No go, no info put into database.

maxboost107
10-19-2003, 04:56 PM
Hmm, I changed the forumuserid to my id# and change the text to what I wanted sent.
No go, no info put into database.
i'm looking for the same thing ... is there any of the same above but with admincp options ?

assassingod
10-19-2003, 05:18 PM
i'm looking for the same thing ... is there any of the same above but with admincp options ?
The thread is over 2 years old, vBs code has changed since then - better to start a new thread:)

Sylvus
10-19-2003, 06:41 PM
There already is a hack in the database that does this. It will send a private message to all new members. Just search for it if you're looking for it, you'll find it.

Syl...

Logician
10-20-2003, 09:38 AM
right and its name is Welcome PM