Jump to content

[Solved] How to get VATSIM link thingy?


Kyle

Recommended Posts

  • Administrators

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
Link to comment
Share on other sites

  • Moderators

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?

Link to comment
Share on other sites

  • Administrators

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
Link to comment
Share on other sites

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