Administrators simpilot Posted June 19, 2009 Administrators Report Share Posted June 19, 2009 Ok - I'm Stumped... ??? I have added the pilot country flags to show next to the pilots name in the recent pilots list. It works fine on most of the pages of the site but on some pages the image does not show, just a place holder. Upon further investigation I have found that on the pages it does not show it has extra lines in the url.. example - on the front page - shows http://www.simpilotgroup.com/newenglandair/lib/images/countries/US.png'>http://www.simpilotgroup.com/newenglandair/lib/images/countries/US.png on the login page - no show http://www.simpilotgroup.com/newenglandair/newenglandair/lib/images/countries/US.png The sidebar is a template so the same code is being used on all the pages.... Is it a module issue? Also, it always produces the image name in caps which will not show the image, I have made a duplicate of the flag using caps and it shows fine but I do not want to have to create a duplicate for all the flags. Is there a way around this? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted June 19, 2009 Administrators Report Share Posted June 19, 2009 What's the code you're using on the login page? It should be something like (on all pages:) <img src="<?php echo SITE_URL;?>/lib/images/countries" /> But how are you getting the images? Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted June 19, 2009 Author Administrators Report Share Posted June 19, 2009 This what is being used - <a href="<?php echo SITE_URL?>/index.php/profile/view/<?php echo $pilot->pilotid?>"><?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid). ' ' .$pilot->firstname . ' ' . $pilot->lastname?></a>  <img src="<?php echo SITE_URL?>/lib/images/countries/<?php echo $pilot->location?>.png"><br /> It is in a template for the left sidebar that is called up the same way in all the pages. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted June 19, 2009 Administrators Report Share Posted June 19, 2009 Try this <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted June 20, 2009 Author Administrators Report Share Posted June 20, 2009 Thanks Nabeel - That got it working ;D 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.