Here's my humble attempt at improving the registration system.
Here's what was changed from dollars5 mod:
1. Although the v.0.3 code seems to work fine for most of you, it didn't on my server. I discovered it's because it wasn't accessing my database properly. I replaced the standard MySQL commands with just enough EZsql commands to get it to work. If you were having problems with the old code, my version may work for you.
2. Originally, if the user didn't click on the confirmation email code and tried to log in, it would just say they had the wrong username/password. Now it will tell you that you never completed the confirmation process and offers to send you another confirmation email.
3. Other small tweaks to make the experience more user-friendly.
4. NEW! dollars5's v.0.3 code did not work with the "Send Welcome Private Message" module. This version now includes a private welcome message. However, since I could not get this mod to work with the original "Send Welcome Private Message" module, I just dumped the module code into the register.php file and tweaked a few things until it worked. If you don't want this capability, just delete or comment it out.
Important: I am not a developer. I modified the original mod through hours of trial and error and not through my vast knowledge of PHP. Therefore, if it doesn't work on your system I won't be able to help because I'm not completely sure why it does work on my system.
That said, let's move on:
1. Download the attached files below and put the PHP files in the Pligg root directory and the TPL files in your template/templatename directory. Don't forget that the login.php file goes in your libs directory.
2. Open your libs/lang.conf and place the following at the bottom:
Code:
/////////////////////////////////////////////////////////////////////////////////////////////
//<SECTION>CONFIRM ACCOUNT</SECTION><ADDED>0.983</ADDED>
PLIGG_Visual_Resend_Error_Email_Does_Not_Exist = "That email address does not exist in our system."
//<SECTION>CONFIRM ACCOUNT</SECTION><ADDED>0.983</ADDED>
PLIGG_Visual_Login_Confirm_Error = "ERROR - your account is still unconfirmed. <br /><br /> Please check e-mail for your confirmation link <br /><br /> or <a href='http://www.yoursite.com/resend_confirm.php' />click here</a> here have your confirmation link resent. "
//<SECTION>CONFIRM ACCOUNT</SECTION><ADDED>0.983</ADDED>
PLIGG_Visual_Resend_Confirmation = "Resend Confirmation"
//<SECTION>REGISTER</SECTION><ADDED>0.983</ADDED>
PLIGG_Visual_Resend_Confirm_Do_Not_Continue = "Resend Confirmation Unsuccessful"
//<SECTION>REGISTER</SECTION><ADDED>0.983</ADDED>
PLIGG_Visual_Resend_Confirm_Success = "Confirmation Sent"
3. Open html1.php and find the following code:
If ($x == "register") {return my_pligg_base."/register.php";}
below it add:
Code:
If ($x == "resend_confirm") {return my_pligg_base."/resend_confirm.php";}
Next, find:
If ($x == "register") {return my_pligg_base."/register";}
below it add:
Code:
If ($x == "resend_confirm") {return my_pligg_base."/resend_confirm";}
Next, find:
$main_smarty->assign('URL_register', getmyurl("register"));
below it add:
Code:
$main_smarty->assign('URL_resend_confirm', getmyurl("resend_confirm"));
4. If you are using the URL2 method, open .htaccess and find:
RewriteRule ^register/?$ register.php
below it add:
Code:
RewriteRule ^resend_confirm/?$ resend_confirm.php
5. Be sure to customize your confirmation code in register.php, resend_confirm.php and validation.php. I currently have it set to "zzzzz".
That should do it!
NOTE: This has not been tested on version 0.9.9.0 If this does work, please let us know.
REVISION HISTORY
5/31/2008
Version 0.3_fingerprn_2 Added private welcome message capability.