NO LONGER UP TO DATE. PLEASE USE THIS MOD.
This will explain how to modify /register.php so new users get a welcome PM automatically.
Step one: Download the following file: Click!
Step two: Unpack the file.
Step three: Upload the includes folder into the root of your web server.
Step four: Replace this:
$result = dbquery("DELETE FROM ".DB_NEW_USERS." WHERE
user_code='".$_GET['activate']."'");
With this:
$result = dbquery("DELETE FROM ".DB_NEW_USERS." WHERE
user_code='".$_GET['activate']."'"); include INCLUDES."mwp_pm-on-register.php";
Step five: Replace this:
$result = dbquery("INSERT INTO ".DB_USERS." (user_name,
user_password, user_admin_password, user_email, user_hide_email, user_avatar, user_posts, user_threads,
user_joined, user_lastvisit, user_ip, user_rights, user_groups,
user_level, user_status".$db_fields.") VALUES('$username',
'".md5(md5($password1))."', '', '".$email."', '$user_hide_email', ''
, '0', '0', '".time()."', '0', '".USER_IP."', '', '', '101',
'$user_status'".$db_values.")");
With this:
$result = dbquery("INSERT INTO ".DB_USERS." (user_name,
user_password, user_admin_password, user_email, user_hide_email,
user_avatar, user_posts, user_threads, user_joined,
user_lastvisit, user_ip, user_rights, user_groups, user_level,
user_status".$db_fields.") VALUES('$username', '".md5(md5($password1))."', '',
'".$email."', '$user_hide_email', '', '0', '0', '".time()."',
|
To change the sender name, open mwp_pm-on-register.php file and go to line 17:
('".$usr['user_id']."', '1', '$newpm_subject', '".sprintf($newpm_message, $usr['user_name'])."', '1', '".time()."')");
Change the first '1' to the user ID you want to PM send from. This should change it.
Like:
('".$usr['user_id']."', '5', '$newpm_subject', '".sprintf($newpm_message, $usr['user_name'])."', '1', '".time()."')");