set membership signup to default to "disabled"
39 posts by 6 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: July 19, 2012 (RSS)
By gkornbluth - May 11, 2010
I'm sorry this has been such a pain.
The spaces were the trick to the error messages
The code is not happy with " and even with \" or " the e-mail still prints
<a href=\"http://www.artistsofpalmbeachcounty.org/sample_login.php\">Click here to login</a>
or
<a href="http://www.artistsofpalmbeachcounty.org/sample_login.php">Click here to login</a>
I even tried htmlspecialchars but that rendered the same result.
Why is it the seemingly simple causes the most grief?
Jerry
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [gkornbluth] set membership signup to default to "disabled"
By Jason - May 11, 2010
What exactly is the error that you're experiencing?
Could I see an updated copy of your file.
Thanks.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [gkornbluth] set membership signup to default to "disabled"
By gkornbluth - May 12, 2010
I've attached the plugin code that I'm using. The plugin does send an e-mail when the "approved" checbox is checked in the user account.
However, what should be a clickable link in the e-mail prints out with the actual href code:
<a href=\"http://www.artistsofpalmbeachcounty.org/sample_login.php\">Click here to login</a>
If I replace the escape with the character entity " then I get this in the e-mail:
<a href=""http://www.artistsofpalmbeachcounty.org/sample_login.php"">Click here to login</a>
The same is true for \"Members Only\" or "Members Only"
Thanks,
Jerry
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [gkornbluth] set membership signup to default to "disabled"
By Jason - May 14, 2010
What's happening is that your message is sending as plain text, that's why it's not rendering the HTML. Try this code for sending your email:
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .="FROM:". $SETTINGS['adminEmail'];
$errors=mail($_REQUEST['email'],"Your membership has been approve!",$message,$headers);
if ($errors!=1) { die("Mail Error: $php_errormsg"); }
Give this a try and let me know how it works. You may want to remove the escape characters from your <a> link.
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
By gkornbluth - May 14, 2010
I'll give it a try and report back
Jerry
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
By gkornbluth - May 14, 2010
I know I'm asking a lot, but there have been so many changes and adjustments in the file attached above.
Could you be more specific about where in the file the code you suggest should be inserted, and what needs to be removed?
Thanks
Jerry
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [gkornbluth] set membership signup to default to "disabled"
By Jason - May 14, 2010
No problem,
You can replace all of the code below the __TEXT__; line with this:
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .="FROM:". $SETTINGS['adminEmail'];
if ($wasChecked) {
$errors = $errors=mail($_REQUEST['email'],"Your membership has been approve!",$message,$headers);
if ($errors!=1) { die("Mail Error: $php_errormsg"); }
}
}
?>
So this code will take you right up to the end of the page.
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
By gkornbluth - May 14, 2010
Thanks for your assistance and perseverance.
Best,
Jerry
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [gkornbluth] set membership signup to default to "disabled"
By Jason - May 14, 2010
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
By gkornbluth - May 15, 2010
It worked perfectly. Thanks again.
BTW - What does the __TEXT__ code do? I tried Googling it and didn't find anything that seemed related. (except these posts)
Best,
Jerry Kornbluth
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php