Solution for unsubcribe from a single list idea

Hi all:

I am no coder by any means but I know enough to screw things up.

The current solution for unsubscribing to one list instead of ALL right now is not working for me. How does this sound?

  1. Come up with an attribute that will provide a link as follows:

https://www.mysite.com/phplist/?p=singleunsubscribe&listid=3&uid=be900cdb992cc040b67993595f2819f6&utm_source=phplist17&utm_medium=email&utm_content=HTML&utm_campaign=TEST

  1. Run this querystring through a SQL statement that will do the following:

Go to the pyli_listuser record for this uid and update the listid from 3 (in this case) to 300

I am assuming most people do not have over 100 lists so by adding 00 to the end of the original list id will show that that person WAS on that list but now does not receive emails

Just my 2 cents. Please LMK any downside to this. If this sounds good I would LOVE to see it in an update so I do not need to add hacks to my code

Thanks!

Something like this:

http://www.mysite.com/test2.php?uid=be900cdb992cc040b67993595f2819f6&listid=1

$gOriginalList = $_GET[‘listid’];
$gListID .= $_GET[‘listid’];
$gListID .= ‘00’;
$gUserID = $_GET[‘uid’];

$stmt = mysqli_prepare($link, “
UPDATE plyi_listuser
INNER JOIN plyi_user_user ON plyi_listuser.userid = plyi_user_user.id
SET plyi_listuser.listid = ?
WHERE plyi_user_user.uniqid=? AND plyi_listuser.listid = ?
”);

mysqli_stmt_bind_param($stmt, ‘sss’, $gListID, $gUserID,$gOriginalList);

mysqli_stmt_execute($stmt);
mysqli_stmt_close($stmt);

Any ideas anyone???

I’m not exactly sure what you are asking. The idea of removing a subscriber from a list is feasible, but your suggested implementation of multiplying the list number by 100 is a bit weird.

What do you mean by this? The recommended approach is to get people to use their preferences to select the lists they want to belong to.

“I’m not exactly sure what you are asking. The idea of removing a
subscriber from a list is feasible, but your suggested implementation of
multiplying the list number by 100 is a bit weird.”

LOL.

Here is my reasoning.I am not actually multiplying by 100 but I am concatinating by adding a “00” (or it could be “000000000” for example) after the list id number.

  1. This will allow the the list user to be identified as a member of a list who no longer wants to receive emails from that list. For example, list ID 3. As soon as you make that list id 300 the list user will no longer receive list 3 emails but the admin can easily see that the list user chose to unsubscribe because there is a “00” after the list id 3.

  2. Code could fairly easily be written to remove the “00” and put the list user back on the subscribe side.

3.As for the preferences page I am having problems getting individual lists to unsubscribe. I just get the global blacklist. I have define(‘PREFERENCEPAGE_SHOW_PRIVATE_LISTS’, 1);

  1. As an aside I did some format changes to the preferences page and It isn’t looking as nice as I would like! :worried:

@square1 I have added some code to the existing Subscribers plugin to provide placeholders and a page to unsubscribe from a list.
There are two placeholders [LISTUNSUBSCRIBE] which generates a link (an html a element) and [LISTUNSUBSCRIBEURL] which generates only the URL.
The text of the link can be customised on the Settings page in the Subscription settings group.

The URL is of the format mysite.com/lists/?p=unsubscribe&pi=SubscribersPlugin&uid=xxxx&m=99

The main difference from your proposal is that it uses the message id, and removes the subscriber from all lists to which the message was sent. In most cases that will only be one list, but when there are several then the subscriber is removed from them all.

You can install or upgrade the Subscribers plugin using this plugin URL on the Manage Plugins page - https://github.com/bramley/phplist-plugin-subscribers/archive/list_unsubscribe.zip

Thanks you very much. Problem is the install failed:

Dependency checkPlugin can not be enabled.
Failure on system requirement Common plugin v3 installed

OK, I think I got it.

On Thu, Jan 7, 2016 at 6:08 PM, Howard Zarabet
wrote:

ABSOLUTELY BRILLIANT. ACTUALLY THIS WHOLE APP IS ABSOLUTELY BRILLIANT!
THANK YOU!
<Mod edit - removed email address to prevent bot harvesting>

Yes, I should have pointed you at the installation instructions. But glad that you find it useful.