#######################################################################
NOTE: There is a newer version of the plugin available on the second page of this post.
Updated post 10/14/2010
#######################################################################
Hello everyone,
I've attached the final version for the first round of the Email New Account Activated plugin that I build with the help of CMSB staff and @Djulia. I hope you find it useful. So what does this plugin do? What it does is add a link to the "accounts" list labeled "email account activated" for admin users only. When you click on that link a pre-formatted email from the plugin code is sent to email address of the line in the list of records you clicked on.
The reason I built this plugin was I'm using the "Membership Plugin" from CMSB which I have customized a little for a client. My client did not want accounts to be active until they had a chance to review who they were and approve them. So what I did was add a check box to the accounts section called "Active" that is defaulted to unchecked which is inactive. It's a simple concept, when my client checks off the box the account becomes active. I then added some code to each member page to check if they are active or not. If not the member is re-directed to a page explaining that they are not active yet. I know there is some overhead that gets added with this check on every page, but the client wanted to be able to lock someone out of their member section in real time so I had to do it.
So when my client reviews the new member and checks off the box that they are active, of course, they wanted an easy way to notify the client that they are active. This is how the plugin was born. They said to me, "Mike it would be great if we could have a link right here that allowed us to click once to send a template email to the client and be done with it". Being the pepole pleaser that I am I had to say yes and now we have a new plugin.
Enjoy!
Mike
TIPS:
- You can specify what list the link shows in in the "gl_ena_addLink" function.
- You can change the $message variable for the email to say whatever you want, but if you are not familiar with how concatenation works you may want to read up on it here first
http://www.w3schools.com/PHP/php_string.asp - The "notice($message) function will change the blue alert that displays after the email is sent to say whatever you want so you could for example put "notice("Your alert text here")".
Graphic Lingoes
www.graphiclingoes.com