topher2880 Posted October 26, 2017 Report Posted October 26, 2017 Just touching up my pilots list page and wanted to be able to click on Vatsim (mainly) or ivao ID on pilot profile to bring up their flight histories on relevant stats page.. <td> <div align="center"> <a href="<?php echo url('https://vatstats.net/flights/?pilot='.$pilot->pilotid, 'VATSIM ID');?>"> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </a></td> This is displaying their vatsim ID correctly as a clickable link, however its bringing up "http://www.susiairvirtual.com/index.php/https://vatstats.net/flights/?pilot=1" rather than the vatstats page, and its also using the pilot Id rather than vatsim ID.. This is a 2 second job for somone who knows the keywords to use, however im not that guy... can someone please help with which $variable to use for the single line posted above to get it to create the correct link address much appreciated Quote
flyalaska Posted October 26, 2017 Report Posted October 26, 2017 (edited) Quote Deleted! Tested doesn't Quote Quote work anymore Edited October 26, 2017 by flyalaska Quote
ObiOnyemaobi Posted October 29, 2017 Report Posted October 29, 2017 Hi topher2880, Try this code, it should work. <td> <div align="center"> <a href="https://vatstats.net/flights/?pilot=<?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID');?>"> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </a></td> Cheers, Obi Onyemaobi Quote
flyalaska Posted October 29, 2017 Report Posted October 29, 2017 He will also need to make a custom profile field in admin. Quote
topher2880 Posted October 29, 2017 Author Report Posted October 29, 2017 2 hours ago, ObiOnyemaobi said: Hi topher2880, Try this code, it should work. <td> <div align="center"> <a href="https://vatstats.net/flights/?pilot=<?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID');?>"> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </a></td> Cheers, Obi Onyemaobi fantastic.. that is spot on. thanks so much Topher Quote
topher2880 Posted October 29, 2017 Author Report Posted October 29, 2017 1 hour ago, flyalaska said: He will also need to make a custom profile field in admin. Hi mate the custom profile field is called VATSIM ID, so it came up, if i changed the field, i would need to change this text also. Thanks to both of you for your help. Quote
flyalaska Posted October 30, 2017 Report Posted October 30, 2017 3 hours ago, topher2880 said: Hi mate the custom profile field is called VATSIM ID, so it came up, if i changed the field, i would need to change this text also. Thanks to both of you for your help. I know, I referring it to you. Incase you were not aware that you had to create it. 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.