ListMailPRO Email Marketing Software Forums
ListMailPRO Email Marketing Software Forums => Customization, Integration => Topic started by: scottscomp on July 01, 2008, 01:04:49 pm
-
Hey guys!
I am integrating my listmail pro with the amember membership system. The only thing left to do is update the unsubscription link.
When I use !remove it automatically inserts the removal link.
What I need to do is insert this code:
if (preg_match('/"*(.*?)"*s*<(.+?)>s*$/', $email, $regs)){
$email_only = $regs[2];
} else
$email_only = $email;
$sign = substr(md5($email_only.'-AMEMBER'), 0, 4);
$link = "$config[root_url]/unsubscribe.php?e=$e&s=$sign";
Where $email is the subscribers email address, and it spits out the removal link as $link.
Subscribers are then sent to amember to unsubscribe, and amember makes sure they are also removed from listmailpro.
I just need to know which file "generates" the removal link so I can replace it with my code. :)
-Scott
-
I believe the file is "rem.php".
Hope that helps.
-
Since the addition of remove link code options an additional parameter and various styles of remove link were added. There are a few ways to pass the user data:
1. Just the uid: "rem.php&u=ab123cd" which would mean no code options could be used and the remove confirm page is shown.
2. The code id and the uid: "rem.php?u=123,ab123cd" the set options are used (such as multi-list remove and one-click remove)
3. The code id, list and email: "rem.php?x=123,2,user@example.com" the options set in ListMail are used.
I recommend a cURL, fopen or file_get_contents() to the rem.php file to make things easy, as seen here:
http://listmailpro.com/forum/index.php?topic=1160.0
Regards
-
I figured it out!
The removal link is generated on line 669 of admin.php.
I was able to remove the link generation code there and add my own, so when a user "unsubscribes", they are *actually* unsubscribing from amember. When cron runs that night, amember will remove them from listmail.
-
Just FYI, this is what I replaced it with:
case 'remove' :
$sign = substr(md5($email.'-AMEMBER'), 0, 4);
$rlink = "http://www.forexconfidential.com/members/unsubscribe.php?e=$email&s=$sign";
$rtext = "You can cease receiving further updates here:\n";
if($mhtml=='1'){ $rtext .= "<br><a href=\"$rlink\">$rlink</a><br><br>"; } else { $rtext .= $rlink; }
$xmsg = eregi_replace($keych . $ref,$rtext,$xmsg);
break;
So now when someone unsubscribes from a message we send in Listmail, they actually unsubscribe from the aMember list. :)
-Scott