UNSUPPORTED Addon For Advanced Registration Options 2.0 - SP1.3.
This will add another form to the Yabb.cgi?action=activate page that will allow unconfirmed members to request that their activation code is resent. The user must type in their registered username and the email will be sent.
If you don't know what it does, then you don't need it! Hopefully the mod author will include this addon in the next release of the official mod.
Good luck!
Chris
### In Register.pl add this code immediately after the exisitng form in sub activate
### In Register.pl after the end of sub activate2 create a new sub called activate3 by using this code:
sub Activate3 {
if($INFO{'username'}) {
$FORM{'username'} = "$INFO{'username'}";
}
if( !-e ("$memberdir/$FORM{'username'}.act") && !-e ("$memberdir/$FORM{'username'}.dat")) { &fatal_error("$regtxt{'73'}"); }
if( !-e ("$memberdir/$FORM{'username'}.act") && -e ("$memberdir/$FORM{'username'}.dat")) { &fatal_error("$regtxt{'80'}"); }
fopen(FILE, "$memberdir/$FORM{'username'}.act");
@chkcode = ;
chomp @chkcode;
fclose(FILE);
$act_id = "$chkcode[0]";
fopen(FILE, "$memberdir/$FORM{'username'}.dat");
@x = ;
fclose(FILE);
chomp @x;
$FORM{'email'} = "$x[2]";
&sendmail($x[2],"$regtxt{'71'}", "$regtxt{'74'}\n$scripturl?action=activate2;username=$FORM{'username'};act_id=$act_id\n\n$regtxt{'75'}\n\n$regtxt{'76'}\n$scripturl?action=activate\n\n$regtxt{'77'}\n\n$txt{'719'}: $FORM{'username'}\n$regtxt{'78'}: $act_id\n\n\n$regtxt{'79'} $webmaster_email\n\n$txt{'130'}");
$yymain .= qq~
$regtxt{'51'} |
$regtxt{'07a'} $FORM{"username"}$regtxt{'10'} $FORM{"email"} $regtxt{'11'} |
$txt{'193'}
~;
&template;
exit;
}
### In SubList.pl add the following after the activate2 line
'activate3',"Register.pl&Activate3",
### Add some lines to english.lng after the existing regtxt lines
$regtxt{'07a'} = "Thank you";
$regtxt{'81a'} = "Resend your Activation code";
$regtxt{'82'} = "Please ensure any Spam or mail filters are configured to allow emails from this domain.";
$regtxt{'83'} = "If you registered more than 72 hours ago then your registration details will have been removed and you will need to register again.";
### Optionally, to add a "Activate" link in the menu bar for guests
find this line in Subs.pl
if($regop != 1) { $regbut = qq~$menusep$img{'register'}~; }
and replace with
if($regop != 1) { $regbut = qq~$menusep$img{'register'}$menusep$img{'activate'}~; }
### If you do this then you will also need to add a definition for $img{'activate'} in the language file!