Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Now Available => Topic started by: Midgard on December 17, 2004, 07:00:24 AM

Title: PM to New Registered Users
Post by: Midgard on December 17, 2004, 07:00:24 AM
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
Title: Re: PM to New Registered Users
Post by: ryanbsoftware on December 17, 2004, 01:01:56 PM
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.
Title: Re: PM to New Registered Users
Post by: Kirby on December 17, 2004, 07:54:02 PM
Open Register.php
Look for:
// Admin gets informed here...
adminNotify('approval', $memberID, $_POST['user']);
}


Add after:

// 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);


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
Title: Re: PM to New Registered Users
Post by: Midgard on December 18, 2004, 08:38:50 AM
Thanks Kirby, that works
Title: Re: PM to New Registered Users
Post by: _complex on December 19, 2004, 02:31:56 PM
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??.
Title: Re: PM to New Registered Users
Post by: ryanbsoftware on January 03, 2005, 12:49:43 PM
Quote from: nviceversa on December 19, 2004, 02:31:56 PM
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??.

I would think so if you use the [dohtml] tag and used html code to play the music. ;)
Title: Re: PM to New Registered Users
Post by: RGSMDNR on January 05, 2005, 12:06:27 PM
how would i go about adding something like

Welcome 'user',

please go  here  (http://www.link.com) .

thanks

?
Title: Re: PM to New Registered Users
Post by: mytreo on January 05, 2005, 01:56:56 PM
Quote from: Kirby on December 17, 2004, 07:54:02 PM
Open Register.php
Look for:
// Admin gets informed here...
adminNotify('approval', $memberID, $_POST['user']);
}


Add after:

// 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);


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

That is awesome kirby, thank you much.
Title: Re: PM to New Registered Users
Post by: RGSMDNR on January 05, 2005, 02:12:25 PM
yes, but what do i type in the 'Message' field so it will show up like in my post...

Welcome "user name"

blah blah 'link'

Title: Re: PM to New Registered Users
Post by: Kirby on January 05, 2005, 04:07:30 PM
Just an FYI, please download the mod version of this. It is available at my package server (http://www.zfgc.com/kirby/smf). It is a more recent version and allows you to do it with the ease of your admin panel. Please do NOT download other mods, I have to double check them to make sure they are 1.0 compatible, and I have to fix the Topic Descriptions one. Thanks for the good comments :)
Title: Re: PM to New Registered Users
Post by: diplomat. on January 10, 2005, 11:55:30 PM
everytime a member registers to my site, it logs an error:


8: Undefined index: pm_successfully_sent
File: /var/www/html/forums/Sources/Subs-Post.php
Line: 497
?action=register2


is that supposed to happen...cuz it still sends the pm
Title: Re: PM to New Registered Users
Post by: RGSMDNR on January 11, 2005, 12:38:10 AM
no they arent compatible, i have to modify my modifications.english.php to read

// Version: 1.0 RC2; Modifications

to match the file install.php

also, there is no field for the body of the message.
Title: Re: PM to New Registered Users
Post by: diplomat. on January 12, 2005, 10:54:31 AM
you have to have this mod installed also

Modsetting Textarea (http://mods.simplemachines.org/index.php?mod=47)
Title: Re: PM to New Registered Users
Post by: guider on February 05, 2005, 07:18:17 AM
I have the Modsetting Textarea but before applying the PM mod I get a "Failed" on ./Themes/default/languages/Modifications.english.php. Presenting the FTP logininfo doesn't fix the 'Failed'. What goes wrong here?
Title: Re: PM to New Registered Users
Post by: Kirby on February 05, 2005, 02:14:54 PM
you have to CHMOD the files to 777
Title: Re: PM to New Registered Users
Post by: guider on February 05, 2005, 02:23:42 PM
It already was 777. I'm using Smf in combination with mambo btw. I entered my adminpanel outside of Mambo before installing it as that should get better results... I Applied the mod and that file still said Failed. Nothing happened, no link in Admin it seems, nothing.
Title: Re: PM to New Registered Users
Post by: [Unknown] on February 05, 2005, 05:13:05 PM
Failed means it can't make the change, meaning there's something wrong with the mod or the file.

-[Unknown]
Title: Re: PM to New Registered Users
Post by: bobert on February 07, 2005, 03:07:34 PM
Ya, I still can't get this to work either. I have a standard setup, the only thing different is the theme, and that I have some mods installed. I'm not running through Mambo either. Any more suggestions?
Title: Re: PM to New Registered Users
Post by: Kirby on February 07, 2005, 04:18:37 PM
thats odd...
Title: Re: PM to New Registered Users
Post by: jiminoregon on February 08, 2005, 03:49:49 AM
Quote from: guider on February 05, 2005, 02:23:42 PM
It already was 777. I'm using Smf in combination with mambo btw. I entered my adminpanel outside of Mambo before installing it as that should get better results... I Applied the mod and that file still said Failed. Nothing happened, no link in Admin it seems, nothing.

Same here...and it leaves a ghost of itself on the edit settings page.

Jim
Title: Re: PM to New Registered Users
Post by: [Unknown] on February 08, 2005, 05:13:15 AM
This may likely be caused by having other mods installed.

-[Unknown]
Title: Re: PM to New Registered Users
Post by: diplomat. on February 08, 2005, 09:12:32 AM
Quote from: jiminoregon on February 08, 2005, 03:49:49 AM
Quote from: guider on February 05, 2005, 02:23:42 PM
It already was 777. I'm using Smf in combination with mambo btw. I entered my adminpanel outside of Mambo before installing it as that should get better results... I Applied the mod and that file still said Failed. Nothing happened, no link in Admin it seems, nothing.

Same here...and it leaves a ghost of itself on the edit settings page.

Jim

add this to Modifications.english.php

$txt['send_welcomeIM'] = 'Send welcome personal message to new members';
$txt['welcomeIM_userid'] = 'User ID of sender<div class="smalltext">Leave blank to send with an unregistered name.</div>';
$txt['welcomeIM_subject'] = 'Subject of welcome message';
$txt['welcomeIM_body'] = 'Body of welcome message';
Title: Re: PM to New Registered Users
Post by: bobert on February 08, 2005, 09:13:39 AM
Where would you add the code???
Title: Re: PM to New Registered Users
Post by: diplomat. on February 08, 2005, 09:19:27 AM
add it right before the ?>
Title: Re: PM to New Registered Users
Post by: guider on February 08, 2005, 09:24:03 AM
Nothing happens. Exactly where in admin should I see a link pop up?
Title: Re: PM to New Registered Users
Post by: bobert on February 08, 2005, 03:17:39 PM
This kind of works. I can get everything to work now, and it sends to new members. BUT the labels still don't appear in the Admin area. The text boxes do, but the labels don't. Thanks.
Title: Re: PM to New Registered Users
Post by: guider on February 08, 2005, 03:34:03 PM
Where in admin are the boxes?
Title: Re: PM to New Registered Users
Post by: bobert on February 08, 2005, 03:37:28 PM
It's under edit features and options... under this stuff:

Method of registration employed for new members     
Notify administrators when a new member joins    
Require reactivation after email change    
Send welcome email to new members

ok?
Title: Re: PM to New Registered Users
Post by: guider on February 08, 2005, 04:23:45 PM
Ah yes see it. What's that 0 mean?
Title: Re: PM to New Registered Users
Post by: Kirby on February 08, 2005, 04:31:35 PM
thats the ID of the user that the PM is sent with
Title: Re: PM to New Registered Users
Post by: guider on February 08, 2005, 05:41:48 PM
I see. So 1=sent from Admin?
Title: Re: PM to New Registered Users
Post by: guider on February 08, 2005, 05:58:14 PM
I filled in 1 and registered a new member through adminpanel, but no new message?
Title: Re: PM to New Registered Users
Post by: diplomat. on February 08, 2005, 06:36:47 PM
make sure you have Send welcome personal message to new members checked
Title: Re: PM to New Registered Users
Post by: guider on February 08, 2005, 06:42:11 PM
Its checked. Did you create the new user through admin? If so, what could be wrong?
Title: Re: PM to New Registered Users
Post by: diplomat. on February 08, 2005, 06:59:36 PM
i tried it on my test forum first with registering regularly, i never registered thru the admin panel, but seems like it should still send the pm. :-\
Title: Re: PM to New Registered Users
Post by: Kirby on February 08, 2005, 07:04:27 PM
i haven't tested it with admin account creation..i don't think it works though
Title: Re: PM to New Registered Users
Post by: bobert on February 08, 2005, 10:30:55 PM
I doubt it would work through the admin panel. I think it referneces a different file. BTW, I still need help with getting the field descriptions to show up in the Admin Panel
Title: Re: PM to New Registered Users
Post by: Kirby on February 08, 2005, 11:14:31 PM
Quote from: diplomat. on February 08, 2005, 09:12:32 AM
Quote from: jiminoregon on February 08, 2005, 03:49:49 AM
Quote from: guider on February 05, 2005, 02:23:42 PM
It already was 777. I'm using Smf in combination with mambo btw. I entered my adminpanel outside of Mambo before installing it as that should get better results... I Applied the mod and that file still said Failed. Nothing happened, no link in Admin it seems, nothing.

Same here...and it leaves a ghost of itself on the edit settings page.

Jim

add this to Modifications.english.php

$txt['send_welcomeIM'] = 'Send welcome personal message to new members';
$txt['welcomeIM_userid'] = 'User ID of sender<div class="smalltext">Leave blank to send with an unregistered name.</div>';
$txt['welcomeIM_subject'] = 'Subject of welcome message';
$txt['welcomeIM_body'] = 'Body of welcome message';


that didn't work? remember Themes/default/Modifications.english.php
it should work o_O
Title: Re: PM to New Registered Users
Post by: bobert on February 08, 2005, 11:26:21 PM
All fixed guys Thank you soo much! I have no idea what file I was edinting before, but it certainly wasn't this one. Also, you have to edit the file of the there you are on, which may not be 'default'
Title: Re: PM to New Registered Users
Post by: Kirby on February 08, 2005, 11:31:03 PM
glad ya got it working
Title: Re: PM to New Registered Users
Post by: guider on February 09, 2005, 09:07:10 AM
Well as I said it does show up in admin now, but it doesn't work. Registering the normal (user-like) way. Nada.
Title: Re: PM to New Registered Users
Post by: guider on February 09, 2005, 03:31:06 PM
Bump - I verified my id as admin is 1, just like I entered in the box in adminpanel. The box has also bene checked and the message is filled out. Nothing happens.
Title: Re: PM to New Registered Users
Post by: diplomat. on February 09, 2005, 05:06:14 PM
maybe the part that should be in Register.php is not there.

Search for

// Admin gets informed here...
adminNotify('approval', $memberID, $_POST['user']);
}


and make sure that this:

if (!empty($modSettings['send_welcomeIM']))
{
// Set up the personal message arrays
$pmfrom = array(
'id' => $modSettings['welcomeIM_userid'],
'name' => $txt[248.5],
'username' => $txt[248.5]
);
$pmto = array(
'to' => array($memberID),
'bcc' => array()
);

// Send the actual PM
sendpm($pmto, $modSettings['welcomeIM_subject'], addslashes($modSettings['welcomeIM_body']), 0, $pmfrom);
}


is right after it.
Title: Re: PM to New Registered Users
Post by: J. S. on February 12, 2005, 02:43:19 AM
Hello.
I need to do this:
When a user register he get a PM that says:
Hello username
Welcome to boardname. Befor posting please read the rules at url.
Thank you.

Signature


I can edit the regiser.php, I only need to know the code to add. Should I use /n for adding a space?

Thanks.
Title: Re: PM to New Registered Users
Post by: Kirby on February 13, 2005, 12:41:00 AM
/n is for line breaks..<br /> should be used instead...
so youd put something like:

Hello '. $user_info['name'] . '<br />Welcome to ' . $context['forum_name'] . '. Before posting please read the rules at the url.<br />Signature.
Title: Re: PM to New Registered Users
Post by: J. S. on February 15, 2005, 10:59:50 AM
I did that to, now I am getting a parse error in the registration page.
Title: Re: PM to New Registered Users
Post by: guider on February 16, 2005, 09:04:34 PM
@diplomat: thx but the Mod just doesn't seem to be working when using the Mambo bridge. Kirby any chance you'd be able to make this wonderful tweak available to Mambo-users worldwide?  :o
Title: Re: PM to New Registered Users
Post by: Kirby on February 18, 2005, 09:39:51 PM
it should work with mambo :P

@JS, use this code:

// Set up the personal message arrays
$pmfrom = array(
'id' => 1
'name' => 'WelcomeMessage',
'username' => 'WelcomeMessage'
);
$pmto = array(
'to' => array($memberID),
'bcc' => array()
);

$subject = 'Hello username<br />
Welcome to boardname. Before posting please read the rules at url.<br />
Thank you.';

// Send the actual PM
sendpm($pmto, 'Welcome', subject, 0, $pmfrom);
Title: Re: PM to New Registered Users
Post by: subnet_rx on May 28, 2005, 12:52:07 PM
Could someone make this a mod editable in the admin section?   ???  :)
Title: Re: PM to New Registered Users
Post by: Kirby on May 28, 2005, 02:52:00 PM
the one i had on my package manager was, but its gone for the moment...
Title: Re: PM to New Registered Users
Post by: Thantos on May 28, 2005, 03:00:07 PM
I like the new name kirby :)
Title: Re: PM to New Registered Users
Post by: Kirby on May 28, 2005, 10:45:32 PM
hehe :P
Title: Re: PM to New Registered Users
Post by: stargazer_1017 on June 20, 2005, 06:34:39 PM
Is the mod going to be put up again? When I tried manually putting in the code, for some reason, it wouldn't let me. I always come up with an error on register.php

-Shayna
Title: Re: PM to New Registered Users
Post by: LostProphecy on July 04, 2005, 02:37:02 AM
*would really love this mod to come back as well*
Title: Re: PM to New Registered Users
Post by: epyon on July 28, 2005, 04:00:44 PM
same here it would deffenatly be something i would add if u brought it back, cus i just cant get it to work when i view the registration page,..  :(
Title: Re: PM to New Registered Users
Post by: Kirby on July 28, 2005, 05:40:52 PM
what version of SMF? 1.1 or 1.0.5?
Title: Re: PM to New Registered Users
Post by: trenchteam on July 29, 2005, 11:52:31 PM
1.05 please! ;D
Title: Re: PM to New Registered Users
Post by: spirulez on August 02, 2005, 10:49:00 AM
Quote from: ??? on January 05, 2005, 04:07:30 PM
Just an FYI, please download the mod version of this. It is available at my package server (http://www.zfgc.com/kirby/smf).
404 error :-X

Thx for the new link ;)
Title: Re: PM to New Registered Users
Post by: epyon on August 02, 2005, 11:40:38 PM
Quote from: trenchteam on July 29, 2005, 11:52:31 PM
1.05 please! ;D

same here ^ ^
Title: Re: PM to New Registered Users
Post by: 3guk on August 03, 2005, 09:25:45 AM
Anyone have this residing on their server.

Would like the package but it seems his package server has gone awol.
Title: Re: PM to New Registered Users
Post by: Kirby on August 03, 2005, 05:58:35 PM
It should work fine on 1.0.5.
Package attached..
Don't forget to install Anguz' ModSettings text area mod first.
Title: Re: PM to New Registered Users
Post by: spirulez on August 05, 2005, 06:03:33 AM
Thk.

And find a way for the 1.1b3 ? ;)
Title: Re: PM to New Registered Users
Post by: Isaac on August 05, 2005, 05:05:54 PM
Quote from: ??? on August 03, 2005, 05:58:35 PM
It should work fine on 1.0.5.
Package attached..
Don't forget to install Anguz' ModSettings text area mod first.
Works great.  Thanks a bunch. :)
Title: Re: PM to New Registered Users
Post by: epyon on August 08, 2005, 08:43:59 PM
when i go to "Proceed" at the instaling it page all of the actions are successful except for ./Sources/Register.php and ./Themes/default/languages/Modifications.english.php


is this ok for me to continue?
Title: Re: PM to New Registered Users
Post by: Kirby on August 08, 2005, 11:23:17 PM
What version, epyon?
Title: Re: PM to New Registered Users
Post by: epyon on August 09, 2005, 12:25:10 PM
i have 1.0.5 (that is what u ment right?)
Title: Re: PM to New Registered Users
Post by: Kirby on August 09, 2005, 02:49:59 PM
Yes. It looks like you have other mods applied that are blocking this one.
Title: Re: PM to New Registered Users
Post by: epyon on August 09, 2005, 10:13:20 PM
 :( aww damn...  if its not too much would you be able to tell me which ones
Title: Re: PM to New Registered Users
Post by: Boylie on August 26, 2005, 08:20:06 PM
can you pick who send the pm ? like no it sends from main admin account

i would like it to send from USER : Forum-Bot
Title: Re: PM to New Registered Users
Post by: stargazer_1017 on August 29, 2005, 07:27:22 PM
Quote from: epyon on August 08, 2005, 08:43:59 PM
when i go to "Proceed" at the instaling it page all of the actions are successful except for ./Sources/Register.php and ./Themes/default/languages/Modifications.english.php


is this ok for me to continue?

I had the same problem as well :( I would really love this mod, though! Help!

-Shayna
Title: Re: PM to New Registered Users
Post by: modtang on September 11, 2005, 04:12:54 AM
As mentioned here: http://www.simplemachines.org/community/index.php?topic=21708.msg210835#msg210835

Open ./Themes/default/languages/Modifications.english.php

Before ?> just add the following:

$txt['send_welcomeIM'] = 'Send welcome personal message to new members';
$txt['welcomeIM_userid'] = 'User ID of sender<div class="smalltext">Leave blank to send with an unregistered name.</div>';
$txt['welcomeIM_subject'] = 'Subject of welcome message';
$txt['welcomeIM_body'] = 'Body of welcome message';


Problem solved. :)
Title: Re: PM to New Registered Users
Post by: stargazer_1017 on September 15, 2005, 10:12:30 PM
I manually added the code before installation and it still fails on the Modifications.english.php :(  The register.php went through, though. Is that all that was needed to be added to Modifications.english.php?

-Shayna
Title: Re: PM to New Registered Users
Post by: Webrunner on September 22, 2005, 11:00:08 AM
Is there a way to implement this in 1.1RC1 ?
Title: Re: PM to New Registered Users
Post by: Webrunner on November 12, 2005, 07:21:45 AM
Bump  :(
Title: Re: PM to New Registered Users
Post by: SpyDie on November 20, 2005, 10:20:06 AM
Bump again  :)
Title: Re: PM to New Registered Users
Post by: desistyle on November 21, 2005, 10:07:04 PM
Quote from: mytreo on January 05, 2005, 01:56:56 PM
Quote from: Kirby on December 17, 2004, 07:54:02 PM
Open Register.php
Look for:
// Admin gets informed here...
adminNotify('approval', $memberID, $_POST['user']);
}


Add after:

// 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);


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

That is awesome kirby, thank you much.

wow this works great but only thing is it shows pm from none i mean its blank even when i put instead of pmfrom my user id ? am i suppose to do something else there ?
Title: Re: PM to New Registered Users
Post by: L.G.S on December 16, 2005, 12:42:08 PM
Can someone post this for 1.1 please?
Title: Re: PM to New Registered Users
Post by: L.G.S on December 30, 2005, 07:17:16 PM
Anybody got this for 1.1 please, I really need it.
Title: Re: PM to New Registered Users
Post by: Me102 on January 01, 2006, 04:15:08 PM
Anyone know how to do this with 1.1 ??? ???
Title: Re: PM to New Registered Users
Post by: Ryan on January 04, 2006, 06:59:10 PM
how bout update for 1.1/1.2
Title: Re: PM to New Registered Users
Post by: SleePy on January 24, 2006, 07:48:13 PM
Trying to get the Pm To new registered users to work in rc2. so far i got it all working. but some reason it doesn't send pm. instead i get this error
QuoteYou have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')
ORDER BY mem.lngfile
LIMIT 0' at line 8
File: /Volumes/MacintoshHD2/Users/SleePy/Sites/SMF/Sources/Subs-Post.php
Line: 709

heres the area around line 709. i bolded 709 though

Quote$request = db_query("
      SELECT
         mem.memberName, mem.realName, mem.ID_MEMBER, mem.emailAddress, mem.lngfile, mg.maxMessages,
         mem.pm_email_notify, mem.instantMessages," . (allowedTo('moderate_forum') ? ' 0' : "
         (mem.pm_ignore_list = '*' OR FIND_IN_SET($from[id], mem.pm_ignore_list))") . " AS ignored,
         FIND_IN_SET($from[id], mem.buddy_list) AS is_buddy, mem.is_activated,
         (mem.ID_GROUP = 1 OR FIND_IN_SET(1, mem.additionalGroups)) AS is_admin
      FROM {$db_prefix}members AS mem
         LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))
      WHERE mem.ID_MEMBER IN (" . implode(", ", $all_to) . ")
      ORDER BY mem.lngfile
      LIMIT " count($all_to), __FILE__, __LINE__);
   $notifications = array();
   while ($row = mysql_fetch_assoc($request))
   {
      // Has the receiver gone over their message limit, assuming that neither they nor the sender are important?!
      if (!empty($row['maxMessages']) && $row['maxMessages'] <= $row['instantMessages'] && !allowedTo('moderate_forum') && !$row['is_admin'])
      {

i don't understand why. the mysql code looks correct... and if i get this fixed PM to New Registered Users will work for rc2. i got the rest of the package that Kirby made working for rc2. just this error..
Title: Re: PM to New Registered Users
Post by: DHC on February 15, 2006, 03:39:44 PM
Quote from: M3THOD on January 04, 2006, 06:59:10 PM
how bout update for 1.1/1.2

Yep - I need it for 1.1 RC2

PLEASE !!!!
Title: Re: PM to New Registered Users
Post by: Ryan on February 20, 2006, 02:21:26 PM
i need it rc2 :p
Title: Re: PM to New Registered Users
Post by: Zombie on February 21, 2006, 03:40:04 PM
Don't leave us hangin!

I would like to see this continue aswell.
Title: Re: PM to New Registered Users
Post by: RyanJones on February 27, 2006, 08:49:46 AM
Try this...

I believe the part to be fnd has been moved to the Subs-Members.php so search for the same thing in there and do as normal :)

Followed the instructions and it workd in the new file.


Its about line 837...

Cheers,

Ryan Jones
Title: Re: PM to New Registered Users
Post by: ikbenivo on April 05, 2006, 05:59:08 AM
Quote from: DHC on February 15, 2006, 03:39:44 PM
Quote from: M3THOD on January 04, 2006, 06:59:10 PM
how bout update for 1.1/1.2

Yep - I need it for 1.1 RC2

PLEASE !!!!

same here  ::)
Title: Re: PM to New Registered Users
Post by: L.G.S on April 05, 2006, 06:08:02 AM
Quote from: RyanJones on February 27, 2006, 08:49:46 AM
Try this...

I believe the part to be fnd has been moved to the Subs-Members.php so search for the same thing in there and do as normal :)

Followed the instructions and it workd in the new file.


Its about line 837...

Cheers,

Ryan Jones

I have no idea what you said:(
Title: Re: PM to New Registered Users
Post by: jonks on April 05, 2006, 12:35:41 PM
Quote from: ikbenivo on April 05, 2006, 05:59:08 AM
Quote from: DHC on February 15, 2006, 03:39:44 PM
Quote from: M3THOD on January 04, 2006, 06:59:10 PM
how bout update for 1.1/1.2

Yep - I need it for 1.1 RC2

PLEASE !!!!

same here  ::)

Yep, and me, this would solve so many problems for me.
Title: Re: PM to New Registered Users
Post by: JshLnsctt on April 11, 2006, 02:54:03 PM
Quote from: RyanJones on February 27, 2006, 08:49:46 AM
Try this...

I believe the part to be fnd has been moved to the Subs-Members.php so search for the same thing in there and do as normal :)

Followed the instructions and it workd in the new file.


Its about line 837...

Cheers,

Ryan Jones

Thanks ;)
Title: Re: PM to New Registered Users
Post by: L.G.S on April 11, 2006, 04:12:44 PM
Did you get it to work?
Title: Re: PM to New Registered Users
Post by: jonks on April 17, 2006, 02:50:15 PM
Have i read this thread worng. Is there actiually already a way for this to be done in rc2?  I'm confused which instructions apply to which versions.
Title: Re: PM to New Registered Users
Post by: kriskd on May 20, 2006, 03:56:21 PM
Quote from: jonks on April 17, 2006, 02:50:15 PM
Have i read this thread worng. Is there actiually already a way for this to be done in rc2?  I'm confused which instructions apply to which versions.

Same here.  Read the whole thing and still a bit confused.

I have admin approvals on my board and also make the member activate their account.  I'd like an automatic PM to go out to members after they have activated their account.  Currently I'm sending them manually, but fear I'm missing  a few members here and there.

I'm using SMF ver 1.1 RC2
Title: Re: PM to New Registered Users
Post by: husmen73 (Gulhin) on May 24, 2006, 11:03:28 AM

Where is code RC2 ???

i searching :(  there is not RC2
Title: Re: PM to New Registered Users
Post by: MJJOS on May 27, 2006, 09:19:19 AM
Yes it can be made work with 1.1RC2, what he is saying is, take the original code given by Kirby, and put it into Subs-Members.php

So, for 1.1RC2, in Subs-Members.php, find:
// Admin gets informed here...
adminNotify('approval', $memberID, $regOptions['username']);
}


AFTER that, insert:
   // 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);


Remember to replace Subject Here with the PM subject, and Message Here with the pm's message.
Thats it, it works perfectly, and that way you wont get that error message that was coming up. I tried it, so it should be fine for most people.

Great idea by the way! Hope that helps.

Title: Re: PM to New Registered Users
Post by: husmen73 (Gulhin) on May 28, 2006, 05:36:24 AM
Thanks MJJOS


Title: Re: PM to New Registered Users
Post by: L.G.S on May 28, 2006, 05:45:43 AM
Yeah, thanks man. Worked great.
Title: Re: PM to New Registered Users
Post by: husmen73 (Gulhin) on May 28, 2006, 06:04:08 AM
Quote from: MJJOS on May 27, 2006, 09:19:19 AM
Yes it can be made work with 1.1RC2, what he is saying is, take the original code given by Kirby, and put it into Subs-Members.php

So, for 1.1RC2, in Subs-Members.php, find:
// Admin gets informed here...
adminNotify('approval', $memberID, $regOptions['username']);
}


AFTER that, insert:
   // 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);


Remember to replace Subject Here with the PM subject, and Message Here with the pm's message.
Thats it, it works perfectly, and that way you wont get that error message that was coming up. I tried it, so it should be fine for most people.

Great idea by the way! Hope that helps.

I ADDED codes. BUT THERE ISN'T  VARIATION
Title: Re: PM to New Registered Users
Post by: navjotjsingh on May 28, 2006, 09:43:05 AM
Quote from: MJJOS on May 27, 2006, 09:19:19 AM
Yes it can be made work with 1.1RC2, what he is saying is, take the original code given by Kirby, and put it into Subs-Members.php

So, for 1.1RC2, in Subs-Members.php, find:
// Admin gets informed here...
adminNotify('approval', $memberID, $regOptions['username']);
}


AFTER that, insert:
    // 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);


Remember to replace Subject Here with the PM subject, and Message Here with the pm's message.
Thats it, it works perfectly, and that way you wont get that error message that was coming up. I tried it, so it should be fine for most people.

Great idea by the way! Hope that helps.



Thanks for this code. It worked wonderfully!!!!! Thanks a ton.
Title: Re: PM to New Registered Users
Post by: LuminaRS on May 30, 2006, 01:16:56 AM
I'm using 1.0.7 and cannot seem to get the code to work. It just makes my reg page blank. What's the problem that's causing this?
Title: Re: PM to New Registered Users
Post by: Oldiesmann on May 30, 2006, 09:37:13 AM
Are there any errors in your forum error log relating to this?
Title: Re: PM to New Registered Users
Post by: LuminaRS on May 30, 2006, 09:47:52 PM
Quote from: Oldiesmann on May 30, 2006, 09:37:13 AM
Are there any errors in your forum error log relating to this?

No, there isn't anything in the logs
Title: Re: PM to New Registered Users
Post by: ghostfreak on June 07, 2006, 10:08:38 PM
Would be interesting to see it for 1.1 RC2 :)
Title: Re: PM to New Registered Users
Post by: LuminaRS on June 07, 2006, 11:10:08 PM
Quote from: ghostfreak on June 07, 2006, 10:08:38 PM
Would be interesting to see it for 1.1 RC2 :)

Eh, I still haven't gotten it to work on 1.0.7...
Title: Re: PM to New Registered Users
Post by: sbarnes on June 08, 2006, 12:02:31 PM
It works fine with 1.1 RC2
Title: Re: PM to New Registered Users
Post by: snakize on June 09, 2006, 09:27:59 PM
Works great in SMF 1.1RC2 thanks a lot!
Title: Re: PM to New Registered Users
Post by: Vinspire on June 14, 2006, 04:36:42 AM
Quote from: MJJOS on May 27, 2006, 09:19:19 AM
Yes it can be made work with 1.1RC2, what he is saying is, take the original code given by Kirby, and put it into Subs-Members.php

So, for 1.1RC2, in Subs-Members.php, find:
// Admin gets informed here...
adminNotify('approval', $memberID, $regOptions['username']);
}


AFTER that, insert:
    // 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);


Remember to replace Subject Here with the PM subject, and Message Here with the pm's message.
Thats it, it works perfectly, and that way you wont get that error message that was coming up. I tried it, so it should be fine for most people.

Great idea by the way! Hope that helps.

Thanks for the codes MJJOS.

I have 1 question here. The msg that is send to the members come from who ? The admin of the site ?
Title: New MOD--> PM to New Registered Users
Post by: husmen73 (Gulhin) on June 14, 2006, 08:52:33 AM
Title: Re: PM to New Registered Users
Post by: L.G.S on June 14, 2006, 11:17:16 AM
Nice one, thanks
Title: Re: New MOD--> PM to New Registered Users
Post by: tozzie on June 17, 2006, 10:54:59 PM
Quote from: husmen73 on June 14, 2006, 08:52:33 AM
Thanks MJJOS


Only SMF 1.1RC2

Mod ;)
Download links -->
  • English (http://www.alemshare.net/download.php?id=uWRjI8CmPWYUcitk3zT0)
  • Turkish (http://www.alemshare.net/download.php?id=CPDcdtrgMZlbnx2LptEV)

thanx, but it doesnt work and i dont think its in english....
but thanx


and i cant figure it out manually, it says theres an error on line 852...
Title: Re: New MOD--> PM to New Registered Users
Post by: KMKM on June 18, 2006, 03:58:22 AM
Quote from: husmen73 on June 14, 2006, 08:52:33 AM
Thanks MJJOS


Only SMF 1.1RC2

Mod ;)
Download links -->
  • English (http://www.alemshare.net/download.php?id=uWRjI8CmPWYUcitk3zT0)
  • Turkish (http://www.alemshare.net/download.php?id=CPDcdtrgMZlbnx2LptEV)
er... problem
u have given links of BOTH turkish downloads.. please give the english one :)
Title: Re: PM to New Registered Users
Post by: husmen73 (Gulhin) on June 19, 2006, 08:05:45 AM
new link :D

http://www.alemshare.net/download.php?id=aTW9L177hU1IJlvOHw9T

Edit: 27.06.2006 ;)
Title: Re: PM to New Registered Users
Post by: PrizeLive.com on June 29, 2006, 09:12:39 AM
What's the code for 1.1 RC2?
Title: Re: PM to New Registered Users
Post by: L.G.S on June 29, 2006, 11:13:23 AM
The code isn't that helpful actually.

All it does it enter the code from this topic into your files, it doesn't give you options to change the message etc, you have to do it manually.
Title: Re: PM to New Registered Users
Post by: tarkhorani on June 29, 2006, 11:49:35 AM
Good
Title: Re: PM to New Registered Users
Post by: husmen73 (Gulhin) on July 04, 2006, 09:56:02 AM
Quote from: SurfExcelerator.com on June 29, 2006, 09:12:39 AM
What's the code for 1.1 RC2?
This is Mod for 1.1 RC2
Download Here (http://www.alemshare.net/download.php?id=aTW9L177hU1IJlvOHw9T)
Title: Re: PM to New Registered Users
Post by: tarkhorani on July 05, 2006, 11:19:05 AM
Quote from: husmen73 on July 04, 2006, 09:56:02 AM
Quote from: SurfExcelerator.com on June 29, 2006, 09:12:39 AM
What's the code for 1.1 RC2?
This is Mod for 1.1 RC2
Download Here (http://www.alemshare.net/download.php?id=aTW9L177hU1IJlvOHw9T)

I download and installed it but where can I set the propeties and how can Use it
Title: Re: PM to New Registered Users
Post by: husmen73 (Gulhin) on July 05, 2006, 11:28:53 AM
Quote from: tarkhorani on July 04, 2006, 09:56:02 AM
This is Mod for 1.1 RC2
I download and installed it but where can I set the propeties and how can Use it

Sub-members.php look for
// welcomemessage options:)
sendpm($pmto, 'Welcome!!!', 'WE THANK MEMBER YOU FOR ISING...', 0, $pmfrom);

Subject='Welcome'
Messaje='WE THANK MEMBER YOU FOR ISING...'         ;)

Edit mod: download here (http://rapidshare.de/files/25017078/pmregisteredmessage_eng2.zip.html)
Title: Re: PM to New Registered Users
Post by: Vinspire on July 07, 2006, 11:46:11 AM
Is it possible to manually install this mods ?

And i think the mod creator should develop this mod and make it a real mod as in the admin can choose who to send this specific PM & What is the message and subject not modifying the subs-members ourself. Thanks :)
Title: Re: PM to New Registered Users
Post by: L.G.S on July 07, 2006, 11:53:29 AM
The manual mod can be found at the first post of this page
Title: Re: PM to New Registered Users
Post by: Vinspire on July 07, 2006, 01:23:05 PM
Quote from: Kirby on December 17, 2004, 07:54:02 PM
Open Register.php
Look for:
// Admin gets informed here...
adminNotify('approval', $memberID, $_POST['user']);
}


Add after:

// 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);


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

This one ? This code had been posted 2 yrs ago .... Are you sure it would work in SMF 1.1 RC 2 ?
Title: Re: PM to New Registered Users
Post by: L.G.S on July 07, 2006, 01:34:27 PM
I am using it myself so yeah I'm sure ;D
Title: Re: PM to New Registered Users
Post by: Vinspire on July 07, 2006, 02:00:45 PM
Quote from: L.G.S on July 07, 2006, 01:34:27 PM
I am using it myself so yeah I'm sure ;D

Dude, i cant find this code in register.php


// Admin gets informed here...
adminNotify('approval', $memberID, $_POST['user']);
}
Title: Re: PM to New Registered Users
Post by: PrizeLive.com on July 07, 2006, 04:15:25 PM
I couldn't find it either.

All I found that was similar was:

adminNotify('activation', $row['ID_MEMBER'], $row['memberName']);

What do we do to make this work for version 1.1 RC2?
Title: Re: PM to New Registered Users
Post by: L.G.S on July 07, 2006, 06:21:13 PM
I said the top of THIS page (page 8 when I posted it).

Meaning this:


So, for 1.1RC2, in Subs-Members.php, find:


// Admin gets informed here...
adminNotify('approval', $memberID, $regOptions['username']);
}


AFTER that, insert:


    // 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);
Title: Re: PM to New Registered Users
Post by: PrizeLive.com on July 07, 2006, 08:30:52 PM
I've installed this and uploaded the new file but no PM gets sent to the new member. Is it because I don't "Require user to activate the account"?

How can I fix the code to make a PM be sent to the new member that registers.

Is there also a way to send an email to the member at the same time? So they get both a welcome PM and welcome email?

Along the same lines, how can I send an email to members who havent been to the forum since a specific date?
Title: Re: PM to New Registered Users
Post by: Vinspire on July 08, 2006, 12:55:18 AM
Thanks L.G.S.

I manage to get it working :)
Title: Re: PM to New Registered Users
Post by: PrizeLive.com on July 08, 2006, 10:49:00 AM
Quote from: Vinspire on July 08, 2006, 12:55:18 AM
Thanks L.G.S.

I manage to get it working :)

Could you help to share what you did?
Title: Re: PM to New Registered Users
Post by: Vinspire on July 08, 2006, 01:27:58 PM
original msg from MJJOS

Yes it can be made work with 1.1RC2, what he is saying is, take the original code given by Kirby, and put it into Subs-Members.php

So, for 1.1RC2, in Subs-Members.php, find:
// Admin gets informed here...
adminNotify('approval', $memberID, $regOptions['username']);
}


AFTER that, insert:
    // 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);


Remember to replace Subject Here with the PM subject, and Message Here with the pm's message.
Thats it, it works perfectly, and that way you wont get that error message that was coming up. I tried it, so it should be fine for most people.

Great idea by the way! Hope that helps.
Title: Re: PM to New Registered Users
Post by: PrizeLive.com on July 08, 2006, 06:18:30 PM
I've done that and it doesn't work... It sends no PM to new members...
Title: Re: PM to New Registered Users
Post by: Vinspire on July 09, 2006, 12:16:10 AM
Quote from: husmen73 on July 05, 2006, 11:28:53 AM
Quote from: tarkhorani on July 04, 2006, 09:56:02 AM
This is Mod for 1.1 RC2
I download and installed it but where can I set the propeties and how can Use it

Sub-members.php look for
// welcomemessage options:)
sendpm($pmto, 'Welcome!!!', 'WE THANK MEMBER YOU FOR ISING...', 0, $pmfrom);

Subject='Welcome'
Messaje='WE THANK MEMBER YOU FOR ISING...'         ;)

Edit mod: download here (http://rapidshare.de/files/25017078/pmregisteredmessage_eng2.zip.html)

Try downloading this then :)
Title: Re: PM to New Registered Users
Post by: PrizeLive.com on July 09, 2006, 12:18:39 AM
Quote from: Vinspire on July 09, 2006, 12:16:10 AM
Quote from: husmen73 on July 05, 2006, 11:28:53 AM
Quote from: tarkhorani on July 04, 2006, 09:56:02 AM
This is Mod for 1.1 RC2
I download and installed it but where can I set the propeties and how can Use it

Sub-members.php look for
// welcomemessage options:)
sendpm($pmto, 'Welcome!!!', 'WE THANK MEMBER YOU FOR ISING...', 0, $pmfrom);

Subject='Welcome'
Messaje='WE THANK MEMBER YOU FOR ISING...'         ;)

Edit mod: download here (http://rapidshare.de/files/25017078/pmregisteredmessage_eng2.zip.html)

Try downloading this then :)

does that mean it will only be available for 30 days?  it says it'll be deleted unless i download the premium one..
Title: Re: PM to New Registered Users
Post by: Vinspire on July 09, 2006, 12:33:29 AM
Nope, that is rapidshare. I don't think they would delete your file after 30 days.

Am not sure thou but i don't think it will make any effect :P
Title: Re: PM to New Registered Users
Post by: dæmon on July 21, 2006, 08:41:26 PM
Dumb question time.  How do I put a break in?  I tried <br>, <br />, /n, <p></p>... but none of them worked.
Title: Re: PM to New Registered Users
Post by: SpyDie on July 22, 2006, 05:24:35 AM
It may be easier to use the mod that was created:

http://mods.simplemachines.org/index.php?mod=387

HTH
Title: Re: PM to New Registered Users
Post by: Maksa on July 27, 2006, 12:45:50 AM
Quote// 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);

It's working. But It's showing "Guest" Undermy username. Infact i am Administrator.

Maksa
Guest

Wat if new member want to reply? Coz it send mail as Guest not Admin.

my edited code


Quote// Set up the message arrays
   $pmfrom = array(
      'id' => 1,
      'name' => 'Maksa',
      'username' => 'Maksa'
   );
   $pmto = array(
      'to' => array($memberID),
      'bcc' => array()
   );
   
   // Give them a warm welcome via PM :)
   sendpm($pmto, 'Welcome My Friend', 'Welcome to Maksazone.com Hope u will enjoy here. please keep posting to make our site better. <br>Feel free to contact me or e-mail me at [email protected] for any help of sugesstions.<br><br> Thanks,<br>Maksa (Mayur K. Saparia)<br>Maksazone.com', 0, $pmfrom);

also wanted to know one more thing..


Is it possible to make that text with bold, links n diffrent text colors. like below

Welcome to Maksazone.com (http://maksazone.com) Hope u will enjoy here. please keep posting to make our site better.


Waiting for Reply...
Title: Re: PM to New Registered Users
Post by: Col on January 28, 2007, 06:37:09 PM
Hi,

Anyone using this version with SMF1.1.1?

Thanks.
Title: Re: PM to New Registered Users
Post by: Vinspire on January 29, 2007, 09:34:02 PM
Quote from: Col on January 28, 2007, 06:37:09 PM
Hi,

Anyone using this version with SMF1.1.1?

Thanks.

I am wondering the same answer ...
Title: Re: PM to New Registered Users
Post by: askepott on November 13, 2007, 04:31:24 AM
is there a mod for 1.1.4?
Title: Re: PM to New Registered Users
Post by: Nibogo on November 20, 2008, 07:36:50 PM
Pm to New Members Mod:

http://custom.simplemachines.org/mods/index.php?mod=1517 (http://custom.simplemachines.org/mods/index.php?mod=1517)

For smf 2.0 only
Title: Re: PM to New Registered Users
Post by: m1993 on July 03, 2010, 03:33:53 PM
can i use this mod in smf 1.1.1
Title: Re: PM to New Registered Users
Post by: MsAdvantageous on December 08, 2010, 06:44:23 PM
thanks for this :)
Title: Re: PM to New Registered Users
Post by: Alison Black on December 20, 2010, 02:36:39 PM
I just tried to install this mod, the PM to new registered user's, I upload the zip file ok, but when i go to apply the mod, I get a really wierd error that has huge red rectangle blocks on the top and bottom of the screen, this is the message, i should also comment, then when my SMF forum checks to test the files all say test ok/successful, so i dunno what the eroor means. i hope you will here is a copy of what it looks like:

1.   Execute Modification   ./Sources/ManageRegistration.php   Test successful
2.   Execute Modification   ./Sources/Subs-Members.php   Test successful
3.   Execute Modification   ./Themes/default/Register.template.php   Test successful
4.   Execute Modification   ./Themes/default/languages/Modifications.english.php   Test successful

ERROR after applying mod option:

ERROR

The requested URL could not be retrieved

While trying to retrieve the URL: MYWEBSITE/forum/index.php?action=packages;sa=install2;package=PM_On_Registration.tar.gz

The following error was encountered:

Zero Sized Reply

Squid did not receive any data for this request.

Your cache administrator is webmaster.

Generated Mon, 20 Dec 2010 19:27:43 GMT by demil1.byetcluster.com (Lusca/LUSCA_HEAD-r14756).


**Is there anything I need to do to the files before hand, before I apply them, as they are all chmod to 777, and I really haven't a clue to what occured. Any help would be great. Thanks )

PS: I am using the 1.1.12 smf forum, i saw (I think) something about 2.0 RC4 or similar, do i need to upgrade again? or can anyone help me with the same file in 1.1.12 version or if anyone knows a type of mod like this to use on my version? Unless it is caused by some other problem?