Rob Posted May 22, 2009 Report Share Posted May 22, 2009 Hi there, Just wondering if theres anyway to call the email address and password entered on the registration form onto the registration_sentconfirmation.tpl for the new pilot to see? Cheers. Quote Link to comment Share on other sites More sharing options...
steelerboi Posted May 22, 2009 Report Share Posted May 22, 2009 Hi Rob, I use the following lines in my email_registrationaccepted.tpl but I think it should work just as well in any other email such as registration_sentconfirmation.tpl. Pilot Name: <?php echo $pilot->firstname.' '.$pilot->lastname ?><br/> Pilot ID: <?php echo PilotData::GetPilotCode($pilot->code,$pilot->pilotid)?><br/> Login Email Address: <?php echo $pilot->email?><br/> Login Password: The password you chose during signup<br/> I'd advise against the sending of passwords in emails for obvious reasons Hope that helps. Quote Link to comment Share on other sites More sharing options...
Rob Posted May 22, 2009 Author Report Share Posted May 22, 2009 Ah, but wouldn't the pilot need to be signed in for them to see the details? On some sites when you submit your registration on the next page it comes up with the "your application has been sent blah blah blah, below are the account details you signed up with:" That is basically what i want to put on the reg sent tpl so the user can see the info they used when registering without being signed into the site. Quote Link to comment Share on other sites More sharing options...
steelerboi Posted May 22, 2009 Report Share Posted May 22, 2009 OK, I understand what you're trying to do now. I just altered the email which is sent once a pilot has been accepted to include all the account details (so they don't need to be logged into the site), but I see you're wanting to display them on the page following registration. Hmmm, I'm sure this should be possible by pulling the data in a similar manner. I'll have a play with the template and see what I can come up with. Quote Link to comment Share on other sites More sharing options...
Rob Posted May 22, 2009 Author Report Share Posted May 22, 2009 Thanks, sorry for not making it a bit more clearer Thanks a lot anyways, i'll look into how to do it a bit more clearly tomorrow, but i'd guess to do what i want i'd have to query the latest or relevant mysql data inserts that corresponds with the pilot sign up. Which i have no idea on how to code that sort of thing Cheers again, regards, Rob Quote Link to comment Share on other sites More sharing options...
steelerboi Posted May 23, 2009 Report Share Posted May 23, 2009 Managed to get something up and working, although it's maybe not the pretiest code and possibly a case of using a sledgehammer to crack a walnut, but it works <h3>Confirmation Sent</h3> <p>Thanks for registering with <?php echo SITE_NAME; ?>.</p> <?php $newpilots = PilotData::GetLatestPilots(1); foreach($newpilots as $newpilot) { ?> Your account will be created using the following details:<br/> Pilot Name: <?php echo $newpilot->firstname.' '.$newpilot->lastname ?><br/> Login Email Address: <?php echo $newpilot->email?><br/> Login Password: The password you chose during signup<br/> <?php } ?> <p>Your application will now be processed, so please check your email for further updates.</p> As I say, there may be a better way to do it, but it's 01:20 here right now, so I'm a bit brain-dead, lol. Going to grab some kip now Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted May 23, 2009 Administrators Report Share Posted May 23, 2009 In the registration_sentconfirmation.tpl, you can use the $_POST variables directly: <?php $_POST['firstname']; $_POST['lastname']; $_POST['email']; $_POST['code']; $_POST['location']; $_POST['hub']; $_POST['password1']; Hopefully that helps Quote Link to comment Share on other sites More sharing options...
steelerboi Posted May 23, 2009 Report Share Posted May 23, 2009 Thanks Nabeel, I knew there must be an easier way Quote Link to comment Share on other sites More sharing options...
Rob Posted May 23, 2009 Author Report Share Posted May 23, 2009 Thank you very much nabeel and nige. If only i had a million quid to donate ;D Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted May 23, 2009 Administrators Report Share Posted May 23, 2009 No problem You can click on ads Quote Link to comment Share on other sites More sharing options...
selwynorren Posted May 28, 2009 Report Share Posted May 28, 2009 Hi All please help ;D here is my code: Dear <?php echo $firstname .' '. $lastname; ?>,<br /><br /> Your account have been made at <?php echo SITE_NAME?>, but your account has not yet been activated. You will receive an email when your registration has been activated by someone on our staff.<br /><br /> Pilot Name: <?php echo Vars::POST('firstname'); ?> <?php echo Vars::POST('lastname'); ?><br/> Email Address: <?php echo Vars::POST('email'); ?><br/> Login Pilot ID: <?php echo $code; ?><br/> Login Pilot ID: <?php echo PilotData::GetPilotCode($pilot->code,$pilot->pilotid)?><br/> Login Password: As specified during registration<br/> <br /><br /> Thanks!<br /><br /> <?php echo SITE_NAME?> Staff As you can see I have tried getting teh pilot code in two different ways and both give me undesired results. The for teh login pilot ID I either get teh company code (OCC) or I get three zero's. I set my config to only use three zero's instead of teh default 4. Any help would be appreciated Cheers Quote Link to comment Share on other sites More sharing options...
steelerboi Posted May 28, 2009 Report Share Posted May 28, 2009 Hi Selwyn, It's prolly easier to use the $POST variables directly, like this: Pilot Name: <?php echo $_POST['firstname'],$_POST['lastname'];?><br/> Email Address: <?php echo $_POST['email'];?><br/> Follow the same pattern for whatever variables you need to display. If you want the pilotid, then this will have to be pulled from the database using the API. Something like this should work. <?php $newpilots = PilotData::GetLatestPilots(1); foreach($newpilots as $newpilot) { echo 'Pilot ID: ' . $_POST['code'],$newpilot->pilotid; } ?> Nabeel may know a neater way to grab the pilot id though Hope that helps. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted May 28, 2009 Administrators Report Share Posted May 28, 2009 You'll have to do what Nige said, since the pilot variable hasn't been assigned to the template. Using Vars::Post() is probably also cleaner, since it will filter, though I think you can use Vars::$post->code etc. But no difference Quote Link to comment Share on other sites More sharing options...
selwynorren Posted May 28, 2009 Report Share Posted May 28, 2009 Wow guys thanks very very much. It become painfully obvious that I still dont readyy understand this code at all ??? ;D Nige Thanks that work like a charm except that it remove the zero's i.e the result would be OCC2, etc I have used you code as is and hacked it slightly to give me the zero's that I am looking for. Nige Nabeel, would you mind showing me if tehre is a simpler and cleaner way to do it. <?php $newpilots = PilotData::GetLatestPilots(1); foreach($newpilots as $newpilot) { echo 'Pilot ID: ' . $_POST['code'],$newpilot->pilotid; ?> Dear <?php echo $firstname .' '. $lastname; ?>,<br /><br /> Your account have been made at <?php echo SITE_NAME?>, but your account has not yet been activated. You will receive an email when your registration has been activated by someone on our staff.<br /><br /> Pilot Name: <?php echo Vars::POST('firstname'); ?> <?php echo Vars::POST('lastname'); ?><br/> Email Address: <?php echo Vars::POST('email'); ?><br/> Login Pilot ID: <?php echo $_POST['code'],PilotData::GetPilotCode($pilot->code,$pilot->pilotid),$newpilot->pilotid; ?><br /> Login Pilot ID: <?php echo PilotData::GetPilotCode($pilot->code,$pilot->pilotid)?><br/> Selected Hub: <?php echo Vars::POST('hub'); ?><br/> <br /><br /> Thanks!<br /><br /> <?php echo SITE_NAME?> Staff <?php } ?> Again I apologise for the repeated mistackes and lack of understanding. Ill get better I promise ;D Cheers Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted May 28, 2009 Administrators Report Share Posted May 28, 2009 No prob! At least you are trying. You're getting blanks because you're using $pilot instead of $newpilot in some places eg, you just need: Login Pilot ID: <?php echo PilotData::GetPilotCode($newpilot->code,$newpilot->pilotid)?><br/> Quote Link to comment Share on other sites More sharing options...
selwynorren Posted May 28, 2009 Report Share Posted May 28, 2009 Hi Nabeel Thanks for your kind words. That code did the trick perfectly. It seems so simple when you know how ;D Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted May 28, 2009 Administrators Report Share Posted May 28, 2009 No prob, check out the API docs as well (see my sig) There's alot of functionality available Quote Link to comment Share on other sites More sharing options...
selwynorren Posted May 28, 2009 Report Share Posted May 28, 2009 Hi Nabeel Great I will definateloy have a look at it. All the advice has paid off and I have just finished uploading the result. Complete custom skin. with phpBB 2 forum intergration as well as custom confirmation email all thatnks to you and nege. I am pretty happy with it. Now I just need to add content : Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.