Jump to content
  • Announcements

    • Parkho

      New Website Skin   11/17/17

      Hello Guys, I have changed my website's skin to bootstrap version. Please check it out here and let me know if your need the skin. Regards Parkho
topher2880

Clickable VATSIM/IVAO link

Recommended Posts

topher2880    0

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

 

Share this post


Link to post
Share on other sites
flyalaska    3192
Quote

Deleted!

 

Tested doesn't

Quote
Quote

 

 

work anymore

Edited by flyalaska

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
topher2880    0
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

 

Share this post


Link to post
Share on other sites
topher2880    0
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. 

Share this post


Link to post
Share on other sites
flyalaska    3192
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×