Strider Posted February 25, 2013 Report Share Posted February 25, 2013 Here is the code for the IVAO status image in the roster: $feildvalue = PilotData::GetFieldValue($pilot->pilotid, 'IVAO ID'); if($feildvalue != '') { echo '<img src="http://status.ivao.aero/R/'.$feildvalue.'.png">'; } Place it in your pilots_list.tpl, and save it to your skin folder. Change the IVAO ID to what ever it is in your database. You can use the correct spelling for feildvalue to what you want, you can even change it to another name if you like. 1 Quote Link to comment Share on other sites More sharing options...
simonecatalano Posted September 1, 2013 Report Share Posted September 1, 2013 (edited) DELETED Edited January 30, 2014 by simonecatalano Quote Link to comment Share on other sites More sharing options...
estebanmejia Posted March 6, 2015 Report Share Posted March 6, 2015 Here is the code for the IVAO status image in the roster: $feildvalue = PilotData::GetFieldValue($pilot->pilotid, 'IVAO ID'); if($feildvalue != '') { echo '<img src="http://status.ivao.aero/R/'.$feildvalue.'.png">'; } Place it in your pilots_list.tpl, and save it to your skin folder. Change the IVAO ID to what ever it is in your database. You can use the correct spelling for feildvalue to what you want, you can even change it to another name if you like. Remplace echo '<img src="http://status.ivao.aero/R/'.$feildvalue.'.png">'; to echo '<img src="http://status.ivao.aero/R/'.$fieldvalue.'.png">'; it had a little mistake thanks Quote Link to comment Share on other sites More sharing options...
Strider Posted March 10, 2015 Author Report Share Posted March 10, 2015 Have a look at the code I gave and you will see there is no mistake, I had misspelled fieldvalue on purpose as I have it right for another bit for the vatsim id. Quote Link to comment Share on other sites More sharing options...
vicente Posted June 11, 2015 Report Share Posted June 11, 2015 It's not working here, someone can help me please ?? Thanks !! It's my code. <?php ini_set('display_errors', 0 ); error_reporting(0); ?> <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?> <style type="text/css"> <!-- .style3 {color: #FFFFFF; font-size: 12px; } .style4 {font-size: 12px} .style5 {color: #FF0000} --> </style> <h3 align="center"> <?php if(!$pilot_list) { echo 'There are no pilots!'; return; } ?> </h3> <div align="center"> <table width="678" height="64" class="" id=""> <thead> <tr> <th bgcolor="#FF0000"><div align="center"><span class="style3">Matricula</span></div></th> <th bgcolor="#FF0000"><div align="center"><span class="style3">Nome</span></div></th> <th bgcolor="#FF0000"><div align="center"><span class="style3">Cargo</span></div></th> <th bgcolor="#FF0000"><div align="center"><span class="style3">Horas Voadas</span></div></th> <th bgcolor="#FF0000"><div align="center"><span class="style3">IVAO</span></div></th> </tr> </thead> <tbody> <?php foreach($pilot_list 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> <td width="1%" nowrap><div align="center"><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>" class="style4"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </div></td> <td> <div align="center"><span class="style4"><?php echo $pilot->firstname.' '.$pilot->lastname?> </span><span class="style4"><img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /></span></div></td> <td><div align="center"><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></div></td> <td><div align="center"><span class="style4"><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></span></div></td> <td><div align="center">$feildvalue = PilotData::GetFieldValue($pilot->pilotid, 'VID_IVAO'); if($feildvalue != '') { echo '<img src="http://status.ivao.aero/R/'.$feildvalue.'.png">'; }</div></td> <?php } ?> </tbody> </table> </div> Quote Link to comment Share on other sites More sharing options...
Strider Posted June 18, 2015 Author Report Share Posted June 18, 2015 By the looks of it, you have some php code that is not wrapped in the openning and closing php tags, <?php ?> Quote Link to comment Share on other sites More sharing options...
buraktiftikci Posted October 16, 2016 Report Share Posted October 16, 2016 <?php $fieldvalue = PilotData::GetFieldValue($pilot->pilotid, 'IVAO ID'); if($fieldvalue != '') { echo '<a href="https://www.ivao.aero/Member.aspx?ID='.$fieldvalue.'"> <img src="http://status.ivao.aero/R/'.$fieldvalue.'.png"></a>'; } ?> This is the final correct form of the code. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.