Jump to content

[SOLVED!]IVAO and Vatsim Code Help!


Blu-Express VA

Recommended Posts

Hello,

I put the code in this topic to add to my IVAO and VATSIM

Pilot Roster, the question now is: Can anyone give me the codes to be put

the registration page and maybe even in the pilot Center for

id change the number?

easyjetva like?

Thanks!

Under your Admin panel, go to: site and settings > Profile fields [...]

Link to comment
Share on other sites

  • 2 years later...

Ok!,

Solved!

For all, add this in your pilot_list.tpl (core-templates)

echo '<a href="http://www.ivao.aero/members/person/details.asp?ID='.$fieldvalue.'" target="_blank"><center><center><img src="/images/yesvat.png" width="20" height="18" border="0" alt="IVAO ID" /></center></a>';

Thanks!

Open the page Pilot_list.tpl

and replace the page for this

style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
<div class="cufon underline" style="width:auto; padding:5px; margin-top:10px; margin-bottom:10px; border-bottom: 3px solid; font-size: 24px;">Time de Águias </div>
<?php
if(!$allpilots)
{
 echo 'There are no pilots!';
 return;
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="1">
 <tbody>
 </tbody>
  <td width="9%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">Piloto ID</td>
  <td width="23%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">Nome</td>
   <td width="10%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">Rank</td>
   <td width="7%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">Voos</td>
   <td width="11%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">Horas Voadas </td>
   <td width="10%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">Ultimo Voo </td>
   <td width="10%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">Status</td>
   <td width="10%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">VATSIM ID</td>
   <td width="10%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">IVAO ID</td>
   <?php
foreach($allpilots as $pilot)
{
/*
 To include a custom field, use the following example:
 <td>
  <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?>
 </td>
 For instance, if you added a field called "IVAO Callsign":
  echo PilotData::GetFieldValue($pilot->pilotid, 'IVAO Callsign'); 
 */

 // To skip a retired pilot, uncomment the next line:
 //if($pilot->retired == 1) { continue; }
?>
 <tr class="roster_data" style="height: 20px;">
   <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td>
   <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><img src="<?php echo Countries::getCountryImage($pilot->location);?>"
  alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo $pilot->firstname.' '.$pilot->lastname?> </td>
   <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td>
   <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><?php echo $pilot->totalflights?></td>
   <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td>
   <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><?php
 if($pilot->lastpirep == 0)
 {
  echo 'None';
 }

 else
 {
 $report = PIREPData::GetLastReports($pilot->pilotid, 1);
 echo date('d/m/Y', strtotime($report->submitdate));
 }
?>    </td>
   <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><?php
 if($pilot->retired == '1')
 {echo '<font class="inactive">Inactive</font>';}
    else
    {echo '<font class="active">Active</font>';}
   ?></td>
   <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><?php  
 $fieldvalue = PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID');

 if($fieldvalue != '')
 {
  echo '<a href="http://www.vataware.com/pilot.cfm?cid='.$fieldvalue.'" target="_blank">'.$fieldvalue.'</a>';
 }
 else
 {
  echo '<font style="color: #FFAA00;">None</font>';
 }
 ?>    </td>
   <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><?php  
 $fieldvalue = PilotData::GetFieldValue($pilot->pilotid, 'IVAO ID');

 if($fieldvalue != '')
 {
  echo '<a href="http://www.ivao.aero/members/person/details.asp?ID='.$fieldvalue.'" target="_blank">'.$fieldvalue.'</a>';
 }
 else
 {
  echo '<font style="color: #FFAA00;">None</font>';
 }
 ?>    </td>
   <?php
}
?>
 </tr>
</table>

Link to comment
Share on other sites

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