From f67b3f1a275c2305e6714ea8ff2d8489347ccf05 Mon Sep 17 00:00:00 2001 From: Sam Tuke Date: Tue, 6 Aug 2019 12:00:12 +0200 Subject: [PATCH 1/3] Renamed plugin to Repermission Plugin --- ...nviteplugin.php => RepermissionPlugin.php} | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) rename plugins/{inviteplugin.php => RepermissionPlugin.php} (68%) mode change 100644 => 100755 diff --git a/plugins/inviteplugin.php b/plugins/RepermissionPlugin.php old mode 100644 new mode 100755 similarity index 68% rename from plugins/inviteplugin.php rename to plugins/RepermissionPlugin.php index 5b44f33..ced934f --- a/plugins/inviteplugin.php +++ b/plugins/RepermissionPlugin.php @@ -1,38 +1,39 @@ array( + 'repermissionplugin_subscribepage' => array( 'value' => 0, - 'description' => 'Subscribe page for invitation responses', + 'description' => 'Subscribe page for repermission campaign responses', 'type' => 'integer', 'allowempty' => 0, 'min' => 0, 'max' => 999999, - 'category' => 'Invite plugin', + 'category' => 'Repermission plugin', ), - 'inviteplugin_targetlist' => array( + 'repermissionplugin_targetlist' => array( 'value' => 0, - 'description' => 'Add subscribers confirming an invitation to this list', + 'description' => 'Add subscribers confirming a repermission campaign to this list', 'type' => 'integer', 'allowempty' => 0, 'min' => 0, 'max' => 999999, - 'category' => 'Invite plugin', + 'category' => 'Repermission plugin', ), ); @@ -43,13 +44,13 @@ public function adminmenu() public function sendFormats() { - return array('invite' => s('Invite')); + return array('repermission' => s('Repermission')); } public function allowMessageToBeQueued($messagedata = array()) { - // we only need to check if this is sent as an invite - if ($messagedata['sendformat'] == 'invite') { + // we only need to check if this is sent as a repermission campaign + if ($messagedata['sendformat'] == 'repermission') { $hasConfirmationLink = false; foreach ($messagedata as $key => $val) { if (is_string($val)) { @@ -57,7 +58,7 @@ public function allowMessageToBeQueued($messagedata = array()) } } if (!$hasConfirmationLink) { - return $GLOBALS['I18N']->get('Your campaign does not contain a the confirmation URL placeholder, which is necessary for an invite mailing. Please add [CONFIRMATIONURL] to the footer or content of the campaign.'); + return $GLOBALS['I18N']->get('Your campaign does not contain a the confirmation URL placeholder, which is necessary for a repermission campaign. Please add [CONFIRMATIONURL] to the footer or content of the campaign.'); } } @@ -67,9 +68,9 @@ public function allowMessageToBeQueued($messagedata = array()) public function processSendSuccess($messageid, $userdata, $isTestMail = false) { $messagedata = loadMessageData($messageid); - if (!$isTestMail && $messagedata['sendformat'] == 'invite') { + if (!$isTestMail && $messagedata['sendformat'] == 'repermission') { if (!isBlackListed($userdata['email'])) { - addUserToBlackList($userdata['email'], s('Blacklisted by the invitation plugin')); + addUserToBlackList($userdata['email'], s('Blacklisted by the repermission plugin')); } Sql_Query(sprintf( 'update %s @@ -79,7 +80,7 @@ public function processSendSuccess($messageid, $userdata, $isTestMail = false) $userdata['id'] )); // if subscribe page is set, mark this subscriber for that page - $sPage = getConfig('inviteplugin_subscribepage'); + $sPage = getConfig('repermissionplugin_subscribepage'); if (!empty($sPage)) { Sql_Query(sprintf( 'update %s set subscribepage = %d where id = %d', @@ -93,8 +94,8 @@ public function processSendSuccess($messageid, $userdata, $isTestMail = false) public function subscriberConfirmation($subscribepageID, $userdata = array()) { - $sPage = getConfig('inviteplugin_subscribepage'); - $newList = getConfig('inviteplugin_targetlist'); + $sPage = getConfig('repermissionplugin_subscribepage'); + $newList = getConfig('repermissionplugin_targetlist'); if (!empty($sPage) && !empty($newList) && $sPage == $subscribepageID) { if ($userdata['blacklisted']) { // the subscriber has not been unblacklisted yet at this stage From e56109da6a4f5f2ebc72e698a3c01ff6cc0828f7 Mon Sep 17 00:00:00 2001 From: Sam Tuke Date: Tue, 6 Aug 2019 12:00:37 +0200 Subject: [PATCH 2/3] Change back file permissions --- plugins/RepermissionPlugin.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 plugins/RepermissionPlugin.php diff --git a/plugins/RepermissionPlugin.php b/plugins/RepermissionPlugin.php old mode 100755 new mode 100644 From 642fc4e846212ac136f0fd2ad0876f8c9ef2bab5 Mon Sep 17 00:00:00 2001 From: Sam Tuke Date: Tue, 6 Aug 2019 12:02:52 +0200 Subject: [PATCH 3/3] Update references to invite -> repermission --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 171741f..1e0ad12 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,15 @@ -# phplist-plugin-invite +# phplist-plugin-repermission -Invite people to join your phpList system. - -v0.2 2013-08-28 +Send repermission campaigns which require subscribers to re-confirm their list membership. requires phpList version 3.0.3 or newer -This plugin will use the campaign system to send a one-off invite to your subscribers. After that, phpList will ensure -further campaigns will only go out to subscribers who responded to the invite. +This plugin will use the campaign system to send a one-off repermission campaign to your subscribers. After that, phpList will ensure +further campaigns will only go out to subscribers who responded to the request. It does this as follows: - - in the Send-campaign page, on the Format tab, there will be an option (radio button) called "Invite". Choose this option to send the campaign as an Invite. + - in the Send-campaign page, on the Format tab, there will be an option (radio button) called "Repermission". Choose this option to send the campaign as a repermission campaign. - When you do so, you need to add [CONFIRMATIONURL] to the content. The confirmation URL will be the place where the recipients can confirm that they want to be in your system. - After sending the campaign, the subscriber will be marked "Blacklisted" in the phpList system, which means no further mails will be sent. HOWEVER: - The recipients who clicked the Confirmation URL will be removed from the blacklist and turn into normal subscribers.