Forum Moderators: coopster

Message Too Old, No Replies

Unfamiliar Code %!unsubscription_link!%

Adapting Newsletter Script

         

bumpaw

1:36 am on Feb 14, 2004 (gmt 0)

10+ Year Member



I am trying to install a Newsletter, and have it whipped except for the unsubscribe URL that is to show at the bottom of each mail. I am new to PHP and have no luck so far trying to learn of this code format. I need to change the URL and I'm working back from this code:


<b>To leave the mailinglist:
<a href="%!unsubscription_link!%">%!unsubscription_link!%</a></b>

It's %!unsubscription_link!% that I'm interested in.

coopster

3:12 pm on Feb 14, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I could be wrong, but this looks like it may be a template-style keyword that the script developers planted and you are to either modify or set a configuration parameter somewhere in their configuration scripts. Have you checked the developers
readme
file for any direction?

bumpaw

6:03 pm on Feb 14, 2004 (gmt 0)

10+ Year Member



I have been over the readme a few times with no luck there. It seems to be dynamicly generated.


if ( ( ( $red_data["mail_format"] == "h" ¦¦ $red_data["mail_format"]!= "t" ) &&!empty( $html_mail_content ) )
¦¦ ($red_data["mail_format"] == "t" && empty( $text_mail_content ) ) )
{
$content = eregi_replace( "%!subscriber!%", $red_data["nick"], $html_mail_content );
$content = eregi_replace( "%!salutation!%", $salutation_phrase, $content );
$content = eregi_replace( "%!unsubscription_link!%", $us_link.$recipient_address, $content );
$mail->setText(null);
$mail->setHtml($content, null, null);
echo " (HTML) ";

coopster

6:48 pm on Feb 14, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



If it is dynamically generated, this isn't the place. See this line:

$content = eregi_replace [php.net]( "%!unsubscription_link!%",
$us_link.$recipient_address, $content );

That's a regular expression which is replacing the string pattern
%!unsubscription_link!%
found in the $content variable with the value in the $us_link.$recipient_address variable.

That leads me to believe that

%!unsubscription_link!%
is probably in a template somewhere or being dynamically generated elsewhere.

bumpaw

7:47 pm on Feb 14, 2004 (gmt 0)

10+ Year Member



Yes it's from the Newsletter email template. That is where the first code snip I posted came from.