Auto greeting for new members

Hi, here is my method to make auto greeting for new members.

Open profile_activate.php (dolphin root derictory)

find:

sendMail($site['email_notify'], $aTemplate['Subject'], $aTemplate['Body'], $p_arr['ID']);

and after it add:

$sMessageBody = 'YOUR GREETING MESSAGE BODY HERE';

        $sMessageSubject = 'YOUR GREETING MESSAGE SUBJECT HERE';
               
                $sQuery =
                    "
                        INSERT INTO
                            `sys_messages`
                        SET
                            `Sender`       = '1', 
                            `Recipient`    = {$p_arr['ID']},
                            `Subject`      =  '{$sMessageSubject}',
                            `Text`         =  '{$sMessageBody}',
                            `Date`         = NOW(),
                            `New`          = '1',
                            `Type`         = 'letter'
                    ";
               
               
                $result = db_res($sQuery);

If you want to change the SENDER of your greeting, change digit in `Sender`       = '1', to id what you want. '1' is id of admin.


I THINK THAT THIS METHOD WORKS ONLY WHEN E-MAIL CONFIRMATION IS ACTIVATED (AS ON MY SITE), BUT I'M NOT SURE, TEST YOURSELF.


Quote · 25 Jan 2012

Very nice. This is need when they first visit the site.

Quote · 25 Jan 2012

Thanks!

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 30 Jan 2012

I know this is an old post, but I didn't see the need to start a new one.

This DOES work for only email confirmation joins, but I'm trying to get this work on my site, which is auto approve. I'm trying to add the code under this line:

            if (isAutoApproval('join'))
            {
                $status = 'Active';
                $rEmailTemplate = new BxDolEmailTemplates();
                $aTemplate = $rEmailTemplate -> getTemplate( 't_Activation' ) ;
                sendMail( $p_arr['Email'], $aTemplate['Subject'], $aTemplate['Body'], $p_arr['ID'] );

 

But it doesn't work. There's got to be a way to make this work with auto approved sign ups, anyone know where exactly this would go?

Quote · 29 Oct 2012

 Ron, try putting his code below this section (somewhere around line 145):

 

$update = db_res( "UPDATE `Profiles` SET `Status` = '$status' WHERE `ID` = '$ID';" );

createUserDataFile( $ID );

reparseObjTags( 'profile', $ID );

 

 

I know this is an old post, but I didn't see the need to start a new one.

This DOES work for only email confirmation joins, but I'm trying to get this work on my site, which is auto approve. I'm trying to add the code under this line:

            if (isAutoApproval('join'))
            {
                $status = 'Active';
                $rEmailTemplate = new BxDolEmailTemplates();
                $aTemplate = $rEmailTemplate -> getTemplate( 't_Activation' ) ;
                sendMail( $p_arr['Email'], $aTemplate['Subject'], $aTemplate['Body'], $p_arr['ID'] );

 

But it doesn't work. There's got to be a way to make this work with auto approved sign ups, anyone know where exactly this would go?

 

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 29 Oct 2012

That was actually the last place I tried, and it didn't work. I've tried it in a few places, but nothing seems to work. I know it has to, it's just a matter of finding where.

Quote · 29 Oct 2012

Did you clear the caches after you made the changes?

 

I've been through this before, trying to read an if/else statement and map it out in your head will drive you crazy.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 29 Oct 2012

Yes, I cleared all caches, and yes, it's driving me crazy Tongue Out

Quote · 29 Oct 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.