Member Reject Button / Member Rejection Letter

Hi!

RE: DOLPHIN 7.0.4

For those who are still looking for the Reject Button on the Admin Members page and wish to be able to reject certain new members with the Rejection Letter going out - HERE IS THE SOLUTION:

You will need to create one Language Key and the only file you need to update is /administration/profiles.php

1. In profiles.php find on Line 49 or near

 

//--- Process Actions ---//

if(isset($_POST['adm-mp-activate']) && (bool)$_POST['members']) {

$GLOBALS['MySQL']->query("UPDATE `Profiles` SET `Status`='Active' WHERE `ID` IN ('" . implode("','", $_POST['members']) . "')");

 

$oEmailTemplate = new BxDolEmailTemplates();

foreach($_POST['members'] as $iId) {

createUserDataFile((int)$iId);

reparseObjTags('profile', (int)$iId);

 

$aProfile = getProfileInfo($iId);

$aMail = $oEmailTemplate->parseTemplate('t_Activation', array(), $iId);

sendMail($aProfile['Email'], $aMail['subject'], $aMail['body']);

 

$oAlert = new BxDolAlerts('profile', 'change_status', (int)$iId, 0, array('status' => 'Active'));

$oAlert->alert();

}

echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>";

exit;

}

2. Copy it and paste directly after. Then change all references to "activation" to "rejection". OR, simply paste the following code

// REJECT START

if(isset($_POST['adm-mp-reject']) && (bool)$_POST['members']) {

$GLOBALS['MySQL']->query("UPDATE `Profiles` SET `Status`='Rejected' WHERE `ID` IN ('" . implode("','", $_POST['members']) . "')");

 

$oEmailTemplate = new BxDolEmailTemplates();

foreach($_POST['members'] as $iId) {

createUserDataFile((int)$iId);

reparseObjTags('profile', (int)$iId);

 

$aProfile = getProfileInfo($iId);

$aMail = $oEmailTemplate->parseTemplate('t_Rejection', array(), $iId);

sendMail($aProfile['Email'], $aMail['subject'], $aMail['body']);

 

$oAlert = new BxDolAlerts('profile', 'change_status', (int)$iId, 0, array('status' => 'Rejected'));

$oAlert->alert();

}

echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>";

exit;

}

// REJECT END

3. Find the string: 'adm-mp-activate' => _t('_adm_btn_mp_activate'),

4. Paste above it (or wherever you want the button to be): 'adm-mp-reject' => _t('_adm_btn_mp_reject'),

5. Create Lang Key - _adm_btn_mp_reject

YOU ARE SORTED!

Best!

Eugene

Quote · 15 Jan 2011

I installed it... appears to work fine on v 7.0.8

I think this should be added to the core for the next update.

Thank you for posting this!

Paul

http://pkforum.dolphinhelp.com
Quote · 19 Jan 2012

I also did on 7.0.9 works perfect

Quote · 1 Feb 2012

Hello,

I also installed it and in general the rejection works. At least the profiles are marked as rejected. There ist just one but: The owner of the profile does not get the email. Does anyone have an idea where the problem could be?

 

Quote · 19 Feb 2012

I found everything but this 'adm-mp-activate' => _t('_adm_btn_mp_activate'),    

any clues?

 

And I have never created a lang key so how is that done?

Quote · 21 Feb 2012

 

I found everything but this 'adm-mp-activate' => _t('_adm_btn_mp_activate'),    

any clues?

 

And I have never created a lang key so how is that done?

 In /administrator/profiles.php search for code: $aButtons = array(  

This is the list of buttons... add the reject button wherever you want it to be, e.g. between _confirm and _delete.

Next, go to Admin > Settings > Languages Settings > Manage Keys ... click on  Add Key and enter _adm_btn_mp_reject ... as Key name... then add Reject as String text. 

Hope that helps.

http://pkforum.dolphinhelp.com
Quote · 21 Feb 2012

I found this at line 51 in profile.php

 

//--- Process Actions ---//

if(isset($_POST['adm-mp-activate']) && (bool)$_POST['members']) {

    $GLOBALS['MySQL']->query("UPDATE `Profiles` SET `Status`='Active' WHERE `ID` IN ('" . implode("','", $_POST['members']) . "')");

 

    $oEmailTemplate = new BxDolEmailTemplates();

    foreach($_POST['members'] as $iId) {

   createUserDataFile((int)$iId);

   reparseObjTags('profile', (int)$iId);

 

   $aProfile = getProfileInfo($iId);

$aMail = $oEmailTemplate->parseTemplate('t_Activation', array(), $iId);

sendMail($aProfile['Email'], $aMail['subject'], $aMail['body'], $iId, array(), 'html', false, true);

 

        $oAlert = new BxDolAlerts('profile', 'change_status', (int)$iId, 0, array('status' => 'Active'));

        $oAlert->alert();

    }

    echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>";

    exit;

// REJECT START

if(isset($_POST['adm-mp-reject']) && (bool)$_POST['members']) {

$GLOBALS['MySQL']->query("UPDATE `Profiles` SET `Status`='Rejected' WHERE `ID` IN ('" . implode("','", $_POST['members']) . "')");

 

$oEmailTemplate = new BxDolEmailTemplates();

foreach($_POST['members'] as $iId) {

createUserDataFile((int)$iId);

reparseObjTags('profile', (int)$iId);

 

$aProfile = getProfileInfo($iId);

$aMail = $oEmailTemplate->parseTemplate('t_Rejection', array(), $iId);

sendMail($aProfile['Email'], $aMail['subject'], $aMail['body']);

 

$oAlert = new BxDolAlerts('profile', 'change_status', (int)$iId, 0, array('status' => 'Rejected'));

$oAlert->alert();

}

echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>";

exit;

 

However I'm not sure about the rest of what your referring to do. would like to know what determines string., since I'm green as grass on most of this technical matters. However I'm learning everyday.

Quote · 14 Mar 2012

I added this after code consisting line 51

//--- Process Actions ---//

if(isset($_POST['adm-mp-activate']) && (bool)$_POST['members']) {

    $GLOBALS['MySQL']->query("UPDATE `Profiles` SET `Status`='Active' WHERE `ID` IN ('" . implode("','", $_POST['members']) . "')");

 

    $oEmailTemplate = new BxDolEmailTemplates();

    foreach($_POST['members'] as $iId) {

   createUserDataFile((int)$iId);

   reparseObjTags('profile', (int)$iId);

 

   $aProfile = getProfileInfo($iId);

$aMail = $oEmailTemplate->parseTemplate('t_Activation', array(), $iId);

sendMail($aProfile['Email'], $aMail['subject'], $aMail['body'], $iId, array(), 'html', false, true);

 

        $oAlert = new BxDolAlerts('profile', 'change_status', (int)$iId, 0, array('status' => 'Active'));

        $oAlert->alert();

    }

    echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>";

    exit;

// REJECT START

if(isset($_POST['adm-mp-reject']) && (bool)$_POST['members']) {

$GLOBALS['MySQL']->query("UPDATE `Profiles` SET `Status`='Rejected' WHERE `ID` IN ('" . implode("','", $_POST['members']) . "')");

 

$oEmailTemplate = new BxDolEmailTemplates();

foreach($_POST['members'] as $iId) {

createUserDataFile((int)$iId);

reparseObjTags('profile', (int)$iId);

 

$aProfile = getProfileInfo($iId);

$aMail = $oEmailTemplate->parseTemplate('t_Rejection', array(), $iId);

sendMail($aProfile['Email'], $aMail['subject'], $aMail['body']);

 

$oAlert = new BxDolAlerts('profile', 'change_status', (int)$iId, 0, array('status' => 'Rejected'));

$oAlert->alert();

}

echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>";

exit;

}

 

However I still need to complete the rest once I figure it out. where to place the rest of the code changes.

Quote · 14 Mar 2012

Now that I installed code as described here, I get an error message


Warning: Cannot modify header information - headers already sent by (output started at /home/mrbrakes/public_html/industriesunlimitedcorp.com/administration/profiles.php:2) in/home/mrbrakes/public_html/industriesunlimitedcorp.com/inc/admin_design.inc.php on line 56

This started when I went to do a backup of my site to allow more changes to my site.

Now  line 56 refers to  $oEmailTemplate = new BxDolEmailTemplates();

so is there a fix to resolve this?

Quote · 14 Mar 2012

Re-open the file(s) you edited (appears to be /administration/profiles.php) and remove any extra spaces at the end of the file... so the last character is the ">"

Then clear your cache files (in the Admin Dashboard) and, just to be sure, clear the cache in your browser.

http://pkforum.dolphinhelp.com
Quote · 14 Mar 2012

I have attached a results when attempting to create a restore point after this code changes where made. 

the system will not create a restore point to use later., this is also with the other issue mentioned earlier.

Quote · 14 Mar 2012

Ok since I installed the script my database will not create a backup. I have attached the current view of profile.php

and I have all the issues listed above.

profile.php · 26.1K · 303 downloads
Quote · 15 Mar 2012

Thanks for your help, I found out the issues after installing this script is not directly related to instillation of the script. I found I need a resolution for other issues..

Quote · 15 Mar 2012
Hello My name is Jesica (single). I was impressed when i saw your profile today, and i will like to establish a long lasting relationship with you. In addition,i will like you to reply me through this my private e-mail box (jesicajobe@hotmail.com) Thanks. waiting to hear from you soon, Jesica. I will send to you my pictures in my next mail through this my mail box jesicajobe@hotmail.com
Quote · 24 Apr 2012

Nice!  Works great on D 7.0.9!

http://www.mytikibar.com
Quote · 24 Apr 2012

Its not creating an Email template for me - any help would be appreciated but is working fine,

I recieve an email which states - =?UTF-8?B??= in the Subject bar .

All for one and one for all....ah sod it who am i kidding!
Quote · 15 Jul 2012

Is there anything that needs to be done to update this for 7.1? The button appears just fine but the email sent is blank, and ideally I'd like to be able to adjust the email that is sent, and I cannot find where to do this in 7.1 (I believe it appeared with other email templates in 7.0).

Quote · 12 Dec 2012

Doesn't work in dolphin 7.1 - update needed please 

All for one and one for all....ah sod it who am i kidding!
Quote · 28 Apr 2013
 
 
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.