Rafael Posted March 10, 2011 Report Posted March 10, 2011 Can someone pass me the HTML of the statement of the last flights of the pilot? Example: http://www.easyjetva.com/index.php/profile/view/1001 (Pilots Recent Flights) Quote
Moderators mark1million Posted March 10, 2011 Moderators Report Posted March 10, 2011 Where do you want to display it, Pilots Public profile or pilots profile? The code is on this forum Quote
Moderators mark1million Posted March 11, 2011 Moderators Report Posted March 11, 2011 Here you go, <?php if(!$pireps) { echo '<p>Sorry No recent flights have been found</p></div>'; return; } $flights = PIREPData::getLastReports($userinfo->pilotid, '20'); $string = ""; foreach($flights as $flight) { $string = $string.$flight->depicao.'+-+'.$flight->arricao.',+'; } ?> <p align="center"><strong>Pilots Recent Flights</strong><br /><img src="http://www.gcmap.com/map?P=<?php echo $string ?>&MS=bm&MR=240&MX=685x360&PM=pemr:star10:white%2b%22%25I%22:white&PC=orange" /><br /> Maps generated by the <a href="http://www.gcmap.com/">Great Circle Mapper</a> - copyright © <a href="http://www.kls2.com/~karl/">Karl L.Swartz</a></p> You may want to customize how many line 7 plus you may need to remove that div after the end of sorry no flight have been found depending what skin your using. Plus this bit you can customize as you wish, go over to Karl's site and you can see the variables, PM=pemr:star10:white%2b%22%25I%22:white&PC=orange 1 Quote
Rafael Posted March 11, 2011 Author Report Posted March 11, 2011 If I want to put on the page of the pilot (http://flydeltava.org/index.php/profile/view/1) Should I put in Profile_main? Quote
CPC900 Posted March 12, 2011 Report Posted March 12, 2011 If you put it into the profile_main.tpl and take out this part of the code: if(!$pireps) { echo '<p>Sorry No recent flights have been found</p></div>'; return; } it works. Just not sure if that is correct, or not.....but it seems to work for me. 1 Quote
Rafael Posted March 12, 2011 Author Report Posted March 12, 2011 I put, so he stayed in the pilot center, not on the page of the pilot (http://flydeltava.org/index.php/profile/view/1). How do I put on this page? Quote
Rafael Posted March 12, 2011 Author Report Posted March 12, 2011 How do I put the pilot on the page? in> http://flydeltava.org/index.php/profile/view/1 Quote
CPC900 Posted March 12, 2011 Report Posted March 12, 2011 To clarify what I did..... In my pilot_public_profile.tpl I added this code: <?php if(!$pireps) { echo '<p>Sorry No recent flights have been found</p></div>'; return; } $flights = PIREPData::getLastReports($userinfo->pilotid, '5'); $string = ""; foreach($flights as $flight) { $string = $string.$flight->depicao.'+-+'.$flight->arricao.',+'; } ?> <p align="center"><strong>Pilots Recent Flights</strong><br /><img src="http://www.gcmap.com/map?P=<?php echo $string ?>&MS=bm&MR=240&MX=685x360&PM=pemr:star10:red%2b%22%25I%22:white&PC=blue" /><br /> Maps generated by the <a href="http://www.gcmap.com/">Great Circle Mapper</a> - copyright © <a href="http://www.kls2.com/~karl/">Karl L.Swartz</a></p> and this is my resulting page: http://www.canadianclassicairlines.com/CPC/index.php/profile/view/1'>http://www.canadianclassicairlines.com/CPC/index.php/profile/view/1 In my profile_main.tpl I added this code: <?php $flights = PIREPData::getLastReports($userinfo->pilotid, '5'); $string = ""; foreach($flights as $flight) { $string = $string.$flight->depicao.'+-+'.$flight->arricao.',+'; } ?> <p align="center"><strong>Pilots Recent Flights</strong><br /><img src="http://www.gcmap.com/map?P=<?php echo $string ?>&MS=bm&MR=240&MX=685x360&PM=pemr:star10:red%2b%22%25I%22:white&PC=blue" /><br /> Maps generated by the <a href="http://www.gcmap.com/">Great Circle Mapper</a> - copyright © <a href="http://www.kls2.com/~karl/">Karl L.Swartz</a></p> and this is my resulting page: http://www.canadianclassicairlines.com/CPC/index.php/profile Is that what you need Rafael?! 1 Quote
Moderators mark1million Posted March 12, 2011 Moderators Report Posted March 12, 2011 That code will work in the public_pilot_profile.tpl only, i think you need different variables for the pilots profile main. Thats why i asked where is it for. Quote
CPC900 Posted March 12, 2011 Report Posted March 12, 2011 Mark, but it seemingly IS showing the individual pilots flights?! I gave 2 different links and all I did on the second one was take out the code if(!$pireps) { echo '<p>Sorry No recent flights have been found</p></div>'; return; } to make it work with profile_main.tpl?! Or am I just a total moron?! Believe me, that may very well be the case. (Or are you just talking to Rafael, not me) 1 Quote
Moderators mark1million Posted March 12, 2011 Moderators Report Posted March 12, 2011 Was talking to Rafael What is it you want the pilots last flights or the VA's last flights? Quote
Rafael Posted March 12, 2011 Author Report Posted March 12, 2011 Pilot_public_profile.tpl not have the folders on my template. Quote
Guest lorathon Posted March 14, 2011 Report Posted March 14, 2011 Rafael? Why are you asking me to comment on this post? What is with people these days and the lack of patience? Please do not PM me to comment on something or to check something out. I comment on items that I think need it. Mark seems to have this one under control. Quote
Moderators mark1million Posted March 14, 2011 Moderators Report Posted March 14, 2011 Also if you want a response then dont leave me comments on my profile, your more likely to get something by leaving here in the thread. The code i posted will show the pilots last flights, if you want the last flights of the VA then that code is different. What is it exactly that you need? Quote
Rafael Posted March 14, 2011 Author Report Posted March 14, 2011 Pilot_public_profile.tpl not have the folders on my template. Quote
Moderators mark1million Posted March 14, 2011 Moderators Report Posted March 14, 2011 There is a file called pilot_public_profile.tpl, if its not in your skins folder then look in the core templates folder then move it to your skins folder and customise. 1 Quote
Rafael Posted March 14, 2011 Author Report Posted March 14, 2011 Look at the picture, do not have "pilot_public_profile.tpl" Quote
Moderators mark1million Posted March 14, 2011 Moderators Report Posted March 14, 2011 Go to your core > templates in there it will be 1 Quote
Rafael Posted March 14, 2011 Author Report Posted March 14, 2011 Thanks, I got;) (http://flydeltava.org/index.php/profile/view/1) you know the code to display the map for flights booked on "View bids my flight? Quote
Blu-Express VA Posted May 22, 2011 Report Posted May 22, 2011 Hi, i add my code: <?php if(!$pireps) { echo '<p>Sorry No recent flights have been found</p></div>'; return; } $flights = PIREPData::getLastReports($userinfo->pilotid, '20'); $string = ""; foreach($flights as $flight) { $string = $string.$flight->depicao.'+-+'.$flight->arricao.',+'; } ?> <p align="center"><strong>Pilots Recent Flights</strong><br /><img src="http://www.gcmap.com/map?P=<?php echo $string ?>&MS=bm&MR=240&MX=685x360&PM=pemr:star10:white%2b%22%25I%22:white&PC=orange" /><br /> Maps generated by the <a href="http://www.gcmap.com/">Great Circle Mapper</a> - copyright © <a href="http://www.kls2.com/~karl/">Karl L.Swartz</a></p> but for pilots with one flight the result are: http://bluepanoramava.joomlafree.it/phpVMS/index.php/profile/view/3233 and for pilots without one flight the result are: http://bluepanoramava.joomlafree.it/phpVMS/index.php/profile/view/9139 Why??? Thanks! Quote
James142 Posted May 22, 2011 Report Posted May 22, 2011 Hi, i add my code: <?php if(!$pireps) { echo '<p>Sorry No recent flights have been found</p></div>'; return; } $flights = PIREPData::getLastReports($userinfo->pilotid, '20'); $string = ""; foreach($flights as $flight) { $string = $string.$flight->depicao.'+-+'.$flight->arricao.',+'; } ?> <p align="center"><strong>Pilots Recent Flights</strong><br /><img src="http://www.gcmap.com/map?P=<?php echo $string ?>&MS=bm&MR=240&MX=685x360&PM=pemr:star10:white%2b%22%25I%22:white&PC=orange" /><br /> Maps generated by the <a href="http://www.gcmap.com/">Great Circle Mapper</a> - copyright © <a href="http://www.kls2.com/~karl/">Karl L.Swartz</a></p> but for pilots with one flight the result are: http://bluepanoramav...ofile/view/3233 and for pilots without one flight the result are: http://bluepanoramav...ofile/view/9139 Why??? Thanks! Replace echo '<p>Sorry No recent flights have been found</p></div>'; to echo '<p>Sorry No recent flights have been found</p>'; (that removes the extra </div>) Kindest Regards, James Quote
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.