I modified the update subscription page when blacklisted.

Solutions for other advanced phplisters

I modified the update subscription page when blacklisted.

Postby pia » 2:57pm, Thu 29 Mar, 2007

Not sure if this is helpful to anyone but I modified how the update subscription page handles blacklisted users.

First I added changed the following in index.php (I put arrows where I changed it, I basically moved the first two lines from the bottom of this piece of code to the top and added the third line to eliminate the form when they are blacklisted.)

-> if (isBlackListedID($userid)) {
-> $html .= $GLOBALS["strUpdWhenBlacklisted"];
-> return $html;
}
$html .= formStart('name="subscribeform"');
$html .= '<table border=0>';
$html .= ListAttributes($attributes,$attributedata,$data["htmlchoice"],$userid,$data['emaildoubleentry']);
$html .= '</table>';
if (ENABLE_RSS) {
$html .= RssOptions($data,$userid);
}
$html .= ListAvailableLists($userid,$data["lists"]);

$html .= '<p><input type=submit name="update" value="'.$GLOBALS["strUpdatePreferences"].'" onClick="return checkform();"></p>
</form><br/><br/>
<p><a href="'.getConfig("unsubscribeurl").'&id='.$id.'">'.$GLOBALS["strUnsubscribe"].'</a></p>
'.$GLOBALS["PoweredBy"];
$html .= $data["footer"];
return $html;
}

And added this to the english.inc file.

$strUpdWhenBlacklisted = '&nbsp;<p><font color=red size="3"><center><b>** Your E-mail Address is on out Blacklist **</b></center></font><hr><b>Your e-mail address is on our "Black List", which means that you, or someone, has requested not to recieve e-mails from us in the past. <p>
The only way to update your subscription is to <a href="http://youlink.com/lists/?p=subscribe&id=1">sign up again by clicking here.</a><p> If you are having trouble please contact the <a href="mailto:listadmin@youlink.com?subject=Remove%20From%20Blacklist">
List Administrator by sending an e-mail</a> and ask to be removed from the blacklist.</b><hr>';

If there is a better way to handle this please let me know because I really don't know what I am doing!!!
pia
PL Nut
 
Posts: 15
Joined: 1:55pm, Fri 23 Mar, 2007

Postby pia » 3:05pm, Thu 29 Mar, 2007

I just noticed that my code removes the powered by logo on the update page when blacklisted... I guess I need to move or copy some other code?
pia
PL Nut
 
Posts: 15
Joined: 1:55pm, Fri 23 Mar, 2007

Postby Mike_R » 12:44pm, Mon 02 Jul, 2007

Yes, you've used "return $html;" on your 3rd line, which cuts out the footer (that's put in by $GLOBALS["PoweredBy"].

I'd be tempted to make it look like this;

Code: Select all
if (isBlackListedID($userid)) {
$html .= $GLOBALS["strUpdWhenBlacklisted"];

} else { // Note new line here

$html .= formStart('name="subscribeform"');
$html .= '<table>';
$html .= ListAttributes($attributes,$attributedata,$data["htmlchoice"],$userid,$data['emaildoubleentry']);
$html .= '</table>';
if (ENABLE_RSS) {
$html .= RssOptions($data,$userid);
}
$html .= ListAvailableLists($userid,$data["lists"]);

$html .= '<p><input></p>
</form><br><br>';

// Note new '; on the line above here

} // This is new and closes the else { } from above. Then a new $html .= to add the below info (the footer) to both pages.

$html .= '<p><a>'.$GLOBALS["strUnsubscribe"].'</a></p>
'.$GLOBALS["PoweredBy"];
$html .= $data["footer"];
return $html;
}


Hope this helps.
Mike_R
PL Geek
 
Posts: 88
Joined: 10:34am, Wed 30 May, 2007


Return to Advanced Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest

cron