[Solved] How to get VATSIM link thingy?

Ok, you know in the pilot roster list and they have VATSIM links, how do i do that like the img on the bottom.

http://highfreightva…co.cc/Mine!.JPG

One point if it works!

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.

1 Like

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?

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>'; }
?>
2 Likes

If you want i have the codee and a graphic for it.

Cheers

Dan C

1 Like

ok could someone please give me that code so it only shows Vataware Data link not their Vatsim id then the link to vataware data.

thanks

Daniel

could i possible have some help

code so it only shows Vataware Data link not their Vatsim id then the link to vataware data.

Sent you a pm Daniel

1 Like