Jump to content

Clickable VATSIM/IVAO link


topher2880

Recommended Posts

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

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...