CrashGordon Posted March 4, 2010 Report Posted March 4, 2010 Displaying different badges for inactive pilots. would that be a major job? Quote
Moderators mark1million Posted March 4, 2010 Moderators Report Posted March 4, 2010 Like this you mean, http://www.easyjetva.com/index.php/pilots Active / inactive column Its a if else statement, i dont see no reason why this couldnt be adapted to the avtar Quote
Guest Brian Posted March 4, 2010 Report Posted March 4, 2010 Like this you mean, http://www.easyjetva.com/index.php/pilots Active / inactive column Its a if else statement, i dont see no reason why this couldnt be adapted to the avtar if($pilot == inactive) { //Show this badge } else { //Show this badge } } Quote
Strider Posted March 5, 2010 Report Posted March 5, 2010 if($pilot == inactive) { //Show this badge } else { //Show this badge } } if($pilot == inactive) { //Show this badge } else { //Show this badge } took out the extra } i have it in my site, it works, but only for the bottom pilot of each table. How could i fix this? Cheers Dan C Quote
Strider Posted March 5, 2010 Report Posted March 5, 2010 <?php if($pilot == inactive) { echo '<img src="'.SITE_URL.'/lib/skins/cargo/images/inactive.png" width="150" height="58" alt="inactive">'; } else { echo '<img src="'.SITE_URL.'/lib/skins/cargo/images/active.png" width="150" height="58" alt="active">'; } ?> That is the code i used, should be fine, as it shows the active, but only at the bottom of each hubs roster. Cheers Dan C Quote
Administrators Nabeel Posted March 5, 2010 Administrators Report Posted March 5, 2010 I think Brian was just using pseudo-code.. if($pilot->retired == 0) { // theyre active } else { // theyre inactive } Quote
Strider Posted March 5, 2010 Report Posted March 5, 2010 (edited) if($pilot->retired == 1) { // theyre inactive } else { // theyre active } for some reason I found that nabeel's code got it wrong, and my active pilots were shown to be inactive when they were active. I have put the fix up. But you can try both ways and see what works for you. Cheers Dan C Edited March 5, 2010 by nightfox Quote
Guest Brian Posted March 5, 2010 Report Posted March 5, 2010 @Nabeel lol, Im slowing learning Object Oriented. Im still and oldschool guy . Quote
CrashGordon Posted March 5, 2010 Author Report Posted March 5, 2010 Thanks to all for their input. I think I've got the gist of it. After thinking it through, I realize it is probably a bad idea. After all, who wants the world to know how many pilots are there in name only. 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.