Strider Posted April 28, 2011 Report 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
Moderators Kyle Posted April 28, 2011 Moderators Report 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
Strider Posted April 28, 2011 Author Report 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
Administrators Nabeel Posted April 28, 2011 Administrators Report Posted April 28, 2011 if($pilot->retired) { continue; } That line goes into the existing template's foreach loop Quote
Connor1994 Posted April 28, 2011 Report Posted April 28, 2011 erm, Sorry not catching on, any chance of step-by-step instructions... thanks, CD Quote
Administrators Nabeel Posted April 28, 2011 Administrators Report Posted April 28, 2011 Find: foreach($allpilots as $pilot) { After that put if($pilot->retired == true) { continue; } 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.