freshJet Posted March 6, 2011 Report Share Posted March 6, 2011 Hey all, I was adding the Recent Pilots code to my site today and it works fine, but I want the pilot's nationality flag next to their name. I tried editing it myself using the flag code from the profile_public_main.tpl, but it just leaves a space. For those who don't know what I mean, here is an example: [FLAG IMAGE] VMS001 John Smith [FLAG IMAGE] VMS002 Michael Jackson [FLAG IMAGE] VMS003 Bob Marley [FLAG IMAGE] VMS004 Paul McCartney [FLAG IMAGE] VMS005 Elvis Presley Quote Link to comment Share on other sites More sharing options...
James142 Posted March 6, 2011 Report Share Posted March 6, 2011 Hey all, I was adding the Recent Pilots code to my site today and it works fine, but I want the pilot's nationality flag next to their name. I tried editing it myself using the flag code from the profile_public_main.tpl, but it just leaves a space. For those who don't know what I mean, here is an example: [FLAG IMAGE] VMS001 John Smith [FLAG IMAGE] VMS002 Michael Jackson [FLAG IMAGE] VMS003 Bob Marley [FLAG IMAGE] VMS004 Paul McCartney [FLAG IMAGE] VMS005 Elvis Presley Don't know if this will work but you can try this: <img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" /> Quote Link to comment Share on other sites More sharing options...
freshJet Posted March 6, 2011 Author Report Share Posted March 6, 2011 Yeah that's what I tried. Quote Link to comment Share on other sites More sharing options...
Tom Posted March 6, 2011 Report Share Posted March 6, 2011 In frontpage_recentpilots.tpl: <?php foreach($pilots as $pilot) { ?> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" width="16" height="11" /> <a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"><?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid). ' ' .$pilot->firstname . ' ' . $pilot->lastname; ?></a><br /> <?php } ?> (Loving the example names by the way ) Quote Link to comment Share on other sites More sharing options...
freshJet Posted March 6, 2011 Author Report Share Posted March 6, 2011 Thanks Tom! 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.