Strider Posted April 28, 2011 Report Share Posted April 28, 2011 WOuld like to know is there a way to set phpvms, to hide pilots who have been set to retired? I don't like having a roster full of pilots marked retired, looks bad for the VA. But when they file a pirep or get marked as active they are shown again. Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted April 28, 2011 Moderators Report Share Posted April 28, 2011 Here you go!!! <?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'); */ if($pilot->retired) { continue; } ?> Quote Link to comment Share on other sites More sharing options...
Strider Posted April 28, 2011 Author Report Share Posted April 28, 2011 Didn't work, how exactly do I put that in? When I put it in, it repeated all pilots and caused the page to be extremely long. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted April 28, 2011 Administrators Report Share Posted April 28, 2011 if($pilot->retired) { continue; } That line goes into the existing template's foreach loop Quote Link to comment Share on other sites More sharing options...
Strider Posted April 28, 2011 Author Report Share Posted April 28, 2011 Thanks. Quote Link to comment Share on other sites More sharing options...
Connor1994 Posted April 28, 2011 Report Share Posted April 28, 2011 erm, Sorry not catching on, any chance of step-by-step instructions... thanks, CD Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted April 28, 2011 Administrators Report Share Posted April 28, 2011 Find: foreach($allpilots as $pilot) { After that put if($pilot->retired == true) { continue; } 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.