Customizing SMF > Now Available
PM to New Registered Users
Midgard:
need an welcome message for new registered members, but not email, is PM
how can?
EDIT: This is now a mod for RC2
http://mods.simplemachines.org/index.php?mod=387
ryanbsoftware:
all you would need to do is find the code for that and instead of it emailing new users, replace the code with a mysql query to add a pm into the database for that user with the text that would go into the email, or do it manually, lol.
Kirby:
Open Register.php
Look for:
--- Code: --- // Admin gets informed here...
adminNotify('approval', $memberID, $_POST['user']);
}
--- End code ---
Add after:
--- Code: --- // Set up the message arrays
$pmfrom = array(
'id' => 1,
'name' => 'name or variable',
'username' => 'name or variable'
);
$pmto = array(
'to' => array($memberID),
'bcc' => array()
);
// Give them a warm welcome via PM :)
sendpm($pmto, 'Subject Here', 'Message Here', 0, $pmfrom);
--- End code ---
Something along those lines... SMF has a built in PM function to make things easy :D
You will probably have to adjust some of that stuff... who knows if this works out I might even make it a mod o.O
Midgard:
Thanks Kirby, that works
_complex:
Out of the blue :P is there anyway you can add a sound to the pm?..
so that when you have a new pm it'll play a sound?.. then once read it stops??.
Navigation
[0] Message Index
[#] Next page
Go to full version