Strider Posted February 25, 2013 Report 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
simonecatalano Posted September 1, 2013 Report Posted September 1, 2013 (edited) DELETED Edited January 30, 2014 by simonecatalano Quote
estebanmejia Posted March 6, 2015 Report 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
Strider Posted March 10, 2015 Author Report 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
vicente Posted June 11, 2015 Report 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
Strider Posted June 18, 2015 Author Report 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
buraktiftikci Posted October 16, 2016 Report 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
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.