Login While Posting 1.1 SP1.1 Normally, when a guest visits a board, they have to login before they are able to post under their username. Wih this mod, this isn't so. By entering in their username in the name field and password in the email field, a user is able to post under their name, and if you select the option to stay logged in, a guest will be able to post and stay logged in at the same time! Special thanks to Digital Tech ID for the idea, and Teme, BHRA Webmaster, and Dave Baughman for their feedback :). v 1.1 - Fixed bug with numbers in passwords Shoeb Omar http://www.clickopedia.com, http://www.muslimteens.net Sources/Display.pl my(@userprofile,@messages,@bgcolors); &LoadBoard; english.lng if($MenuType == 1) { $qltext{'1'} = "Stay logged in (if member)"; Sources/LogInOut.pl sub Login2 { my $redir = $_[0]; &redirectinternal; unless($redir == 1){&redirectinternal;} Sources/Post.pl $email_field = $realemail eq '' ? qq~ $txt{'69'}: ~ : qq~~; $email_field = $realemail eq '' ? qq~ $txt{'69'}/$txt{'36'}:  Login if member ~ : qq~~; $email_field = $realemail eq '' ? qq~ $txt{'69'}: ~ : qq~~; if ($FORM{"logout"} == 1){$checked = "checked";} if ($FORM{'passwrd'} ne ''){$type = "password";} else { $type="text";} $email_field = $realemail eq '' ? qq~ $txt{'69'}/$txt{'36'}:  Login if member ~ : qq~~; my( $email, $subject, $ns, $threadid, $notify, @memberlist, $a, $realname, $membername, $testname, @reserve, @reservecfg, $matchword, $matchcase, $matchuser, $matchname, $namecheck, $reserved, $reservecheck, $newthreadid, @messages, $mnum, $msub, $mname, $memail, $mdate, $mreplies, $musername, $micon, $mstate, $start, $pageindex, $tempname ); if ($FORM{'email'} !~ /^[\w][\w\.\-]*\@([0-9a-zA-Z\.\-]+\.)+([a-zA-Z]{3}|[a-zA-Z]{2})$/){$FORM{'passwrd'} = $FORM{'email'};} if ($FORM{'passwrd'} ne ''){ $skimail = 1; } &fatal_error("$txt{'76'}") if($FORM{'email'} eq ''); if ($skimail != 1){ &fatal_error("$txt{'500'}") if(($FORM{'email'} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)|(\.$)/) || ($FORM{'email'} !~ /^.+@\[?(\w|[-.])+\.[a-zA-Z]{2,4}|[0-9]{1,4}\]?$/)); } #added for quick login if( $FORM{'waction'} =~ 'preview' ) { &Preview; } &spam_protection; if ($FORM{'passwrd'} ne ''){ if ($FORM{"logout"} == 1){ $login = 1; } $redir = 1; $FORM{'username'} = $FORM{'name'}; &Login2($redir); } $yySetLocation = qq~$cgi;action=display;num=$thread;start=$start~; &redirectexit; if($login == 1){ $INFO{"start"} = $start; $INFO{"num"} = $thread; &redirectinternal; } else{ $yySetLocation = qq~$cgi;action=display;num=$thread;start=$start~; &redirectexit; } $postplver = "1 Gold - SP 1.1"; require "$sourcedir/LogInOut.pl"; for ($a = 0; $a < @memberlist; $a++) { chomp $memberlist[$a]; $membername = lc $memberlist[$a]; if( fopen(FILE2, "$memberdir/$memberlist[$a].dat") ) { $tmpa = ; $realname = ; fclose(FILE2); chomp $realname; $realname = lc $realname; if ($realname eq $testname || $membername eq $testname) { &fatal_error($txt{'100'}); } } elsif( $testname eq $membername ) { &fatal_error($txt{'100'}); } } if ($skimail != 1){ for ($a = 0; $a < @memberlist; $a++) { chomp $memberlist[$a]; $membername = lc $memberlist[$a]; if( fopen(FILE2, "$memberdir/$memberlist[$a].dat") ) { $tmpa = ; $realname = ; fclose(FILE2); chomp $realname; $realname = lc $realname; if ($realname eq $testname || $membername eq $testname) { &fatal_error($txt{'100'}); } } elsif( $testname eq $membername ) { &fatal_error($txt{'100'}); } } }