Jump to content

[Solved] How to get VATSIM link thingy?


Recommended Posts

  • Administrators
Posted

If you mean the link to VATAWARE and you are on the pilot_list.tpl page you would do something like

<?php
$vatsimid = PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID');
 if($vatsimid)
     {echo '<a class="profiletop" href="http://www.vataware.com/pilot.cfm?cid='.$vatsimid.'" target="_blank">Vataware Data</a>'; }
?>

You will need to change VATSIM ID to whatever you have the id saved as in your custom profile field.

  • Like 1
  • Moderators
Posted

Ok, ok if i title the feild as "VATSIM"

 <?php
$vatsimid = PilotData::GetFieldValue($pilot->pilotid, 'VATSIM');
 if($vatsim)
     {echo '<a class="profiletop" href="http://www.vataware.com/pilot.cfm?cid='.$vatsim.'" target="_blank">Vataware Data</a>'; }
?>

Is this correct?

  • Administrators
Posted

Just the one spot needs to match your field name

<?php
$vatsimid = PilotData::GetFieldValue($pilot->pilotid, 'VATSIM');  
 if($vatsimid)
   {echo '<a class="profiletop" href="http://www.vataware.com/pilot.cfm?cid='.$vatsimid.'" target="_blank">Vataware Data</a>'; }
?>

  • Like 2
  • 6 months later...
  • 2 weeks later...

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...