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

Soooo close.

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 &quot; the e-mail still prints <a href=\"http://www.artistsofpalmbeachcounty.org/sample_login.php\">Click here to login</a>

or <a href=&quot;http://www.artistsofpalmbeachcounty.org/sample_login.php&quot;>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
The first CMS Builder reference book is now available on-line!







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

Hi Jerry,

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

Hi Jason,

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 &quot; then I get this in the e-mail:

<a href=&quot;"http://www.artistsofpalmbeachcounty.org/sample_login.php&quot;">Click here to login</a>

The same is true for \"Members Only\" or &quot;Members Only&quot;

Thanks,

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Attachments:

emailonapproved_002.php 2K

Re: [gkornbluth] set membership signup to default to "disabled"

By Jason - May 14, 2010

Hi Jerry,

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

Thanks Jason,

I'll give it a try and report back

Jerry
The first CMS Builder reference book is now available on-line!







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

Hi Jason,

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
The first CMS Builder reference book is now available on-line!







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

Hi Jerry,

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

Eureka!!!

Thanks for your assistance and perseverance.

Best,

Jerry
The first CMS Builder reference book is now available on-line!







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

Awesome! Glad to hear that's working now.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/