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 3, 2010
I'll give it a try.
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 gkornbluth - May 4, 2010
Thanks, the line of code in the error checking section of emailonapproved got rid of the error I was getting and the plugin is now working.
I’d like to include the login form URL in the text of the congratulations e-mail, but can’t seem to get the syntax correct.
I’m trying to use something like:
'from' => $SETTINGS['adminEmail'],
'to' => $_REQUEST['email'],
'subject' => "Your membership has been approved!",
'text' => "Congratulations!
You're membership has been approved and you now have access to the \"Members Only\" area of our web site.
Your temporary password is: {$_REQUEST['password']}. \n
Once you have successfully logged in, you can change your password and update your profile information. \n
<a href=”http://www.my_url.org{$GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL']}">Click here to login</a>
Best,
Membership Committee
Thanks,
Jerry Kornbluth
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
Are you getting an error?
From looking at your code, you could try this:
'from' => $SETTINGS['adminEmail'],
'to' => $_REQUEST['email'],
'subject' => "Your membership has been approved!",
'text' => <<< __TEXT__
Congratulations!
You're membership has been approved and you now have access to the \"Members Only\" area of our web site.
Your temporary password is: {$_REQUEST['password']}. \n
Once you have successfully logged in, you can change your password and update your profile information. \n
<a href=”http://www.my_url.org{$GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL']}">Click here to login</a>
Best,
Membership Committee
__TEXT__
It is very important that the "__TEXT__" line at the bottom be flush against the left hand side. Even if there is just a space, you'll get an error.
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/
Re: [Jason] set membership signup to default to "disabled"
By gkornbluth - May 11, 2010
Thanks for the hint.
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 gkornbluth - May 11, 2010
I gave it a try and made a few modifications (guesses) regarding the double quotes at the befginning and end of the "text" section and the escapes for the double quotes in the href. (Got errors without them)
here's the code that I'm using:
// send email
$wasChecked = intval(!$oldRecord[$fieldname] && $_REQUEST[$fieldname]);
$wasUnchecked = intval($oldRecord[$fieldname] && !$_REQUEST[$fieldname]);
if ($wasChecked) {
$errors = sendMessage(array(
'from' => $SETTINGS['adminEmail'],
'to' => $_REQUEST['email'],
'subject' => "Your membership has been approved!",
'text' => "<<< __TEXT__
Congratulations!
You're Artists of Palm Beach County membership has been approved and you now have access to the \"Members Only\" area of our web site. \n
Your user name is: {$_REQUEST['username']} \n
and your temporary password is: {$_REQUEST['password']}.\n \n
Once you have successfully logged in, you can change your password and update your profile information. \n \n
<a href=\”http://www.artistsofpalmbeachcounty.org{$GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL']}\">Click here to login</a>
Best, \n
The Membership Committee
__TEXT__
",
));
if ($errors) { die($errors); }
}
}
?>
And here's the result that I get in the e-mail:
<<< __TEXT__
Congratulations!
You're Artists of Palm Beach County membership has been approved and you now have access to the "Members Only" area of our web site.
Your user name is: fish
and your temporary password is: a2b95721c561bb5ed.
Once you have successfully logged in, you can change your password and update your profile information.
<a href=\ http://www.artistsofpalmbeachcounty.org/sample_login.php">Click here to login</a>
Best,
The Membership Committee
__TEXT__
I'm probably very close but don't what else to do.
Thanks,
Jerry Kornbluth
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
It would probably be easiest to put your email into a $message variable and then put it into your array.
Something like this:
$message=<<< __TEXT__
Congratulations!
You're Artists of Palm Beach County membership has been approved and you now have access to the \"Members Only\" area of our web site. \n
Your user name is: {$_REQUEST['username']} \n
and your temporary password is: {$_REQUEST['password']}.\n \n
Once you have successfully logged in, you can change your password and update your profile information. \n \n
<a href=\"http://www.artistsofpalmbeachcounty.org{$GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL']}\">Click here to login</a>
Best, \n
The Membership Committee
__TEXT__
Then sending your message like this:
$errors = sendMessage(array(
'from' => $SETTINGS['adminEmail'],
'to' => $_REQUEST['email'],
'subject' => "Your membership has been approved!",
'text' => $message,
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/
Re: [Jason] set membership signup to default to "disabled"
By gkornbluth - May 11, 2010
Seems that the variable $message doesn't like spaces.
There must be an easier way.
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 error are you getting? If you attach the file you're working with I can take a look at it for you.
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 11, 2010 - edited: May 11, 2010
I know I'm going to be embarrassed when I find out the answer, but the plugin file is attached.
When I try to use this I get a
Parse error: syntax error, unexpected T_SL in /hsphere/local/home/apbcweb/artistsofpalmbeachcounty.org/cmsAdmin/plugins/emailOnApproved.php on line 32
error when I try to login to the CMS Builder Admin pageJerry
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
There are some spaces (or other characters) after the
$message=<<< __TEXT__
so just make sure they are removed first. After that, just add a semicolon after the bottom __TEXT__ line:
__TEXT__;
That should take care of it for you. Let me know.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/