| Re: Auto PM greeting? |
| by wanikoo on 2005/4/20 20:21:43 Quote:
^^;; ------------ First, open the file, /html/register.php. and then find this code! line 200-209 le="color: #000000"><?php $newid = $newuser->getVar('uid'); if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newid)) { echo _US_REGISTERNG; include 'footer.php'; exit(); } if ($xoopsConfigUser['activation_type'] == 1) { redirect_header('index.php', 4, _US_ACTLOGIN); exit(); } Just add hack-code(//Welcome PM Hack start ~~ //Welcome PM hack end) like this^^;; (please, write your own subject and message...instead of mine) le="color: #000000"><?php $newid = $newuser->getVar('uid'); if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newid)) { echo _US_REGISTERNG; include 'footer.php'; exit(); } //Welcome PM Hack start //Yeah,already defined above^^ $pm_handler =& xoops_gethandler('privmessage'); $pm =& $pm_handler->create(); $pm->setVar("subject", "Welcome To Wanisys^^and thanks for your join!!"); $pm->setVar("msg_text", "Hi^^I am wani,administrator of Wanisys!nThanks for your join!!nHave a nice time!!n"); //Newuser's id $pm->setVar("to_userid", $newid); // Admin's id, it's 1 in most case $pm->setVar("from_userid", 1); if (!$pm_handler->insert($pm)) { // echo "Failed to send Welcome Private Message!!"; // No need to echo this failure-message here,I think so!!...Just optional^^ } //Welcome PM Hack end if ($xoopsConfigUser['activation_type'] == 1) { redirect_header('index.php', 4, _US_ACTLOGIN); exit(); }
|
| Re: Auto PM greeting? |
| by lina26 on 2005/4/20 14:36:04 It's written in Japanese. I don't understand how to do Auto PM greeting. can you help me please |
| Re: Auto PM greeting? |
| by wanikoo on 2005/3/17 11:01:19 My old Hack^^ But it still works well! If you want to send a welcome PM to your new member automatically, please follow this link below^^ (It's written in Japanese..but...I think you can easily understand it ^^) http://www.xoopscube.jp/modules/newbb/viewtopic.php?topic_id=6253&forum=14 |
| Auto PM greeting? |
| by darkcode on 2005/3/15 23:49:07 is there any hack that wllow to send an auto PM to welcome new user that just register? thanks |